Skip to content

Conversation

@steinerkelvin
Copy link
Contributor

@steinerkelvin steinerkelvin commented Aug 18, 2025

Modernize Development Tooling: Poetry to UV Migration

This PR modernizes the development toolchain by migrating from Poetry to UV for dependency management, introduces testing infrastructure, and streamlines CI/CD workflows. The changes provide significant performance improvements in dependency resolution and installation while maintaining full compatibility with existing functionality.

Changes

🚀 Dependency Management Migration

  • Replaced Poetry with UV: Modern, fast Python dependency management with 10-100x faster resolution
  • PEP 621 Compliance: Migrated pyproject.toml to standard format with UV-native configuration
  • Lock File Migration: Replaced poetry.lock with uv.lock (1,986 lines vs 2,731 lines - more efficient)
  • Python Version Support: Updated to Python 3.10-3.12 (3.13 not supported by PyO3 dependency)

🛠️ Development Experience

  • Added Comprehensive Justfile: 20+ development commands for streamlined workflows
    • Environment setup: just boot, just sync, just update
    • Code quality: just fmt, just lint, just typecheck, just ci
    • Testing: just test, just cov, just cov-html
    • Documentation: just docs-run, just docs-build
    • Release management: just release, just build, just publish
  • VS Code Integration: Updated extensions and settings for modern tooling
    • Added basedpyright for type checking (replacing Pyright)
    • Added just extension for task runner support
    • Updated tasks for new development commands

📋 Testing Infrastructure

  • Added pytest Configuration: Test framework setup with coverage reporting
  • First Test Suite: Added tests/cli/test_misc.py with comprehensive tests for treasury-address command
    • Unit tests with mocking for fast execution
    • Integration tests for command structure validation
    • 43 lines of test code with proper test organization

📝 Changelog Management

  • Towncrier Integration: Professional changelog management system
    • News fragments in changes/ directory
    • Automated changelog generation during releases
    • Support for feature, bugfix, doc, removal, misc, and security fragment types
    • CI enforcement requiring news fragments for PRs

🔄 CI/CD Improvements

  • Unified Workflow: Consolidated multiple workflows into check-code.yml
  • Matrix Testing: Python 3.10 and 3.12 on Ubicloud runners
  • UV-Native CI: Direct UV commands for consistency and performance
  • Enhanced Checks: Linting, type checking, testing, coverage, and build validation
  • Caching Strategy: UV dependency caching for faster CI runs

📚 Documentation

  • Comprehensive CLAUDE.md: 245 lines of development documentation
    • Quick start guides for both UV and Nix workflows
    • Detailed tool explanations and troubleshooting
    • Release management procedures
    • Project structure overview
  • Updated README: Modern setup instructions with UV focus
  • Added Documentation Assets: Project logo and favicon for docs generation

🗂️ Project Structure

  • Simplified Configuration: Reduced complexity by removing Poetry-specific files
  • Modern Tooling: BasedPyright for type checking, Ruff for linting/formatting
  • Environment Management: Updated .envrc with UV layout support
  • Cleanup: Removed legacy Makefile and old CI workflows

Testing

Automated Testing

  • New Test Suite: Comprehensive tests for CLI commands with both unit and integration test patterns
  • Coverage Reporting: Configured pytest with coverage tracking and XML/HTML output
  • CI Integration: All tests run automatically in CI with coverage reporting

Local Testing

# Run tests locally
just test       # Quick test run
just cov       # With coverage
just cov-html  # HTML coverage report

Development Workflow Testing

  • Linting: Ruff check and format validation
  • Type Checking: BasedPyright strict mode validation
  • Build Testing: Package building with UV build system
  • Documentation: Local docs server with pdoc

Breaking Changes

Migration Required for Contributors

Contributors must update their local development setup:

Before (Poetry):

poetry install --with dev
poetry run make check

After (UV + Just):

uv venv && uv sync  # or just boot
just ci             # or just lint && just typecheck

Tool Changes

  • Type Checker: Pyright → BasedPyright (more accurate, faster)
  • Task Runner: Make → Just (more expressive, cross-platform)
  • Dependency Manager: Poetry → UV (significantly faster)

Performance Impact

Dependency Installation Performance

  • UV vs Poetry: 10-100x faster dependency resolution
  • CI Performance: Reduced workflow time from UV caching and faster operations
  • Lock File Size: 25% reduction in lock file size (better for git operations)

Development Experience

  • Command Discoverability: just --list shows all available commands
  • Consistent Interface: All operations through just commands
  • Better Error Messages: UV provides clearer dependency resolution errors

Deployment Notes

For Maintainers

  • Release Process: Updated to use just release VERSION
  • Publishing: just publish with PYPI_API_TOKEN
  • Changelog: Automated with towncrier fragments

