pyerrors/CONTRIBUTING.md

39 lines
1.5 KiB
Markdown
Raw Normal View History

2021-10-19 10:34:03 +01:00
# Development
### Setup
2021-11-07 11:30:41 +00:00
If you want to contribute to `pyerrors` please [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) `pyerrors` on Github, clone the current `develop` branch
2021-10-19 10:34:03 +01:00
```
2021-10-21 15:05:21 +01:00
git clone http://github.com/my_username/pyerrors.git --branch develop
2021-10-19 10:34:03 +01:00
```
and create your own branch
```
cd pyerrors
git checkout -b feature/my_feature
```
2021-11-16 11:45:16 +00:00
It can be convenient to install the package in editable mode in the local python environment when developing new features
2021-10-19 10:34:03 +01:00
```
pip install -e .
```
2021-10-21 15:05:21 +01:00
Please send any pull requests to the `develop` branch.
2021-11-16 11:45:16 +00:00
2021-10-19 10:34:03 +01:00
### Documentation
2021-11-16 11:45:16 +00:00
Please add docstrings to any new function, class or method you implement. The documentation is automatically generated from these docstrings. The startpage of the documentation is generated from the docstring of `pyerrors/__init__.py`.
2021-10-19 10:34:03 +01:00
### Tests
When implementing a new feature or fixing a bug please add meaningful tests to the files in the `tests` directory which cover the new code.
2021-10-21 15:05:21 +01:00
For all pull requests tests are executed for the most recent python releases via
2021-10-19 10:34:03 +01:00
```
pytest -vv --cov=pyerrors
pytest -vv --nbmake examples/*.ipynb
2021-10-19 10:34:03 +01:00
```
requiring `pytest`, `pytest-cov`, `pytest-benchmark`, `hypothesis' and `nbmake`. To install the test dependencies one can run `pip install pyerrors[test]`
To get a coverage report in html run
2021-12-07 08:37:33 +00:00
```
pytest --cov=pyerrors --cov-report html
```
The linter `flake8` is executed with the command
2021-10-19 10:34:03 +01:00
```
flake8 --ignore=E501,W503 --exclude=__init__.py pyerrors
2021-10-19 10:34:03 +01:00
```
2021-10-19 10:39:12 +01:00
Please make sure that all tests are passed for a new pull requests.