Skip to content

uker-troi-lab/project-template

Repository files navigation

troi-lab project template

This is a template repository for troi-lab projects.

It includes:

  • .gitignore: organized as inclusion-list i.e. by default, everything is excluded from git tracking and if users want resources tracked by git they need to intentionally add them to the .gitignore-file.
  • project.toml: basic project metadata
  • .pre-commit-config.yaml: some pre-commit hooks

Development Setup

To install all required project dependencies and setup pre-commit hooks, clone this repo and run

python scripts/dev_setup.py

Add packages to the pyproject.toml with

uv add {package}

Remove packages from the pyproject.toml with

uv remove {package}

Sync package dependencies with your local environment (aka. install dependencies defined in pyproject.toml) with

uv sync

Update the uv.lock file with

Remove packages from the pyproject.toml with

uv lock

To run linter, execute:

uv run ruff check

To run code-formatter, execute:

uv run ruff format --diff

Best practices and further resources

  • This project template uses uv for dependency-management and python-packaging (see features)
  • Regularly run code-linter and code-formatter (ruff). To exclude lines from the linter, add # noqa to the end of the line.
  • Whenever possible, format your commit messages according to conventional commits (commitizen can help you with that)
  • Use semantic versioning
  • tag your commits when incrementing versions or creating a new release
  • CHANGELOG.md is updated on every commit using pre-commit hooks

About

troi-lab project template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published