For CI/CD

  • Workflow Changes: Updated GitHub Actions use UV setup
  • Caching: UV dependency caching enabled for performance
  • Matrix Testing: Python 3.10 and 3.12 supported

Reviewer Checklist

  • Code follows new project conventions (Ruff formatting, BasedPyright types)
  • Tests pass and coverage is maintained (just test, just cov)
  • Documentation is accurate and comprehensive
  • No sensitive data exposed in configuration files
  • Performance improvements verified (faster CI, local development)
  • Breaking changes are clearly documented with migration path
  • New tooling integration works correctly (Just, UV, BasedPyright)
  • Towncrier fragment system functions properly
  • CI workflows execute successfully with new configuration

Related Issues

This modernization effort addresses several development experience issues:

  • Slow dependency resolution and installation
  • Inconsistent development environment setup
  • Lack of testing infrastructure
  • Fragmented CI workflows

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

Summary by CodeRabbit

  • New Features
    • Introduced streamlined developer commands via Just (formatting, linting, type checking, testing, release, docs).
  • Documentation
    • Added a comprehensive development guide.
    • Revamped README with a new Development Setup and clarified installation notes.
    • Added guidance for managing release notes with news fragments.
  • Chores
    • Migrated project tooling from Poetry to UV.
    • Updated CI: added a consolidated multi-Python quality workflow; refined Nix checks; removed legacy workflows.
    • Improved editor setup and ignore rules.
  • Tests
    • Added tests for the treasury-address CLI command.

steinerkelvin and others added 3 commits August 18, 2025 14:45
- Replace Poetry with UV for faster, modern Python dependency management
- Add comprehensive justfile with 20+ development commands
- Update CI to use UV with caching and matrix testing on Python
  3.10-3.13
- Migrate pyproject.toml to PEP 621 standard format
- Add Towncrier for changelog management with fragments system
- Update VS Code configuration to use basedpyright and Just extension
- Add comprehensive CLAUDE.md development guide
- Simplify Nix flake to focus on development shell
- Update README with UV-based setup instructions
- Remove legacy Poetry files and workflows

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
  - Rename CI job from build-test to check-code for clarity
  - Add explicit Python setup step for better version control
  - Replace just commands with direct uv calls for consistency
  - Update Nix workflow trigger to include test-ci branch
  - Reorganize justfile commands and add new check command
  - Set Python version support to 3.10-3.12 range
  - Update dependencies via uv.lock refresh

Note: PyO3 does not support CPython 3.13 as of now
@coderabbitai
Copy link

coderabbitai bot commented Aug 18, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Switches project tooling from Poetry/Make to UV/Just/Hatchling, updates Nix flake and editor configs, restructures CI to a unified “Check Code” workflow, removes legacy workflows and Makefile, adds Towncrier docs and fragments, adjusts ignores, and adds a new CLI test for treasury-address.

Changes

Cohort / File(s) Summary of changes
Tooling migration to UV/Just/Hatchling
/.envrc, /pyproject.toml, /justfile, /Makefile, /README.md
Adds layout_uv() and switches env setup to uv; migrates packaging to PEP 621 + hatchling; introduces comprehensive Just recipes; removes Makefile; rewrites dev setup docs for UV/Just.
CI restructuring
.github/workflows/check-code.yml, .github/workflows/check-nix.yml, .github/workflows/tests.yml, .github/workflows/type-checker.yml
Adds multi-Python “Check Code” workflow using uv, ruff, basedpyright, pytest, coverage, build; updates Nix workflow; removes legacy tests and type-checker workflows.
Nix flake updates
/flake.nix
Updates description, moves to nixpkgs unstable, drops poetry2nix, bumps Python to 3.11, updates devShell inputs (adds uv/ruff/basedpyright/just), removes Poetry-based packaging.
Editor/IDE config
.vscode/extensions.json, .vscode/settings.json, .vscode/tasks.json
Updates extension recommendations; adjusts cSpell and disables VS Code type checking; replaces tasks to use basedpyright/ruff and adds “run tests” via just.
Ignore rules
/.gitignore
Scopes .direnv ignore to root and adds local overrides (.local.); documents Nix/direnv section.
Towncrier docs and fragments
/CLAUDE.md, /changes/README.md, /changes/+.misc.md
Adds development guide; documents Towncrier fragment workflow; adds misc fragment noting migration to UV.
Tests
/tests/cli/test_misc.py
Adds tests for treasury-address CLI: a patched unit test and a help-based integration check.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant GH as GitHub
  participant Runner as Ubicloud Runner
  Dev->>GH: Push / PR / Dispatch
  GH->>Runner: Start "Check Code" workflow (matrix py310, py312)
  Runner->>Runner: Checkout repo
  Runner->>Runner: Setup Python (actions/setup-python)
  Runner->>Runner: Setup uv (astral-sh/setup-uv)
  Runner->>Runner: uv sync --frozen
  Runner->>Runner: uv run ruff check / format --check
  Runner->>Runner: uv run basedpyright ./src
  Runner->>Runner: uv run pytest (with coverage)
  Runner->>GH: Upload coverage.xml artifact
  Runner->>Runner: uv build
  Runner-->>GH: Job status per matrix
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I bounced from Poetry to UV’s bright light,
With Just as my drum and Hatchling in flight.
Nix tuned the burrow, CI took the stage—
Ruff kept us tidy, Pyright set the gauge.
Tests squeaked “all clear,” carrots held tight—
Ship it, and hop into night! 🥕🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tooling-update

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@steinerkelvin steinerkelvin changed the title Modernize Development Tooling: Poetry to UV Migration Modernize Development Tooling Aug 18, 2025
@steinerkelvin steinerkelvin requested a review from Copilot August 18, 2025 18:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the development toolchain by migrating from Poetry to UV for dependency management, introduces comprehensive testing infrastructure, and streamlines CI/CD workflows while maintaining full compatibility with existing functionality.

  • Replaced Poetry with UV for 10-100x faster dependency resolution and installation
  • Added comprehensive testing infrastructure with pytest and coverage reporting
  • Introduced Just task runner with 20+ development commands and Towncrier for changelog management

