Skip to content

Commit

Permalink
Docs: Dev instructions in README.md structured
Browse files Browse the repository at this point in the history
Splitted instructions into cloning, pre-commit and running tests.

Added instructions how to run tests with tox.
  • Loading branch information
agoscinski committed May 21, 2024
1 parent 45f6208 commit d8f5866
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,30 @@ See the [examples](https://github.com/aiidateam/aiida-restapi/tree/master/exampl
```shell
git clone https://github.com/aiidateam/aiida-restapi .
cd aiida-restapi
pip install -e .[pre-commit,testing] # install extra dependencies
```

### Setting up pre-commit

We use pre-commit to take care for the linting, formatting and type checking.
```shell
pip install -e .[pre-commit] # install extra dependencies
pre-commit install # install pre-commit hooks
pytest -v # discover and run all tests
pre-commit run # running pre-commit manually
```

### Running tests

With tox the tests can be run
```shell
pip install tox
tox -e py311 # run all tests for Python 3.11
tox -av # see all supported environments
```
tox will creat a custom environment to run the tests in. If you want to run the
tests inside your current environment
```shell
pip install -e .[testing] # install extra dependencies
pytest -v
```

See the [developer guide](http://aiida-restapi.readthedocs.io/en/latest/developer_guide/index.html) for more information.
Expand Down

0 comments on commit d8f5866

Please sign in to comment.