Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBB committed Apr 13, 2023
1 parent c398f44 commit d2db689
Showing 1 changed file with 33 additions and 37 deletions.
70 changes: 33 additions & 37 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -31,53 +33,48 @@ 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
----------

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::

Expand All @@ -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
Expand All @@ -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
<https://travis-ci.org/sintefmath/Splipy/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.


=========
Expand Down

0 comments on commit d2db689

Please sign in to comment.