Reviewed Changes

Copilot reviewed 17 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Migrated from Poetry to UV-compatible PEP 621 format with modern tooling configuration
justfile Added comprehensive task runner with 20+ development commands for streamlined workflows
tests/cli/test_misc.py Introduced first test suite with unit and integration tests for treasury-address command
flake.nix Updated Nix configuration to use UV and Just instead of Poetry
changes/README.md Added Towncrier changelog management documentation
README.md Updated setup instructions to focus on UV workflow
CLAUDE.md Added comprehensive 245-line development documentation
.vscode/tasks.json Updated VS Code tasks for new tooling (BasedPyright, Ruff, Just)
.github/workflows/check-code.yml New unified CI workflow using UV with matrix testing
Comments suppressed due to low confidence (1)

justfile:138

  • The coverage source path points to 'src' but the actual source code is in 'src/torusdk'. This may result in incorrect coverage reporting.
# Open the new fragment in $EDITOR instead of passing content:

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

+ update docs with correct Python version

Note: CPython 3.13 incompatible because PyO3
@steinerkelvin steinerkelvin marked this pull request as ready for review August 18, 2025 18:37
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (23)
.vscode/settings.json (2)

22-22: Be explicit about analyzer ownership to avoid confusing duplicate diagnostics.

Setting python.analysis.typeCheckingMode to "off" disables Pylance checks, which is fine if BasedPyright is the only analyzer in use. If some contributors still rely on Pylance, consider adding a short note in CLAUDE.md or keeping this off but clarifying that BasedPyright in CI (and the VS Code extension recommendation) is the source of truth.

Would you like me to add a brief note in CLAUDE.md under “Editor setup” clarifying that Pylance type checking is disabled in-workspace in favor of BasedPyright?


23-25: Remove absolute, user-specific extraPaths.

The hardcoded path is machine-specific and not portable. It can cause noisy editor diagnostics for other contributors.

Apply this diff to remove the personal path:

-    "python.autoComplete.extraPaths": [
-        "/home/manjairo/tcheco/torustrate-interface"
-    ]
.gitignore (1)

1-7: Add Ruff cache to ignores.

Ruff creates a .ruff_cache/ directory that’s safe to ignore and not covered by .cache/.

Apply this diff to include it near the “Local files” section:

 # Local files
 *.local.*
+.ruff_cache/
.github/workflows/check-nix.yml (2)

10-10: Confirm runner label or add actionlint config for self-hosted.

“ubicloud-standard-2” is not a GitHub-hosted label. If you’re targeting a self-hosted runner, ensure that:

  • A runner with this label is registered, and
  • actionlint is configured with this label (to silence the lint warning), or add the generic “self-hosted” label as well.

If you intended to use GitHub-hosted runners, switch to ubuntu-latest.


15-26: Pin GitHub Actions to specific release versions

To ensure stability and avoid unexpected breaking changes, update the workflow to use the latest stable tags:

• File: .github/workflows/check-nix.yml

  • Change
    - uses: DeterminateSystems/nix-installer-action@main
    + uses: DeterminateSystems/nix-installer-action@v19
  • Change
    - uses: DeterminateSystems/flake-checker-action@main
    + uses: DeterminateSystems/flake-checker-action@v12
.envrc (2)

28-43: Add a has uv guard and clearer failure mode

Currently, layout_uv assumes uv is installed. Mirror the robustness of layout_poetry by checking for uv and emitting a helpful error if missing.

