COLA-PY
Python обертка над фреймворком COLA.
Installation
COLA-PY can use an existing COLA installation or build and install COLA into an explicitly requested prefix:
COLA_INSTALL_PREFIX="$HOME/physics/cola" python -m pip install --no-binary=colapy colapy
# From a local checkout:
COLA_INSTALL_PREFIX="$HOME/physics/cola" python -m pip install .
# Equivalent explicit CMake setting (takes precedence over the environment):
python -m pip install . -Ccmake.define.COLA_INSTALL_PREFIX="/absolute/path/to/COLA"
The prefix must be an absolute path to the installation root, not a source directory. With an explicit prefix, only that prefix is searched; if COLA is missing there, a pinned revision is downloaded, built with the selected C++ toolchain, and installed there. Git, network access, a working compiler and write access to the prefix are required for auto-installation. No system package manager or sudo is invoked.
Without a prefix, an existing COLA can be found through standard CMake search paths
(e.g. CMAKE_PREFIX_PATH). If it is not found, configuration fails without downloading
or installing COLA. There is no default auto-installation destination.
These settings apply to source builds; installing an existing wheel does not run CMake.
COLA and its global COLA-Py module are installed outside pip's wheel ownership and are
not removed by pip uninstall colapy. Even pip wheel performs this external installation.
Do not set DESTDIR during auto-installation: the explicit prefix is the final destination.
At runtime, point the module loader to the same installation:
export COLA_DIR="$HOME/physics/cola"
Conda environments
Activate the environment and use its Python and a compatible C++ toolchain. For example, after installing Python, pip, CMake, Ninja, Git and a C++ compiler in the environment:
conda activate myenv
COLA_INSTALL_PREFIX="$CONDA_PREFIX" python -m pip install .
export COLA_DIR="$CONDA_PREFIX"
The prefix is still explicit: COLA-PY does not choose CONDA_PREFIX automatically.
The nested COLA build reuses the parent compiler/toolchain settings. Native files installed
this way are not conda-managed packages; avoid overwriting a separately conda-managed COLA.
Build COLA and its plugins with compatible C++ runtimes. Moving/cloning the environment or
shipping a standalone conda package requires separate packaging and relocation validation.
Usage
cola script
colapy package installs cola utility to your system.
Setup
To setup a new COLA module you can run the following command:
cola setup project --name="ModuleName" --prefix="PathToProjectDir" --version="1.0.0"
Run
It is possible to run COLA calculation without the need to write and compile driver C++ code. If you have COLA modules installed on your system you can run the calculation using filters exposed by them with the following command:
cola run \
--config="<path_to_config>/config.xml" \ # config that can use all the filters from the included libraries
--library="COLA-Py" # includes filters from COLA-Py module
--library="Deexcitation" # includes filters from Deexcitation module
Develop
To install locally from source run from the repo root
pip install -e .
Publish
To publish your changes to the pypi run from the repo root
python -m build --sdist
python -m twine upload dist/*
Metadata
Release files for colapy 1.0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| colapy-1.0.0.2.tar.gz | 3.9 MB | Without provenance | Details for colapy-1.0.0.2.tar.gz |
Release files / colapy-1.0.0.2.tar.gz
| Download URL | colapy-1.0.0.2.tar.gz |
|---|---|
| Size | 3.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9fc9f3b2e4c62793da6e5621c76db2fc4c9636813c456b372c1b59fcddecdfa0
|
|
BLAKE2b-256 checksum How to use checksums |
12d7980345320ad2b42b7c69f384244614c7f076453e98bbf8b5ad5349f0ec87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Security for colapy 1.0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.