2021-10-19 10:34:03 +01:00
|
|
|
# Development
|
|
|
|
### Setup
|
2021-10-21 15:05:21 +01:00
|
|
|
If you want to contribute to `pyerrors` please fork `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-10-21 15:05:21 +01:00
|
|
|
I find it convenient to install the package in editable mode in the local python environment
|
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-10-19 10:34:03 +01:00
|
|
|
### Documentation
|
2021-10-21 15:05:21 +01:00
|
|
|
Please add docstrings to any new function, class or method you implement.
|
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.
|
|
|
|
|
|
|
|
### Continous integration
|
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
|
|
|
```
|
2021-10-27 09:08:37 +01:00
|
|
|
pytest --cov=pyerrors -v
|
2021-10-19 10:34:03 +01:00
|
|
|
```
|
2021-10-27 09:08:37 +01:00
|
|
|
requiring `pytest`, `pytest-cov` and `pytest-benchmark`
|
2021-10-19 10:39:12 +01:00
|
|
|
and the linter `flake8` is executed with the command
|
2021-10-19 10:34:03 +01:00
|
|
|
```
|
|
|
|
flake8 --ignore=E501,E722 --exclude=__init__.py pyerrors
|
|
|
|
```
|
2021-10-19 10:39:12 +01:00
|
|
|
Please make sure that all tests are passed for a new pull requests.
|