Skip to content

fpaupier/piecewise-functions

Repository files navigation

Piecewise functions

A library exposing a class for working with piecewise constant function.

Pytest

Contributing

  1. Create a virtual environment and activate it
python3 -m venv .venv
source .venv/bin/activate

2.Install the dependencies

pip install -r requirements.txt
  1. Use the black formatting for your contribution

  2. Your local dev environment is setup!

Running the tests

With your virtual environment setup, from the project root directory run pytest

Building & pushing the library

# 1. Use hatch to package the library
./build_lib.sh

# 2. Push to your favorite PyPy repo with:
#   (see TestPyPi doc https://packaging.python.org/en/latest/tutorials/packaging-projects/) 
python3 -m twine upload --repository testpypi dist/*

# 3. In your client project, install the desired version by running
pip install -i https://test.pypi.org/simple/ --no-deps piecewise-functions-fp==0.0.6

Bibliography