A python3 wrapper for Cubit. It is tested with Cubit15.2.
CubitPy uses the python code formatter black. The testsuite checks if all files are formatted accordingly.
Cubitpy is developed with python3.8.
Other versions of Python might lead to issues.
It is recommended to use virtual environments with python.
On Debian systems the following packages have to be installed
sudo apt-get install python3-venv python3-devNow a virtual environment can be created (chose an appropriate directory for this, e.g., /home/user/opt)
python3 -m venv cubitpy-envThe created virtual environment can be loaded with
source cubitpy-env/bin/activateFrom now on we assume that the virtual enviroment is loaded.
To install cubitpy go to the repository root directory
cd path_to_cubitpyAnd install cubitpy via pip
pip install .If you intend to actively develop cubitpy, install it in editable mode
pip install -e .To run CubitPy it is required to set an environment variable with the path to the Cubit directory (on Linux the directory containing the main cubit executable and on MacOS to the binary directory)
export CUBIT=path_to_cubit_directory(Optional) If the BACI preprocessor pre_exodus should be used the path to the executable has to be set
export BACI_PRE_EXODUS=path_to_pre-exodusTo check if everything worked as expected, run the tests from within the tests directory
cd path_to_cubitpy/tests
pytest -q testing.py