Skip to content

Latest commit

 

History

History
84 lines (50 loc) · 2.24 KB

BUILD.rst

File metadata and controls

84 lines (50 loc) · 2.24 KB

Building BEANSp

Build and installation from this github repository

  1. Clone the beans repository

    git clone https://github.com/adellej/beans
    cd beans
  2. Create and activate a clean conda environment

    The example is for python 3.8, but should work for any version 3.6 to 3.11 as well.

    # optional: remove existing environment if needed - to start from scratch
    conda remove -n beans-3.8 --all
    # create blank conda environment
    conda create --name beans-3.8 python==3.8.*
    conda activate beans-3.8
  3. Install/upgrade pip, build and local install

    python3 -m pip install --upgrade pip
    python3 -m pip install --upgrade build
    # test build & local install
    # The "-e" install does not seem to be reliable for re-install on Linux
    #       - keeps pulling some old build from somewhere middlewhere.
    #         python -m pip install -e .*
    # This is more reliable:
    python3 -m build
    python3 -m pip install .

    Note: when working on the code, in case of doubts that recent changes got propagated, uninstall & purge the installed module _before_ pip install to ensure the installed version has all the recent modifications.

    python3 -m pip -v uninstall beansp
    python3 -m pip -v cache purge

    After this, in that enviroment, beansp just works from every directory, providing the conda environment is activated. Imports like:

    from beansp import Beans,beans

    (See test_sft_beans.py.)

Testing

Once you have compiled settle we recommend you run the test suite to check you have all the required dependencies and the code is operating as expected. To do this navigate to the top-level directory and type:

pytest

Run short functional test (SFT) manually

cd tests
python ./test_sft_beans.py

If the tests all pass then you are good to go!