GitLab upgrade completed. Current version is 17.11.1. We now benefit from the features of the release 17.11.
Produce an installable Python Package with a library interface that enables other packages to use the algorithms presented here.
The following changes are introduced:
hrevolve
package and renamed to have conventional (lower case) and legal (no -
and no initial digits) names..py
extension.setup.py
, setup.cfg
and pyproject.toml
have been introduced to make the package installable.To install the package directly from Gitlab, run:
$ pip install git+https://gitlab.inria.fr/adjoint-computation/H-Revolve.git@python_package
Once this MR lands, the @python_package
will no longer be required. As a next step we can push the packages to PyPI at which point the following will work:
$ pip install hrevolve
When working on the package, it should be installed in editable mode by running the following command in the top folder of the repository:
$ pip install -e .
This causes the source files to be used directly so that changes can be tested without reinstalling.
The tests can be run using:
$ pip install pytest
$ python -m pytest
=========================================================================== test session starts ============================================================================
platform darwin -- Python 3.10.4, pytest-7.1.2, pluggy-1.0.0
rootdir: /Users/dham/src/firedrake/src/H-Revolve
plugins: xdist-2.5.0, forked-1.4.0, nbval-0.9.6, flake8-1.1.1, typeguard-2.13.3
collected 7 items
tests/test_hrevolve.py ....... [100%]
============================================================================ 7 passed in 0.04s =============================================================================
PEP8 compliance can be checked with:
$ pip install flake8
$ flake8
Successful execution will result in no output. Any output indicates PEP8 violations in the code.
Once the merge to master has occurred, we should set up INRIA's continuous integration to ensure that flake8 and pytest are run on all commits automatically.