From c9c7c0ed9fd61b9c3a8df08f4cab84a7736e2bdc Mon Sep 17 00:00:00 2001 From: Jonas Scharpf Date: Tue, 25 Oct 2022 23:20:22 +0200 Subject: [PATCH] add contribution section and unittest calls to README --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index e763789..8b99e90 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ Create version info files based on the latest changelog entry. - [Custom regular expressions](#custom-regular-expressions) - [Custom template file](#custom-template-file) - [Additional version info content](#additional-version-info-content) +- [Contributing](#contributing) + - [Unittests](#unittests) - [Credits](#credits) @@ -235,6 +237,33 @@ __version__ = '.'.join(__version_info__) + '-rc1234' ``` +## Contributing + +### Unittests + +Run the unittests locally with the following command after installing this +package in a virtual environment or by using `tox` to create one on each run. + +```bash +# install the package with all its development dependencies +pip install .[dev] + +# run all tests +nose2 --config tests/unittest.cfg + +# run only one specific tests +nose2 tests.test_extract_version.TestExtractVersion.test_version_line_regex +``` + +Generate the coverage files with + +```bash +python create_report_dirs.py +coverage html +``` + +The coverage report is placed at `reports/coverage/html/index.html` + ## Credits Based on the [PyPa sample project][ref-pypa-sample]. Also a big thank you to