Skip to content

Conversation

@fdxmw
Copy link
Member

@fdxmw fdxmw commented Oct 31, 2025

Migrating to uv has several advantages:

  • The new workflow is significantly faster. On my computer:

    $ # New workflow
    $ uv run just tests
    ...
    real    0m11.830s
    user    1m31.411s
    sys     0m7.255s
    
    $ # Old workflow
    $ tox
    ...
    real    0m19.537s
    user    2m2.577s
    sys     0m7.972s
    
  • uv manages installation of the appropriate versions of Python and all pip
    packages, greatly simplifying the creation of PyRTL development
    environments

  • This pins all developer tools to specific versions. Previously we only pinned
    documentation tools. This avoids confusing situations where lint errors
    suddenly appear just because a new version of ruff was released.

To run all tests with the new workflow:

$ uv run just tests

To build documentation with the new workflow:

$ uv run just docs

This replaces the old tox based workflow with a new just based workflow. tox is no longer needed since uv manages all virtual environments. just is used instead, as a simple portable task runner.

* The new workflow is significantly faster on my computer:
  ```
  $ # New workflow
  $ uv run just tests
  ...
  real    0m11.830s
  user    1m31.411s
  sys     0m7.255s
  ```

  ```
  $ # Old workflow
  $ tox
  ...
  real    0m19.537s
  user    2m2.577s
  sys     0m7.972s
  ```
* `uv` manages installation of the appropriate versions of Python and all pip
  packages, greatly simplifying the  creation of PyRTL development
  environments
* This pins all developer tools to specific versions. Previously we only pinned
  documentation tools. This avoids confusing situations where lint errors
  suddenly appear just because a new version of `ruff` was released.

To run all tests with the new workflow:

```
$ uv run just tests
```

To build documentation with the new workflow:

```
$ uv run just docs
```

This replaces the old `tox` based workflow with a new `just` based workflow.
`tox` is no longer needed since `uv` manages all virtual environments. `just`
is used instead, as a simple portable task runner.
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.5%. Comparing base (001fba1) to head (b2c8380).
⚠️ Report is 1 commits behind head on development.

Additional details and impacted files
@@              Coverage Diff              @@
##           development    #476     +/-   ##
=============================================
+ Coverage         91.0%   91.5%   +0.6%     
=============================================
  Files               25      25             
  Lines             7091    7091             
=============================================
+ Hits              6450    6488     +38     
+ Misses             641     603     -38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fdxmw
Copy link
Member Author

fdxmw commented Oct 31, 2025

This PR significantly changes the PyRTL developer workflow, but I think the advantages are worth it. Please let me know if you have questions or comments, otherwise I'll merge this in about a week.

…nheritance_diagram`. Also:

Add a `presubmit` target to the `justfile`, which just runs both `tests` and
`docs`. Add some documentation on running the `presubmit` workflow before
sending a pull request.
@fdxmw fdxmw merged commit 1c06c9e into UCSBarchlab:development Nov 8, 2025
4 checks passed
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