Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyproject.toml, with pixi as project management tool. add pixi.lock #1459

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

jlnav
Copy link
Member

@jlnav jlnav commented Nov 5, 2024

Helps address #1444

This adds a pyproject.toml to replace setup.py, which the Python community dramatically encourages.

For project management I chose Pixi (https://pixi.sh/latest/):

  • Can install/interact with both conda and PyPI packages. For example, I can specify mpich as a dev dependency without having to say "install pydantic with pip and mpich with conda".
  • Can split dependencies/packages into project-inherent "environments". Use pixi install -e dev to use the dev environment. With the lockfile included we're all guaranteed to get a working environment since the lockfile was resolved earlier.
  • Very fast rust backend.
  • Installing a package documents/adds that install in the pyproject.toml.
  • Platform-specific dependencies can be specified to only install on that platform. e.g. us linux people that install the project will get gpcam. As a macOS user I automatically get a different clang from conda-forge I use with mpicc.

This does not mean that users need Pixi, and y'all don't need it either.

@jlnav jlnav marked this pull request as ready for review November 5, 2024 17:57
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.09%. Comparing base (de910fb) to head (393f9d4).
Report is 15 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #1459       +/-   ##
============================================
+ Coverage    78.38%   91.09%   +12.70%     
============================================
  Files           76       76               
  Lines         7680     7680               
  Branches      1354     1354               
============================================
+ Hits          6020     6996      +976     
+ Misses        1463      513      -950     
+ Partials       197      171       -26     

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

@jmlarson1
Copy link
Member

I'd check the instances of setup.py being used/referred. From the root libE directory, run

grep -ir --include=*.* "setup\.py"

@jlnav
Copy link
Member Author

jlnav commented Nov 7, 2024

Noting that a very minimal setup.py has been added back. But it'll never need to be updated.

@jlnav
Copy link
Member Author

jlnav commented Nov 7, 2024

More information about pixi.lock:

https://pixi.sh/latest/features/lockfile/#how-to-use-a-lock-file

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