mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-16 15:20:24 +01:00
Merge branch 'develop' into documentation
This commit is contained in:
commit
54c1b180fc
4 changed files with 36 additions and 17 deletions
|
@ -1,31 +1,30 @@
|
|||
# Development
|
||||
# Contributing
|
||||
|
||||
If you are new to contributing to open source software [this guide](https://opensource.guide/how-to-contribute) can help get you started.
|
||||
|
||||
### Setup
|
||||
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
|
||||
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 repository
|
||||
```
|
||||
git clone http://github.com/my_username/pyerrors.git --branch develop
|
||||
git clone http://github.com/my_username/pyerrors.git
|
||||
```
|
||||
and create your own branch
|
||||
and create your own branch for the feature or bug fix
|
||||
```
|
||||
cd pyerrors
|
||||
git checkout -b feature/my_feature
|
||||
```
|
||||
It can be convenient to install the package in editable mode in the local python environment when developing new features
|
||||
```
|
||||
pip install -e .
|
||||
```
|
||||
Please send any pull requests to the `develop` branch.
|
||||
After committing your changes please send a pull requests to the `develop` branch. A guide on how to create a pull request can be found [here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
|
||||
|
||||
### Documentation
|
||||
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`.
|
||||
Please add docstrings to any new function, class or method you implement. The documentation is automatically generated from these docstrings. We follow the [numpydoc style](https://numpydoc.readthedocs.io/en/latest/format.html) for docstrings. The startpage of the documentation is generated from the docstring of `pyerrors/__init__.py`.
|
||||
|
||||
### 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.
|
||||
For all pull requests tests are executed for the most recent python releases via
|
||||
```
|
||||
pytest -vv --cov=pyerrors
|
||||
pytest -vv --nbmake examples/*.ipynb
|
||||
pytest
|
||||
pytest --nbmake examples/*.ipynb
|
||||
```
|
||||
requiring `pytest`, `pytest-cov`, `pytest-benchmark`, `hypothesis' and `nbmake`. To install the test dependencies one can run `pip install pyerrors[test]`
|
||||
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
|
||||
```
|
||||
|
@ -35,4 +34,4 @@ The linter `flake8` is executed with the command
|
|||
```
|
||||
flake8 --ignore=E501,W503 --exclude=__init__.py pyerrors
|
||||
```
|
||||
Please make sure that all tests are passed for a new pull requests.
|
||||
Please make sure that all tests pass for a new pull requests.
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
- **Documentation:** https://fjosw.github.io/pyerrors/pyerrors.html
|
||||
- **Examples:** https://github.com/fjosw/pyerrors/tree/develop/examples
|
||||
- **Contributing:** https://github.com/fjosw/pyerrors/blob/develop/CONTRIBUTING.md
|
||||
- **Bug reports:** https://github.com/fjosw/pyerrors/issues
|
||||
|
||||
## Installation
|
||||
|
@ -17,3 +16,6 @@ to install the current `develop` version run
|
|||
```bash
|
||||
pip install git+https://github.com/fjosw/pyerrors.git@develop
|
||||
```
|
||||
|
||||
## Contributing
|
||||
We appreciate all contributions to the code, the documentation and the examples. If you want to get involved please have a look at our [contribution guideline](https://github.com/fjosw/pyerrors/blob/develop/CONTRIBUTING.md).
|
||||
|
|
|
@ -1,7 +1,25 @@
|
|||
import pickle
|
||||
import platform
|
||||
import numpy as np
|
||||
import scipy
|
||||
import matplotlib
|
||||
import matplotlib.pyplot as plt
|
||||
import pandas as pd
|
||||
import pickle
|
||||
from .obs import Obs
|
||||
from .version import __version__
|
||||
|
||||
|
||||
def print_config():
|
||||
"""Print information about version of python, pyerrors and dependencies."""
|
||||
config = {"python": platform.python_version(),
|
||||
"pyerrors": __version__,
|
||||
"numpy": np.__version__,
|
||||
"scipy": scipy.__version__,
|
||||
"matplotlib": matplotlib.__version__,
|
||||
"pandas": pd.__version__}
|
||||
|
||||
for key, value in config.items():
|
||||
print(f"{key : <10}\t {value}")
|
||||
|
||||
|
||||
def errorbar(x, y, axes=plt, **kwargs):
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "2.7.0+dev"
|
||||
__version__ = "2.7.0-dev"
|
||||
|
|
Loading…
Add table
Reference in a new issue