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?#

../../../../_images/urlstechie_logo.png

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:

GitHub workflow#
 1 name: Check URLs
 2
 3 on: [push]
 4
 5 jobs:
 6   build:
 7     runs-on: ubuntu-latest
 8
 9     steps:
10     - uses: actions/checkout@v2
11     - name: urls-checker
12       uses: urlstechie/urlchecker-action@0.1.7
13       with:
14         # A subfolder or path to navigate to in the present or cloned repository
15         subfolder: docs
16
17         # A comma-separated list of file types to cover in the URL checks
18         file_types: .md,.py,.rst
19
20         # Choose whether to include file with no URLs in the prints.
21         print_all: false
22
23         # The timeout seconds to provide to requests, defaults to 5 seconds
24         timeout: 5
25
26         # How many times to retry a failed request (each is logged, defaults to 1)
27         retry_count: 3
28
29         # A comma separated links to exclude during URL checks
30         white_listed_urls: https://github.com/SuperKogito/URLs-checker/issues/2
31
32         # A comma separated patterns to exclude during URL checks
33         white_listed_patterns: https://github.com/SuperKogito/Voice-based-gender-recognition/issues
34
35         # choose if the force pass or not
36         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.

../../../../_images/demo.gif

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 ;)

Share this blog#

Updated on 08 April 2022

👨‍💻 edited and review were on 08.04.2022

References and Further readings#