Setup and Installation
Dependencies
pyTMD is dependent on several open source programs that can be installed using OS-specific package management systems (e.g. apt or homebrew), conda or from source:
Installation
pyTMD is available for download from the GitHub repository, the Python Package Index (pypi), and from conda-forge.
The simplest installation for most users will likely be using conda or mamba:
conda install -c conda-forge pytmd
conda installed versions of pyTMD can be upgraded to the latest stable release:
conda update pytmd
Development Install
To use the development repository, please fork pyTMD into your own account and then clone onto your system:
git clone https://github.com/pyTMD/pyTMD.git
pyTMD can then be installed within the package directory using pip:
python3 -m pip install --user .
To include all optional dependencies:
python3 -m pip install --user .[all]
The development version of pyTMD can also be installed directly from GitHub using pip:
python3 -m pip install --user git+https://github.com/pyTMD/pyTMD.git
Package Management with pixi
Alternatively pixi can be used to create a streamlined environment after cloning the repository:
pixi install
pixi maintains isolated environments for each project, allowing for different versions of pyTMD and its dependencies to be used without conflict.
The pixi.lock file within the repository defines the required packages and versions for the environment.
pixi can also create shells for running programs within the environment:
pixi shell
To see the available tasks within the pyTMD workspace:
pixi task list
Tasks that can run on this machine:
-----------------------------------
clean-docs, coverage, docs, export-env, fetch, lint, start, test
Task Description
clean-docs Remove build artifacts and rebuild the documentation with sphinx
coverage Run the pytest suite and create coverage reports
docs Create documentation with sphinx
export-env Export workspace to a conda environment file
fetch Fetch data needed to run the pytest suite
lint Run flake8 to check for compilation errors
start Start JupyterLab in the notebooks directory
test Run the pytest suite
Note
pixi is under active development and may change in future releases
Verifying Installation
import pyTMD
print(f"pyTMD version: {pyTMD.__version__}")
pyTMD version: 3.0.8