Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 1.42 KB

File metadata and controls

66 lines (43 loc) · 1.42 KB

Contributing

Prerequisites

  • Python >=3.13+
  • uv — Python package and project manager

Setup

Clone the repo and install dependencies:

git clone [email protected]:cylf-dev/chunk-utils.git
cd chunk-utils
uv sync --locked

This creates a virtualenv in .venv/ and installs all dependencies (including dev tools).

Set up pre-commit hooks:

uv run pre-commit install

Running tests

uv run pytest tests/ -v

Linting and formatting

Ruff is used for both linting and formatting:

uv run ruff check .
uv run ruff format .

Type checking:

uv run mypy src/

Pre-commit runs all of these automatically on staged files.

Versioning

This project uses dynamic versioning based on git tags. The version is automatically derived from the repository state:

  • Tagged commits (e.g., v0.1.0) produce exact versions: 0.1.0
  • Commits after a tag produce development versions with git metadata: 0.1.1.dev3+g1a2b3c4
    • .dev3 indicates 3 commits since the last tag
    • +g1a2b3c4 includes the abbreviated git SHA

This follows PEP 440 and Semantic Versioning.

Tag format: Use v prefix followed by semantic version: v0.1.0, v1.0.0, v1.2.3

You can check the current version:

python -c "from chunk_utils import __version__; print(__version__)"