From 2fc9e693537a37fb23be1299eac692b2dbd23cc9 Mon Sep 17 00:00:00 2001 From: SiQube Date: Tue, 12 Sep 2023 14:09:34 -0400 Subject: [PATCH 1/2] update contributing.md --- CONTRIBUTING.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e79c22115..73b21ee05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -93,6 +93,8 @@ cd pymovements pip install -e . ``` +If you have a problem e.g. `command not found: pip`, check whether you have activated a virtual enviroment. + ### Creating a Branch @@ -125,12 +127,23 @@ We use [`flake8`](https://pypi.org/project/flake8/) for quick style checks and [`pylint`](https://pypi.org/project/pylint/) for thorough style checks and [`mypy`]( https://pypi.org/project/mypy/) for checking type annotations. +You can check your code style by using [pre-commit](https://www.pre-commit.com). You can install `pre-commit` via pip: + +```bash +pip install pre-commit +pre-commit install +``` ### Testing Tests are written using [Pytest](https://docs.pytest.org) and executed in a separate environment using [Tox](https://tox.readthedocs.io/en/latest/). +If you have not yet installed `tox` you can do so via +```bash +pip install tox +``` + A full style check and all tests can be run by simply calling `tox` in the repository root. ```bash tox @@ -145,7 +158,7 @@ functionality. We try to keep our code coverage close to 100%. It is possible to limit the scope of testing to specific environments and files. For example, to only test event related functionality using the Python 3.7 environment use: ```bash -tox -e py37 tests/events +tox -e py38 tests/events ``` From 150b2be0cc36ca3c551b8159a2b496cb1b53e9a2 Mon Sep 17 00:00:00 2001 From: SiQube Date: Wed, 13 Sep 2023 08:07:52 -0400 Subject: [PATCH 2/2] remove python 3.7 reference from CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 73b21ee05..040727e4e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -156,7 +156,7 @@ If you add a new feature, please also include appropriate tests to verify its in functionality. We try to keep our code coverage close to 100%. It is possible to limit the scope of testing to specific environments and files. For example, to -only test event related functionality using the Python 3.7 environment use: +only test event related functionality using the Python 3.8 environment use: ```bash tox -e py38 tests/events ```