Skip to content

davidrudlstorfer/pytoda

Repository files navigation

PyToDa 🐍🛠️

CI Workflow Documentation Coverage badge

PyToDa (Python Tools for the Daily Usage) provides useful tools for the day to day usage with the multi-physics simulation framework 4C and is based on PySkel. Currently the following tools are available:

  • An arbitrary unit converter which can be very easily be included in other frameworks.
  • A logging framework which can be easily included into other frameworks.

The remaining parts of the readme are structured as follows:

Installation

For a quick and easy start an Anaconda/Miniconda environment is highly recommended. Other ways to install PyToDa are possible but here the installation procedure is explained based on a conda install. After installing Anaconda/Miniconda execute the following steps:

conda env create -f environment.yml
  • Activate your newly created environment:
conda activate pytoda
  • Install all PyToDa requirements (latest versions) with:
pip install -e .

or install the pinned versions with

pip install -e ."[safe]"
  • Now you are up and running 🎉

Execution

The following brief tutorials highlight how each tool can be used:

Unit converter

The unit converter can be called with

convert_unit --unit_length "m" --unit_weight "g" --unit_time "s" --quantity "1 bar"

by providing the base units for the target unit system. Finally, the provided quantity will be converted into the target unit system.

Logger

The logger can be simply included into any software framework by providing the functions with the necessary arguments. An example for the logger usage can be found within PySkel.

Run testing framework and create coverage report

To locally execute the tests and create the html coverage report simply run

pytest

Create documentation

To locally create the documentation from the provided docstrings simply run

pdoc --docformat google --output-dir docs src/pytoda

Dependency Management

To ease the dependency update process pip-tools is utilized. To create the necessary requirements.txt file simply execute

pip-compile --all-extras --output-file=requirements.txt requirements.in

To upgrade the dependencies simply execute

pip-compile --all-extras --output-file=requirements.txt --upgrade requirements.in

Finally, perforfmance critical packages such as Numpy and Numba are installed via conda to utilize BLAS libraries.

Contributing

All contributions are welcome. See CONTRIBUTING.md for more information.

License

This project is licensed under a MIT license. For further information check LICENSE.md.

About

Python tools for the daily usage

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages