Skip to content

CornishLabs/dnamic-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dnamic-toolkit

Contains common helper functions, physics calculations, for use in DNAMIC (c)ontrolled labs.

Installing UV (the modern replacement for conda, pip, virtualenv, piptools,...)

Follow Astral’s install guide: https://docs.astral.sh/uv/getting-started/installation/

Using dnamic-toolkit from another uv project without installing editably

From your other project directory:

uv add "dnamic-toolkit @ git+https://github.com/CornishLabs/dnamic-toolkit.git"
uv sync

For having an install, and being able to edit it, see below.

Quickstart to developing + using simultaneously

Clone + create the project environment

git clone https://github.com/CornishLabs/dnamic-toolkit.git
cd dnamic-toolkit
uv sync # This updates the venv associated with this folder

This creates/updates the project’s .venv and installs the project in editable mode in this project venv for development.

Run the tests

uv run pytest

uv run executes commands inside the project environment (it syncs before if necessary).

Try a quick import

uv run python -c "import dnamic_toolkit; print('import ok')"

(src/ contains the package and tests/ contains the test suite.)

Run an example

uv run python examples/<example_file>.py

(See the examples/ folder for runnable scripts.)


Use this editable install in another project setup with UV

uv add --editable /path/to/cloned/dnamic-toolkit
uv sync

Notes for contributors

  • Add runtime deps:

    uv add <package>
  • Add dev deps (tests/lint tooling). The dev group is installed by default:

    uv add --dev pytest
  • CI/repro builds: fail if uv.lock would change:

    uv sync --locked

    or

    uv run --locked pytest

About

Contains common helper functions, physics calculations, for use in DNAMIC (c)ontrolled labs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages