linkchecker/doc/development.md

80 lines
2.4 KiB
Markdown
Raw Normal View History

2011-04-15 06:28:21 +00:00
Developing LinkChecker
======================
2022-09-05 18:30:38 +00:00
The following steps describe how to work with the LinkChecker source which can
be found on [GitHub](https://github.com/linkchecker/linkchecker/) where
development is managed.
2011-04-15 06:28:21 +00:00
This is a technical document, if you are looking for ways to
participate in the community, you should rather look into
2022-09-05 18:30:38 +00:00
[contributing](../CONTRIBUTING.rst).
2011-04-15 06:28:21 +00:00
Requirements
------------
hatchling and hatch-vcs are used to create the application metadata and build
distribution packages.
2022-09-05 18:30:38 +00:00
These requirements are in addition to the dependencies covered in the
[installation instructions](install.txt).
2011-04-15 06:28:21 +00:00
Developers may wish to install hatch or tox to manage running tests.
To run the copy of linkchecker in the local repository first create the
metadata in linkcheck/_release.py:
2011-04-15 06:28:21 +00:00
hatchling build -t sdist --hooks-only
2011-04-15 06:28:21 +00:00
Then linkchecker can be run with:
2011-04-15 06:28:21 +00:00
python -m linkcheck
2011-04-25 13:44:20 +00:00
2022-09-05 18:30:38 +00:00
Workflows using GitHub Actions are used to check every PR, each commit and
regularly the repository HEAD. Developers are able to perform these checks
locally, using `flake8` for code style, and run the test suite with `tox` or
`hatch -e test run tests` that are both configured to use pytest.
2011-04-15 06:28:21 +00:00
2022-09-05 18:30:38 +00:00
`hatchling build` creates distributions packages.
2011-04-15 06:28:21 +00:00
2022-09-05 18:30:38 +00:00
Source layout
-------------
2011-04-15 06:28:21 +00:00
2022-09-05 18:30:38 +00:00
Important files and directories for developers to be aware of:
2017-01-31 17:25:57 +00:00
2022-09-05 18:30:38 +00:00
.flake8
.gitignore
.yamllint
Dockerfile
pyproject.toml
pytest.ini
robots.txt - test file
tox.ini
.github/ - GitHub automation
cgi-bin/ - WSGI frontend
doc/ - documentation including source for web site and man pages
linkcheck/ - core code and CLI frontend
po/ - application translations
scripts/ - automated IANA schemes updater, analysis tools
tests/
tools/ - build scripts
2017-01-31 17:25:57 +00:00
Release process
---------------
1. check whether updated man pages and translations need committing
2021-01-28 19:20:24 +00:00
(`make locale; make -C doc locale; make -C doc man`)
if so create a pull request using the GitHub workflow:
"Create a branch with updated man pages and application translations"
2017-01-31 17:25:57 +00:00
2. edit `changelog.txt` and `upgrading.txt`
2017-01-31 17:25:57 +00:00
2021-01-28 19:20:24 +00:00
3. confirm tests have passed
2017-01-31 17:25:57 +00:00
2021-01-28 19:20:24 +00:00
4. submit a pull request
2017-01-31 17:25:57 +00:00
5. create release (vX.Y.Z) on GitHub
2017-01-31 17:25:57 +00:00
6. download Python distribution files from the GitHub release
2021-01-28 19:20:24 +00:00
7. check distribution files (`twine check LinkChecker*`) and upload to PyPI (`twine upload LinkChecker*`)