Project installation#

Quick start#

  • Simply install the package with pip install pyresiflex.

  • You should now be able to run the example scripts in the examples directory.

Workflow for developers/contributors#

GitHub Codespaces has been set up, so you can click on this button to quickly code and run the examples: Open in GitHub Codespaces

You can also follow the instructions below, to set up the project on your machine:

  • First, clone the repository with git clone https://github.com/pag1pag/pyresiflex.git.

  • Since this package uses uv, install it by following instructions on their website.

  • Update this Python package manager with uv self update.

  • Run uv sync to create a virtual environment at .venv, with the latest version of Python and all the necessary dependencies.

  • To test if the package is working, run uv run pytest. All tests should pass.

Next, you just need to activate the virtual environment with:

  • (macOS and Linux) source .venv/bin/activate

  • (Windows) .venv\Scripts\activate

Do not forget to activate it each time you are using this project.

Before pushing to GitHub, run the following commands in a terminal (with the virtual environment activated):

  1. Update dependencies with just update-env.

  2. Run quality assurance checks (code linting) with just qa.

  3. Run type checks with just type-check.

  4. Run unit tests with just tests.

  5. Run unit tests with coverage and generate a badge with just tests-cov.

  6. Build the documentation with just build-docs.

You could also run just to run all the above commands in one go.