Skip to content

Conversation

@afuetterer
Copy link
Contributor

What does this PR do?

This is a new version of #2082. The PR adds the setup-uv GHA to install uv and setup the python version from the matrix.

To still use the make check, I needed to add activate-environment: true, otherwise there is no pytest in PATH. Another solution would to call uv run pytest instead of make check.

Before submitting

  • This PR fixes a typo or improves the docs (if yes, ignore all other checks!).
  • Did you read the contributor guideline?
  • Was this discussed/approved via a Github issue? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes (if applicable)?
  • Did you write any new necessary tests?

@afuetterer afuetterer marked this pull request as draft October 23, 2025 08:57
@afuetterer
Copy link
Contributor Author

Install step is already a lot faster.

@afuetterer
Copy link
Contributor Author

afuetterer commented Oct 23, 2025

Need to add enable-cache: "false".

Edit: I checked in my fork. setup-uv caches the uv installation per default settings, it runs prune cache per default settings as well. So the cache does not include downloaded pypi packages (which would be huge for this project).

/opt/hostedtoolcache/uv/0.9.5/x86_64/uv cache prune --ci --force
Pruning cache at: /home/runner/work/_temp/setup-uv-cache
Removed 28282 files (7.1GiB)

Ref: https://github.com/MaartenGr/BERTopic/actions/runs/18743018909/job/53463656594

So the caching can stay enabled as "auto", I guess.

This switch to setup-uv gets you ~2 minutes faster CI times. I think it's a win.

@afuetterer afuetterer marked this pull request as ready for review October 23, 2025 09:17
@afuetterer
Copy link
Contributor Author

afuetterer commented Nov 3, 2025

I also added a uv tree --outdated to the CI run. It adds 0 seconds to the time.

This might be useful for debugging which packages / dependencies are installed in CI to pinpoint issues due to dependencies.

What do you think?

Truncated output:

Run uv tree --outdated
Resolved 228 packages in 0.78ms
bertopic v0.17.3
├── hdbscan v0.8.40
│   ├── joblib v1.5.2
│   ├── numpy v2.1.3 (latest: v2.2.6)
│   ├── scikit-learn v1.7.2
│   │   ├── joblib v1.5.2
│   │   ├── numpy v2.1.3
│   │   ├── scipy v1.15.3
│   │   │   └── numpy v2.1.3
│   │   └── threadpoolctl v3.6.0
│   └── scipy v1.15.3 (*)
...

@MaartenGr
Copy link
Owner

Good idea adding the tree here! That is going to help so much with debugging all of this. Nice features all around, thank you for your work on this.

@MaartenGr MaartenGr merged commit 92d269a into MaartenGr:master Nov 11, 2025
5 checks passed
@afuetterer afuetterer deleted the uv branch November 11, 2025 12:49
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