.. image:: images/logo_small.svg
This repository contains the pyvib packages. A python library for nonlinear state space modeling using white-, gray- and blackbox models. See the documentation for further info.
- API documentation - technical details on all functions
- Getting-started guide - tutorial page (run with jupyter to get interactive features)
- Examples page - stand-alone executables of different applications
This library requires numpy, scipy and python3.7. E.g. on Linux:
pip install numpy
pip install scipy
pip install cythonTo generate the documentation you will need Sphinx:
pip install sphinx
pip install sphinx_rtd_themeAnd to run the tests you can use your favourite test runner, for example pytest:
pip install pytest pytest-benchmark
To install, use::
python setup.py build_ext --inplace
python setup.py installTo generate a package, use:
python setup.py sdist --dist-dir .
To generate the documentation, run in the doc folder:
sphinx-apidoc --separate -f -o modules ../pyvib
make htmlTo push generated docs online on the gh-pages branch, run the helper script
python push_documentation.py [remote]
where remote is the name of the remote to push to. If not given, it will be
asked.
To run the tests, you can use your favourite test runner. For example, with pytest::
py.test pyvib test_utils --benchmark-skip
You can use pylint3 to perform static code analysis on the module. This can help identify bugs and give suggestions for improvements.
To install, use:
pip3 install pylint
To perform the code analysis, use:
pylint -d C --rcfile=pylint.cfg splipy/
To make a new release, it is recommended to install bumpversion. To make a new release, run:
bumpversion <type>
where type is one of patch, minor or major. This will up the version
number, create a commit and a tag. To push this to github, use:
git push --tags
After that, to create the actual packages, run:
rm -rf dist
python setup.py sdist
python setup.py bdist_wheel --universalto create a source distribution and a wheel. These can then be uploaded where they need to be uploaded. The recommended way to do that is using twine:
twine upload dist/* -r <index>
Where index is the name of the index in your ~/.pypirc where you want to
upload.