Building with spin and conda#

Installing conda#

numpy-financial uses spin and conda to manage dependencies, build wheels and sdists, and publish to PyPI this page documents how to work with spin and conda.

To install poetry follow their official guide it is recommended to use the official installer for local development.

To check your installation try to check the version of miniconda:

conda -V

Setting up a virtual environment using conda#

Once conda is installed it is time to set up the virtual environment. To do this run:

conda env create -f environment.yml

This command looks for dependencies in the environment.yml file, resolves them to the most recent version and installs the dependencies in a virtual environment. It is now possible to launch an interactive REPL by running the following command:

conda activate numpy-financial-dev

Building NumPy-Financial#

NumPy-Financial is built using a combination of Python and Cython. We therefore require a build step. This can be run using

spin build

Running the test suite#

NumPy-Financial has an extensive test suite, which can be run with the following command:

spin test

Building distributions#

It is possible to manually build distributions for numpy-financial using poetry. This is possible via the build command:

spin build

The build command creates a dist directory containing a wheel and sdist file.