Introducing urlstechie and its urls checking tools¶
Continuous testing is a vital part of any healthy software development process. Urls must always be tested and broken links must be fixed to guarantee a high quality product. Unfortunately, this is not always trivial and can be tedious. Moreover, most tools available out there cannot handle in-code urls and lack many other needed features. A while back, I ran across this particular Problem and I quickly saw the great automation opportunity this was, and how can Python and Regex help me solve this. This was the start of the urlchecker-action … from there and with the amazing @vsoch joining, the tools expanded and this was the start of the urlstechie organization.
What is urlstechie?¶
urlstechie is a small organization and an online project that started on March 2020. The goal for this project is to provide urls checking tools as part of continuous testing practices. The urlstechie organization currently provides two main tools:
- urlchecker-action : A GitHub action to collect and check urls in a project (code and documentation). The action aims at detecting and reporting broken links.
- urlchecker-python : A Python module to collect urls over static files (code and documentation), test them and then report broken links.
For more please refer to:
How to use the urlstechie tools?¶
The urlstechie tools, as you will notice, are very intuitive and simple to use. It also provides various features to customize the run, white-list urls and files etc. The GitHub action can be set-up as a GitHub workflow like the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
name: Check URLs on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: urls-checker uses: email@example.com with: # A subfolder or path to navigate to in the present or cloned repository subfolder: docs # A comma-separated list of file types to cover in the URL checks file_types: .md,.py,.rst # Choose whether to include file with no URLs in the prints. print_all: false # The timeout seconds to provide to requests, defaults to 5 seconds timeout: 5 # How many times to retry a failed request (each is logged, defaults to 1) retry_count: 3 # A comma separated links to exclude during URL checks white_listed_urls: https://github.com/SuperKogito/URLs-checker/issues/2 # A comma separated patterns to exclude during URL checks white_listed_patterns: https://github.com/SuperKogito/Voice-based-gender-recognition/issues # choose if the force pass or not force_pass : true
As for the python urlchecker module, it can be used locally to run the same checks.
The urlchecker can be installed from pypi using
pip install urlchecker or from conda using
conda install -c conda-forge urlchecker.
Here is a small demo by @vsoch displaying a couple of uses of the tool.
For more on the tools please refer to:
How to contribute?¶
We aim to provide an open welcoming environment at urlstechie. That’s the foundation to a flourishing project and so all contributions are welcome. Just open an issue and come talk to us, help us improve the code by providing test cases, feedback, suggestions and bug reports. If you have a fix, that’s even better, send us a pull request and join us on this coding ride ;)