diff --git a/README.rst b/README.rst index a24769c..16d5b89 100644 --- a/README.rst +++ b/README.rst @@ -11,9 +11,11 @@ use of curves, surfaces and volumes. The library is designed primarily for analysis use, and therefore allows fine-grained control over many aspects which is not possible to achieve with conventional CAD tools. + Installation ------------ -The library is packaged on splipy and can be installed through pip by simply running :: +The library is packaged on PyPI and can be installed through pip by simply +running :: pip install splipy @@ -31,32 +33,24 @@ Resources Development and building from source ==================================== -Dependencies ------------- - -**Required** - -This library requires numpy and scipy. For building, cython is also -required. E.g. on Ubuntu:: +Poetry +------ - pip install numpy - pip install scipy - pip install cython +Splipy uses Poetry as a project management tool. To install poetry, use:: -**Optional** + pip install poetry -To use image processing tools, you need OpenCV :: +Poetry is the only tool that must be installed outside of the virtual +environment for Splipy. Once installed, run the command:: - pip install python-opencv + make install -To generate the documentation you will need Sphinx:: +in the root Splipy directory. This will install Splipy and its dependencies in a +virtual environment located in the ``.venv`` directory. - pip install sphinx +To run the tests:: -And to run the tests you can use your favourite test runner, for example -pytest:: - - pip install pytest pytest-benchmark pytest-cov + make pytest Installing @@ -64,20 +58,23 @@ Installing To install, use:: - python setup.py build_ext --inplace - python setup.py install + pip install . + +To generate a package (source distribution or wheel), use:: -To generate a package, use:: + poetry build -f sdist + poetry build -f wheel - python setup.py sdist --dist-dir . +Don't upload wheels to PyPI manually. They are built by CI runners whenever a +new version is tagged (see below). Documentation ------------- -To generate the documentation, run in the `doc` folder:: +To generate the documentation, run:: - make html + make doc To push generated docs online on the ``gh-pages`` branch, run the helper script:: @@ -89,27 +86,28 @@ where ``remote`` is the name of the remote to push to. If not given, it will be Tests ----- -To run the tests, you can use your favourite test runner. For example, with -pytest:: +To run the tests, use:: - PYTHONPATH=. py.test --benchmark-skip + make pytest -To get a report of test coverage, run:: +For benchmarks:: + + make bench - PYTHONPATH=. py.test --benchmark-skip --cov=splipy --cov-report term-missing Code analysis ------------- + 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 + poetry run pip install pylint To perform the code analysis, use:: - pylint -d C --rcfile=pylint.cfg splipy/ + poetry run pylint -d C --rcfile=pylint.cfg splipy/ Releasing @@ -125,10 +123,8 @@ number, create a commit and a tag. To push this to github, use:: git push --tags -After that, Travis CI should automatically build and deploy the -packages to PyPi. It would be helpful to monitor the Travis build so -that errors can be fixed quickly. See the `list of builds -`_. +After that, CI should automatically build and deploy the packages to pyPi. It +would be helpful to monitor the actions so that errors can be fixed quickly. =========