Skip to content

Conversation

topher097
Copy link

@topher097 topher097 commented May 19, 2025

Inclusion of a devenv.nix environment for development in linux. By including this environment, the development system can be hermetic and reproducable. To enter the shell, either use the justfile recipe: just shell, or the command: devenv shell --impure. Note, it may take some time to start the shell the first time, as the shell needs to build the required packages.

The justfile includes basic recipes to run, test, and format files; this is a QoL addition

Summary by Sourcery

Introduce a hermetic Nix-based development environment and streamline project workflows with a Justfile

New Features:

  • Add a Nix development environment via devenv.nix, devenv.yaml, and lock file for reproducible builds
  • Add a Justfile with recipes for entering the dev shell, running tests, formatting code, and other common tasks

Enhancements:

  • Configure pytest options (minversion, cache directory, addopts, test paths) in pyproject.toml

Copy link

sourcery-ai bot commented May 19, 2025

Reviewer's Guide

This PR sets up a hermetic Linux development environment using Nix (via devenv), integrates Git hooks and Python tooling, introduces a Justfile for common workflows, and refines pytest settings for a reproducible, streamlined developer experience.

File-Level Changes

Change Details Files
Configure pytest options in pyproject.toml
  • Set minimum pytest version to 8.0
  • Specify cache directory and console output style
  • Add verbose, colorized output flags
  • Define test paths and retention count for tmp_path
pyproject.toml
Add Nix-based hermetic development environment
  • Create devenv.nix with Python 3.12, uv and just support
  • Enable and configure git-hooks for linting, formatting and security
  • Define environment variables and shell-entry script for project setup
  • Add devenv.yaml and lock file to pin Nix inputs
devenv.nix
devenv.yaml
devenv.lock
Introduce Justfile for development tasks
  • Define shell entry, project ownership and Python environment setup recipes
  • Add commands for running app, tests, formatting and docs preview
  • Integrate uv tooling as script interpreter and enable positional arguments
  • Include utilities for git staging, garbage collection and VM management
justfile

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@topher097 topher097 changed the base branch from main to v0.3.0-dev May 19, 2025 17:46
@topher097 topher097 marked this pull request as draft May 19, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant