Skip to content

martimlobao/template

Repository files navigation

Foobar Repository

Python 3.13+ Dependency management: uv

Overview

All things foobar.

Repository Layout

Path Description
tests/ Pytest-based test suite scaffolding (currently contains a placeholder test).
Makefile Convenience targets for installing dependencies and running quality checks.
pyproject.toml Project metadata, dependency definitions, and console script configuration.
uv.lock Lockfile generated by uv pinning all resolved dependencies.

Prerequisites

  • uv, which manages virtual environments and dependencies.

Initial Setup

uv is the only requirement to run the code in this project. Follow the installation instructions to set up uv locally. For example, on macOS or Linux, you can use

curl -LsSf https://astral.sh/uv/install.sh | sh

Running the Project

Execute the console scripts listed in pyproject.toml directly through uv:

uv run example

You can also drop into an interactive shell with the same environment using uv run ipython (or the make repl shortcut).

Development Workflow

  1. Implement your changes under src/ (remember to add type hints—mypy is part of the default quality gate).
  2. Add or update unit tests under tests/.
  3. Run the quality checks before committing.

The repository provides two ways to run the checks:

  • Using Makefile shortcuts (recommended):

    make lint      # Ruff, docformatter, pylint, bandit, yamllint
    make typecheck # mypy
    make test      # pytest
  • Using raw uv commands:

    uv run ruff check
    uv run mypy src tests
    uv run pytest

For a one-stop option, make check runs lint, typecheck, and test in sequence, and make fix applies the auto-formatting steps (Ruff formatter and Docformatter) before re-running Ruff with --fix.

Coding Standards & Tooling

  • Formatting: Ruff (PEP 8-compatible) plus Docformatter for docstrings.
  • Static analysis: Ruff for linting, Pylint for additional checks, Bandit for security scanning, and Yamllint for YAML validation.
  • Typing: Mypy enforces type hints across src/ and tests/.
  • Testing: Pytest is configured, with Hypothesis and Coverage already available as dev dependencies should property-based testing or coverage reports be needed.

Additional Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •