Skip to main content

CubitPy: Utility functions and 4C related functionality for the Cubit and Coreform python interface

Project description

build-test

CubitPy

Utility functions and 4C related functionality for the Cubit and Coreform python interface, Especially for the creation of input files for 4C.

Usage

A tutorial can be found in the /tutorial directory.

Contributing

If you are interested in contributing to CubitPy, we welcome your collaboration. For general questions, feature request and bug reports please open an issue.

If you contribute actual code, fork the repository and make the changes in a feature branch. Depending on the topic and amount of changes you also might want to open an issue. To merge your changes into the CubitPy repository, create a pull request to the main branch. A few things to keep in mind:

  • It is highly encouraged to add tests covering the functionality of your changes, see the test suite in tests/.
  • CubitPy uses black to format python code. Make sure to apply black to the changed source files.
  • Feel free to add yourself to the CONTRIBUTORS file.

Installation

CubitPy is developed with python3.12. Other versions of Python might lead to issues. It is recommended to use a python environment container such as conda or venv.

  • conda: A conda environment can be created and loaded with
    conda create -n cubitpy python=3.12
    conda activate cubitpy
    
  • venv: Chose an appropriate directory for this, e.g., /home/user/opt. A virtual environment can be setup with
    • On Debian systems the following packages have to be installed:
      sudo apt-get install python3-venv python3-dev
      
    • Create and load the environment
      cd <path-to-env-folder>
      python -m venv cubitpy-env
      source cubitpy-env/bin/activate
      

To install cubitpy go to the repository root directory

cd path_to_cubitpy

And 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. This should be the "root" directory for the installation.

export CUBIT_ROOT=path_to_cubit_root_directory

To check if everything worked as expected, run the tests from within the tests directory

cd path_to_cubitpy/tests
pytest -q testing.py

If you intend to actively develop CubitPy, please make sure to install the pre-commit hook within the python environment to follow our style guides:

pre-commit install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cubitpy-0.0.1.tar.gz (39.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cubitpy-0.0.1-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file cubitpy-0.0.1.tar.gz.

File metadata

  • Download URL: cubitpy-0.0.1.tar.gz
  • Upload date:
  • Size: 39.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for cubitpy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3ffafe60e3d0446cc848530696c516a658d5721aea41cb6a01d3e284a4cb622c
MD5 02c12bcd9ccce91f88ce244e28b34bb0
BLAKE2b-256 9df74bb7a552ee9f39a6a5f07b913d6f43c889e96916addf368d0dae3403f17d

See more details on using hashes here.

File details

Details for the file cubitpy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: cubitpy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for cubitpy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 520d791362e2edf10b0759b95f5a5bfd14e1ff409dd6e08f2a2340f1311360e3
MD5 894a4f179dce3f5c99f76d35502848a0
BLAKE2b-256 e551c5ee8e57f89262c3f5b7d7abb81a6daf1f3b19c88fd6eb343a822e883ec4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page