Building BEANSp
Build and installation from this github repository
Clone the beans repository
git clone https://github.com/adellej/beans cd beans
Create and activate a clean conda environment
The example below will create an environment with python 3.13 (or newer), but beans should work with python 3.9 onwards.
# optional: remove existing environment if needed - to start from scratch conda remove -n beans --all # create named conda environment beans with all requirements conda env create -f environment.yml conda activate beans
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 installto 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!