Skip to content

Conversation

not-matthias
Copy link
Member

No description provided.

@not-matthias not-matthias force-pushed the cod-605-mitigate-python-installation-with-uv branch from 5b91bf8 to 72d5f05 Compare May 27, 2025 18:12
@not-matthias
Copy link
Member Author

I feel like a shell script might make the logic of finding the dir and creating the symlink a bit more clear. The downside is that we won't have direct insights into what failed. However, we could add some stderr logs which we can show in case of a crash/fail.

@art049 @GuillaumeLagrange wdyt?

@not-matthias not-matthias force-pushed the cod-605-mitigate-python-installation-with-uv branch from 72d5f05 to 0c95d86 Compare May 28, 2025 13:52
@not-matthias
Copy link
Member Author

A few changes:

  • Decided to write the logic in bash, which makes it much less verbose and easier to test and develop (can just copy it to a shell script and run it locally).
  • Added a message that is always displayed when the script runs successfully (even if no symlink was applied). I feel like it's not worth it to add an extra exit code that determines whether a symlink was created since the symlink won't really cause anything to crash.
(reflex-perf) [15:50] not-matthias:reflex-perf (main)> codspeed run -- pytest tests/benchmarks/ 
Unofficially supported system: nixos 25.05. Continuing with best effort support.

►►► Preparing the environment
Valgrind is already installed with the correct version, skipping installation
Successfully added symlink for libpython in the venv                                             <-- added
Environment ready
  • Checking for both uv python find and python3 in the path to make sure we find the right venv.

@not-matthias not-matthias requested a review from art049 May 28, 2025 13:56
Copy link
Member

@art049 art049 left a comment

Choose a reason for hiding this comment

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

That's nice, yes. It seems better to have this logic in a shell script. Can you include it using include! so we can benefit from syntax highlighting and linting (I use shellcheck locally, for example. We probably don't need to include this lint in CI, though.

@not-matthias not-matthias force-pushed the cod-605-mitigate-python-installation-with-uv branch 2 times, most recently from ae7bc14 to 940e5ca Compare May 28, 2025 14:18
@not-matthias not-matthias requested a review from art049 May 28, 2025 14:18
Copy link
Member

@art049 art049 left a comment

Choose a reason for hiding this comment

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

looks good

@art049
Copy link
Member

art049 commented May 28, 2025

we might have to refine a bit the way we find the Python executables we need to patch but this will do for now !

@not-matthias not-matthias force-pushed the cod-605-mitigate-python-installation-with-uv branch from 940e5ca to a6e9d2c Compare May 28, 2025 15:37
@not-matthias not-matthias merged commit a6e9d2c into main May 28, 2025
9 checks passed
@not-matthias not-matthias deleted the cod-605-mitigate-python-installation-with-uv branch May 28, 2025 15:44
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