Apply this diff:

 layout_uv() {
-    if [[ -d ".venv" ]]; then
+    if ! has uv; then
+        log_error "uv is not installed"
+        return 1
+    fi
+
+    if [[ -d ".venv" ]]; then
         VIRTUAL_ENV="$(pwd)/.venv"
     fi

47-48: Consider uv sync --frozen to catch drift and speed up reloads

Running uv sync on every direnv load can be noisy and may mask lockfile drift. --frozen fails fast if the lock and project are out of sync and avoids needless resolution.

-layout uv
-uv sync
+layout uv
+uv sync --frozen

If you prefer automatic installs only when the environment is missing, keep as-is and rely on uv’s caching.

.vscode/extensions.json (1)

3-8: ms-python.debugpy is likely not a valid VS Code extension ID

Debugpy ships inside the Python extension; there isn’t a standalone Marketplace extension named ms-python.debugpy. This recommendation will show as “unknown” in VS Code.

Apply this diff to remove it:

     "recommendations": [
         "skellock.just",
         // Python
         "ms-python.python",
-        "ms-python.debugpy",
         "detachhead.basedpyright",
         "charliermarsh.ruff"
     ]

Optionally recommend Pylance if you want general IntelliSense alongside BasedPyright:

+        "ms-python.vscode-pylance",
tests/cli/test_misc.py (1)

14-27: Use MagicMock or set enter/exit.return_value for the context manager

The test manually assigns __enter__/__exit__ as plain Mocks. Using MagicMock (or setting .return_value) is safer and avoids subtle context-manager behavior discrepancies.

-        with patch("torusdk.cli.misc.make_custom_context") as mock_context:
-            mock_client = Mock()
+        with patch("torusdk.cli.misc.make_custom_context") as mock_context:
+            mock_client = Mock()
             mock_client.get_dao_treasury_address.return_value = (
                 "5D4x123abc...treasury"
             )
 
-            mock_ctx = Mock()
+            from unittest.mock import MagicMock
+            mock_ctx = MagicMock()
             mock_ctx.com_client.return_value = mock_client
-            mock_ctx.progress_status.return_value.__enter__ = Mock()
-            mock_ctx.progress_status.return_value.__exit__ = Mock()
+            # Ensure context manager methods behave as expected
+            mock_ctx.progress_status.return_value.__enter__.return_value = None
+            mock_ctx.progress_status.return_value.__exit__.return_value = False
             mock_ctx.output = Mock()
CLAUDE.md (1)

88-90: Minor: consistent spacing

Nit: Align spacing for the docs commands for a clean look.

-just docs-build               # Generate documentation files
+just docs-build                # Generate documentation files
README.md (1)

31-35: Nit: wording vs package name (“torus” vs “torusdk”)

Right below, the text says “Install the torus Python package” but the command installs torusdk. Update the wording for consistency.

-Install the `torus` Python package directly with `pip`:
+Install the `torusdk` Python package directly with `pip`:
flake.nix (2)

16-16: Align devShell Python (3.11) with CI matrix (3.10/3.12) to avoid env drift

Dev env uses 3.11 while CI validates 3.10 and 3.12. Consider either adding 3.11 to CI or switching devShell to 3.12 for closer parity.

Option A (align devShell to 3.12):

-        python = pkgs.python311;
+        python = pkgs.python312;

Option B (keep devShell 3.11) — see my separate CI comment to add 3.11 to the matrix.


30-45: No Nix packages exported; verify this is intentional

With packages={}, nix build won’t expose a default package. If you expect “nix build” to work, consider wiring a simple package/app (even a stub) or add a default app that runs “just check”.

Would you like a minimal Nix app stub that runs just targets?

justfile (3)

181-184: Remove duplicate asset copying in docs-build

docs-build repeats docs-copy-assets; it’s redundant.

-docs-build: docs-copy-assets docs-generate
-    mkdir -p ./docs/_build/assets
-    cp -r ./docs/assets ./docs/_build/
-    @echo "Documentation built to ./docs/_build"
+docs-build: docs-copy-assets docs-generate
+    @echo "Documentation built to ./docs/_build"

49-55: Optional: include tests in formatting

Formatting only src excludes tests, which can drift stylistically.

 fmt-check:
-    uv run ruff format --check ./src
+    uv run ruff format --check ./src ./tests

 fmt:
-    uv run ruff format ./src
+    uv run ruff format ./src ./tests

57-63: Optional: lint tests too

Catching issues in tests improves signal in CI.

 lint:
-    uv run ruff check ./src
+    uv run ruff check ./src ./tests
.vscode/tasks.json (2)

7-10: Make typecheck task portable by running via uv

Without Nix devShell or global installs, this may fail. Running via uv guarantees project-pinned tooling.

-            "command": "basedpyright ${file}"
+            "command": "uv run basedpyright ${file}"

12-20: Do the same for Ruff tasks

Use uv to ensure the correct tool version is used consistently.

-            "command": "ruff format ${file}"
+            "command": "uv run ruff format ${file}"
-            "command": "ruff check --fix ${file}"
+            "command": "uv run ruff check --fix ${file}"
.github/workflows/check-code.yml (4)

28-29: Verify Ubicloud runner label availability or provide a fallback

actionlint flags “ubicloud-standard-2” as unknown unless configured. If this repo/org isn’t wired to Ubicloud, consider ubuntu-latest (or 22.04) as a fallback.

Option A (switch to GitHub-hosted Ubuntu):

-    runs-on: ubicloud-standard-2
+    runs-on: ubuntu-22.04

Option B (keep Ubicloud) — add actionlint config for custom labels to silence false positives.


31-34: Optional: include Python 3.11 in the matrix

DevShell uses 3.11 (flake.nix). Adding 3.11 here improves parity and catches 3.11-specific regressions.

         matrix:
-        python-version: ["3.10", "3.12"]
+        python-version: ["3.10", "3.11", "3.12"]

83-86: Enable Towncrier fragment enforcement on PRs

You’ve already got the check scripted; enforcing it on PRs helps maintain changelog hygiene.

-#   - name: Enforce Towncrier fragment on PRs
-#     if: ${{ github.event_name == 'pull_request' }}
-#     run: uv run --python ${{ matrix.python-version }} towncrier check --compare-with origin/main
+      - name: Enforce Towncrier fragment on PRs
+        if: ${{ github.event_name == 'pull_request' }}
+        run: uv run --python ${{ matrix.python-version }} towncrier check --compare-with origin/main

87-88: Avoid nested uv: call uv build directly

uv build is a uv subcommand; running it via “uv run … uv build” is redundant.

-      - name: Build package
-        run: uv run --python ${{ matrix.python-version }} uv build
+      - name: Build package
+        run: uv build
pyproject.toml (1)

88-99: Remove leftover autopep8 configuration to avoid confusion

Ruff is now the formatter; keeping autopep8 config can mislead contributors and tools.

-# configure autopep to not format type ignores !!!
-[tool.autopep8]
-ignore_local_config = true
-aggressive = 2
-in-place = true
-recursive = true
-max_line_length = 80
-ignore = [
-    "E265", # block comment should start with '# '
-    "E501", # line too long
-]
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8685ac8 and 9d80356.

⛔ Files ignored due to path filters (5)
  • docs/assets/favicon.ico is excluded by !**/*.ico
  • docs/assets/logo.png is excluded by !**/*.png
  • flake.lock is excluded by !**/*.lock
  • poetry.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • .envrc (1 hunks)
  • .github/workflows/check-code.yml (1 hunks)
  • .github/workflows/check-nix.yml (1 hunks)
  • .github/workflows/tests.yml (0 hunks)
  • .github/workflows/type-checker.yml (0 hunks)
  • .gitignore (1 hunks)
  • .vscode/extensions.json (1 hunks)
  • .vscode/settings.json (1 hunks)
  • .vscode/tasks.json (1 hunks)
  • CLAUDE.md (1 hunks)
  • Makefile (0 hunks)
  • README.md (4 hunks)
  • changes/+.misc.md (1 hunks)
  • changes/README.md (1 hunks)
  • flake.nix (1 hunks)
  • justfile (1 hunks)
  • pyproject.toml (2 hunks)
  • tests/cli/test_misc.py (1 hunks)
💤 Files with no reviewable changes (3)
  • .github/workflows/tests.yml
  • Makefile
  • .github/workflows/type-checker.yml
🧰 Additional context used
🧬 Code Graph Analysis (1)
tests/cli/test_misc.py (2)
src/torusdk/client.py (1)
  • get_dao_treasury_address (2708-2709)
src/torusdk/cli/_common.py (3)
  • com_client (155-177)
  • progress_status (204-205)
  • output (179-185)
🪛 LanguageTool
changes/README.md

[grammar] ~22-~22: There might be a mistake here.
Context: ...feature**: New features and enhancements - bugfix: Bug fixes - doc: Documenta...

(QB_NEW_EN)


[grammar] ~23-~23: There might be a mistake here.
Context: ...and enhancements - bugfix: Bug fixes - doc: Documentation updates - **removal...

(QB_NEW_EN)


[grammar] ~24-~24: There might be a mistake here.
Context: ...g fixes - doc: Documentation updates - removal: Deprecated feature removals -...

(QB_NEW_EN)


[grammar] ~25-~25: There might be a mistake here.
Context: ...removal: Deprecated feature removals - misc: Miscellaneous changes - **securi...

(QB_NEW_EN)


[grammar] ~26-~26: There might be a mistake here.
Context: ...movals - misc: Miscellaneous changes - security: Security-related fixes ## F...

(QB_NEW_EN)


[grammar] ~31-~31: There might be a mistake here.
Context: ...sue}.{type}.md(e.g.,123.feature.md) - Without issue: +.{type}.md(e.g.,+.b...

(QB_NEW_EN)

CLAUDE.md

[grammar] ~31-~31: There might be a mistake here.
Context: ...V**: Modern Python dependency management - Just: Task runner for development comm...

(QB_NEW_EN)


[grammar] ~32-~32: There might be a mistake here.
Context: ...**: Task runner for development commands - Nix (optional): Provides reproducible ...

(QB_NEW_EN)


[grammar] ~150-~150: There might be a mistake here.
Context: ...ion, dependencies (UV-compatible format) - Build system: Hatchling for modern Pyt...

(QB_NEW_EN)


[grammar] ~151-~151: There might be a mistake here.
Context: ...*: Hatchling for modern Python packaging - Ruff: Linting and formatting settings ...

(QB_NEW_EN)


[grammar] ~152-~152: There might be a mistake here.
Context: ...Ruff*: Linting and formatting settings - BasedPyright: Type checking configurat...

(QB_NEW_EN)


[grammar] ~153-~153: There might be a mistake here.
Context: ...edPyright**: Type checking configuration - Pytest: Test configuration and coverag...

(QB_NEW_EN)


[grammar] ~154-~154: There might be a mistake here.
Context: ...Test configuration and coverage settings - Towncrier: Changelog generation settin...

(QB_NEW_EN)


[grammar] ~155-~155: There might be a mistake here.
Context: ...wncrier**: Changelog generation settings - UV: Default dependency groups configur...

(QB_NEW_EN)


[grammar] ~160-~160: There might be a mistake here.
Context: ... - Line length: 80 characters (Ruff) - Python version: 3.10+ target - **Type ...

(QB_NEW_EN)


[grammar] ~161-~161: There might be a mistake here.
Context: ...Ruff) - Python version: 3.10+ target - Type checking: Strict mode with BasedP...

(QB_NEW_EN)


[grammar] ~162-~162: There might be a mistake here.
Context: ...hecking**: Strict mode with BasedPyright - Import sorting: Handled by Ruff ## CI...

(QB_NEW_EN)


[grammar] ~169-~169: There might be a mistake here.
Context: ...dependency management: - Workflow: .github/workflows/check-code.yml - Matrix testing: Python 3.10, 3.12 - **...

(QB_NEW_EN)


[grammar] ~170-~170: There might be a mistake here.
Context: ... - Matrix testing: Python 3.10, 3.12 - Setup: astral-sh/setup-uv with caching...

(QB_NEW_EN)


[grammar] ~171-~171: There might be a mistake here.
Context: ... astral-sh/setup-uv with caching enabled - Checks: Linting, type checking, testin...

(QB_NEW_EN)


[grammar] ~172-~172: There might be a mistake here.
Context: ...ing, testing, coverage, build validation - PR Requirements: Towncrier fragment mu...

(QB_NEW_EN)


[grammar] ~208-~208: There might be a mistake here.
Context: ...ommand 1. Create the command module in src/torusdk/cli/ 2. Register it in `src/torusdk/cli/init...

(QB_NEW_EN)


[grammar] ~209-~209: There might be a mistake here.
Context: ...in src/torusdk/cli/ 2. Register it in src/torusdk/cli/__init__.py 3. Add tests in tests/cli/ (when tests ar...

(QB_NEW_EN)


[grammar] ~210-~210: There might be a mistake here.
Context: ...in tests/cli/ (when tests are enabled) 4. Create news fragment: `just news feature...

(QB_NEW_EN)


[grammar] ~211-~211: There might be a mistake here.
Context: ...s are enabled) 4. Create news fragment: just news feature "Add new command" 5. Update documentation if needed ### Upda...

(QB_NEW_EN)


[grammar] ~234-~234: There might be a mistake here.
Context: ... 1. Import errors: Ensure you have activated UV environment (uv sync) or are in Ni...

(QB_NEW_EN)


[grammar] ~234-~234: There might be a mistake here.
Context: ...vated UV environment (uv sync) or are in Nix development shell 2. **Type checkin...

(QB_NEW_EN)

🪛 actionlint (1.7.7)
.github/workflows/check-code.yml

28-28: label "ubicloud-standard-2" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

.github/workflows/check-nix.yml

10-10: label "ubicloud-standard-2" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🔇 Additional comments (16)
.vscode/settings.json (1)

3-20: CSpell additions align with repo tooling (LGTM).

Entries for basedpyright, towncrier, pdoc, typeguard, etc., are appropriate and reduce false positives in-editor.

changes/+.misc.md (1)

1-1: Towncrier fragment looks correct (LGTM).

Filename and single-line content follow the documented convention for a misc orphan fragment.

.github/workflows/check-nix.yml (1)

15-15: Checkout v4 upgrade (LGTM).

actions/checkout@v4 is current and improves performance/security.

changes/README.md (1)

1-52: Clear, actionable Towncrier fragment guide (LGTM).

Conventions, commands, and processing flow are well documented and match the justfile/pyproject setup in this PR.

tests/cli/test_misc.py (3)

28-33: LGTM: solid unit test of happy-path behavior

Good verification of exit code, DAO method call count, and printed output. The runner-based invocation keeps this as a true CLI test without network dependency.


34-43: Nice registration check via --help

This is a simple, effective integration-style check to ensure the command is wired into the app and doesn’t require network access. Good balance.


14-15: Patch target verified – no changes needed

The function make_custom_context is imported directly in src/torusdk/cli/misc.py via

from torusdk.cli._common import make_custom_context

so patch("torusdk.cli.misc.make_custom_context") correctly intercepts all calls.

README.md (3)

15-16: LGTM: Navigation now reflects pip install focus

Hiding the Nix install link in ToC while keeping the section commented below is a pragmatic choice.


47-54: LGTM: Nix install section hidden, but preserved

Keeping the Nix section in comments is useful for future restoration without confusing users today.


172-207: Great addition: concise UV/Just development quickstart and Nix alternative

This aligns well with the new tooling and gives contributors a clear starting path. Linking to CLAUDE.md is a nice touch.

flake.nix (1)

21-28: DevShell inputs look solid and match the new tooling

just/uv/ruff/basedpyright in the devShell is consistent with the migration. Good cleanup removing Poetry.

.github/workflows/check-code.yml (1)

3-5: Good: minimal GITHUB_TOKEN permissions set

This addresses prior security guidance to limit default token permissions.

pyproject.toml (4)

1-12: Project metadata migration looks correct

Hatchling config and PEP 621 fields are well-formed. Authors/license/readme/classifiers look good.


40-55: Build-system + dev tooling sections LGTM

Hatchling, uv default groups, and Towncrier integration are consistent with the rest of the PR.


8-8: Confirm docs/README reflect supported Python versions (3.10–3.12)

This matches requires-python and CI. Make sure README/docs were updated accordingly.


14-35: Confirm torustrateinterface availability

Verified that torustrateinterface v0.1.0 is published on PyPI. Ensure your CI can resolve this dependency; to guarantee reproducible builds, consider pinning to torustrateinterface==0.1.0 or documenting its source if it’s a private/forked package.

Comment on lines +129 to +145
```text
torusdk/
├── src/torusdk/ # Main package source
│ ├── cli/ # CLI command implementations
│ ├── compat/ # Compatibility utilities
│ ├── faucet/ # Faucet functionality
│ ├── types/ # Type definitions
│ └── util/ # Utility modules
├── nix/ # Nix configuration files
├── changes/ # Towncrier news fragments
├── tests/ # Test files (currently empty)
├── pyproject.toml # Python project configuration
├── poetry.lock # Dependency lockfile
├── flake.nix # Nix flake configuration
└── justfile # Task runner recipes
```

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Project structure is out of date: poetry.lock listed, tests marked “currently empty”

Given this PR removes Poetry and adds tests/cli/test_misc.py, this section is misleading. Replace poetry.lock with uv.lock and note that tests exist.

Apply this diff:

 torusdk/
 ├── src/torusdk/           # Main package source
 │   ├── cli/              # CLI command implementations
 │   ├── compat/           # Compatibility utilities
 │   ├── faucet/           # Faucet functionality
 │   ├── types/            # Type definitions
 │   └── util/             # Utility modules
 ├── nix/                  # Nix configuration files
 ├── changes/              # Towncrier news fragments
-├── tests/                # Test files (currently empty)
+├── tests/                # Test files (e.g., CLI tests under tests/cli/)
 ├── pyproject.toml        # Python project configuration
-├── poetry.lock           # Dependency lockfile
+├── uv.lock               # Dependency lockfile (UV)
 ├── flake.nix            # Nix flake configuration
 └── justfile             # Task runner recipes
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```text
torusdk/
├── src/torusdk/ # Main package source
│ ├── cli/ # CLI command implementations
│ ├── compat/ # Compatibility utilities
│ ├── faucet/ # Faucet functionality
│ ├── types/ # Type definitions
│ └── util/ # Utility modules
├── nix/ # Nix configuration files
├── changes/ # Towncrier news fragments
├── tests/ # Test files (currently empty)
├── pyproject.toml # Python project configuration
├── poetry.lock # Dependency lockfile
├── flake.nix # Nix flake configuration
└── justfile # Task runner recipes
```
torusdk/
├── src/torusdk/ # Main package source
│ ├── cli/ # CLI command implementations
│ ├── compat/ # Compatibility utilities
│ ├── faucet/ # Faucet functionality
│ ├── types/ # Type definitions
│ └── util/ # Utility modules
├── nix/ # Nix configuration files
├── changes/ # Towncrier news fragments
├── tests/ # Test files (e.g., CLI tests under tests/cli/)
├── pyproject.toml # Python project configuration
├── uv.lock # Dependency lockfile (UV)
├── flake.nix # Nix flake configuration
└── justfile # Task runner recipes
🤖 Prompt for AI Agents
In CLAUDE.md around lines 129 to 145, the project tree is outdated: it still
lists poetry.lock and describes tests as “currently empty” despite this PR
removing Poetry and adding tests/cli/test_misc.py. Update the listing to replace
"poetry.lock" with "uv.lock" and change the tests line to indicate that test
files now exist (e.g., mention tests/cli/test_misc.py or state "Test files
(includes CLI tests)"). Ensure the updated tree and brief note reflect the new
lockfile and the presence of tests.

Comment on lines +160 to +164
- **Line length**: 80 characters (Ruff)
- **Python version**: 3.10+ target
- **Type checking**: Strict mode with BasedPyright
- **Import sorting**: Handled by Ruff

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Align Python version with supported range (3.10–3.12)

Docs elsewhere in this PR (README) and PR description state support for 3.10–3.12. Update this section to match.

-- **Python version**: 3.10+ target
+- **Python version**: 3.10–3.12 target
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Line length**: 80 characters (Ruff)
- **Python version**: 3.10+ target
- **Type checking**: Strict mode with BasedPyright
- **Import sorting**: Handled by Ruff
- **Line length**: 80 characters (Ruff)
- **Python version**: 3.10–3.12 target
- **Type checking**: Strict mode with BasedPyright
- **Import sorting**: Handled by Ruff
🧰 Tools
🪛 LanguageTool

[grammar] ~160-~160: There might be a mistake here.
Context: ... - Line length: 80 characters (Ruff) - Python version: 3.10+ target - **Type ...

(QB_NEW_EN)


[grammar] ~161-~161: There might be a mistake here.
Context: ...Ruff) - Python version: 3.10+ target - Type checking: Strict mode with BasedP...

(QB_NEW_EN)


[grammar] ~162-~162: There might be a mistake here.
Context: ...hecking**: Strict mode with BasedPyright - Import sorting: Handled by Ruff ## CI...

(QB_NEW_EN)

🤖 Prompt for AI Agents
In CLAUDE.md around lines 160 to 164, the Python version note currently reads
"3.10+ target" but must explicitly state the supported range 3.10–3.12 to match
README and PR description; update the line to state the supported versions
(e.g., "Python version: 3.10–3.12 target") or equivalent wording so the docs are
consistent across the PR.

Comment on lines +167 to +174
uv run pdoc torusdk \
--docformat google \
--output-directory ./docs/_build \
--favicon /assets/favicon.ico \
--logo-link https://github.com/renlabs-dev/torusdk \
--logo /assets/logo.png \
--edit-url torusdk=https://github.com/renlabs-dev/torusdk/blob/main/src/torusdk/

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Fix pdoc asset paths: current absolute paths likely break

Using “/assets/…” will resolve to the filesystem root and likely fail. Use repo-relative paths so pdoc can embed/copy them.

 docs-generate:
     uv run pdoc torusdk \
         --docformat google \
         --output-directory ./docs/_build \
-        --favicon /assets/favicon.ico \
+        --favicon ./docs/assets/favicon.ico \
         --logo-link https://github.com/renlabs-dev/torusdk \
-        --logo /assets/logo.png \
+        --logo ./docs/assets/logo.png \
         --edit-url torusdk=https://github.com/renlabs-dev/torusdk/blob/main/src/torusdk/
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uv run pdoc torusdk \
--docformat google \
--output-directory ./docs/_build \
--favicon /assets/favicon.ico \
--logo-link https://github.com/renlabs-dev/torusdk \
--logo /assets/logo.png \
--edit-url torusdk=https://github.com/renlabs-dev/torusdk/blob/main/src/torusdk/
docs-generate:
uv run pdoc torusdk \
--docformat google \
--output-directory ./docs/_build \
--favicon ./docs/assets/favicon.ico \
--logo-link https://github.com/renlabs-dev/torusdk \
--logo ./docs/assets/logo.png \
--edit-url torusdk=https://github.com/renlabs-dev/torusdk/blob/main/src/torusdk/
🤖 Prompt for AI Agents
In justfile around lines 167 to 174 the pdoc asset paths use absolute paths
("/assets/...") which resolve to the filesystem root and will break; update the
flags to use repository-relative paths (for example "./assets/favicon.ico" and
"./assets/logo.png" or "assets/favicon.ico") so pdoc can locate and embed/copy
them, and confirm the assets exist at that relative location in the repo.

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.

2 participants