Installing trudag
System Dependencies
trudag requires:
python3(version>=3.11, <4.0) andgitas runtime dependenciesgraphvizas an optional dependency; required if usingplotcommand
Debian/Ubuntu
For alternative package managers, consult the respective documentation.
User
You can install the latest release of trudag from the project's package repository:
pip install trustable --index-url https://gitlab.eclipse.org/api/v4/projects/12202/packages/pypi/simple
pipx can also be used and is recommended instead of a global install:
pipx install trustable --index-url https://gitlab.eclipse.org/api/v4/projects/12202/packages/pypi/simple
General python package installation documentation can be found here.
Remember, if you require additional dependencies when using trudag, (such as
validator or reference plugins), you can inject these into the environment of
your pipx install:
Developer
If you are planning to modify the source code, you should use poetry instead. Installation instructions can be found here.
Clone the repository and enter it, then install trudag's dependencies.
Finally activate poetry's built-in virtual environment (Some IDEs may do this by default).
git clone https://gitlab.eclipse.org/eclipse/tsf/tsf.git
cd trustable
poetry install
eval $(poetry env activate)
Confirm everything is working as expected by running pytest.
Alternatively, you can also activate the local dev shell using Flox.
This shell allows us to share the same pinned dependencies and installs all the required tools for trudag development.
All subsequent changes you make to trudag's libraries or CLI tool will be
automatically reflected in your current shell.
Pre-commit
It is recommended to setup pre-commit, which would allow for local linting and checks, which can catch CI failures locally.
Either install pre-commit using your system package manager, or use poetry as pre-commit is listed as a dependency.
Run the following command to install the required git hooks: