UW-Madison-DSI / ospo.wisc.edu

Web site for the University of Wisconsin-Madison Open Source Program Office (using the UW Jekyll Theme)
https://ospo.wisc.edu/
MIT License
0 stars 2 forks source link

pixi use questions #27

Open matthewfeickert opened 2 months ago

matthewfeickert commented 2 months ago

The pixi.lock file currently contains a complete description of your python environment and is over 6000 lines and 200KB. Is there a way to streamline this - perhaps by creating the lock file within a minimalist virtual environment?

Originally posted by @amegahed in https://github.com/UW-Madison-DSI/ospo.wisc.edu/issues/26#issuecomment-2273677342

matthewfeickert commented 2 months ago

The pixi.lock file currently contains a complete description of your python environment and is over 6000 lines and 200KB.

@amegahed The pixi environment does not involve Python at all

$ git grep "python" -- pixi.lock  # no output

pixi it is a general dependency management tool that focuses on using package indexes that Python packages use often (PyPI and conda-forge) but there is no requirement for Python. This is a Ruby project, and so there are only Ruby dependencies and then external dependencies of Ruby Gems. For example

https://github.com/UW-Madison-DSI/ospo.wisc.edu/blob/c300fab4d5a53d1da9cd6d2146958055ea45498b/Gemfile#L8

brings an external dependency of ImageMagick, which needs to be accounted for in the pixi project

https://github.com/UW-Madison-DSI/ospo.wisc.edu/blob/c300fab4d5a53d1da9cd6d2146958055ea45498b/pixi.toml#L29

As I mentioned in https://github.com/UW-Madison-DSI/ospo.wisc.edu/pull/18#issuecomment-2271352662, the pixi.lock file is also not something that humans are going to maintain or edit directly, so the file length isn't something to be concerned about.

Is there a way to streamline this - perhaps by creating the lock file within a minimalist virtual environment?

No. Lock files are by design going to be large even if they only describe minimal requirements, like this one does.

I'm also not clear on why this is an issue for this project. If you use some set of commands like shown here https://stackoverflow.com/questions/10622179/how-to-find-identify-large-commits-in-git-history to find the largest files in every commit in the repo and grep on pixi.lock you get

5231d844427a  100KiB pixi.lock
1dae21da8b88  195KiB pixi.lock

but those aren't even in the top 30 largest. So no git operations slow down is happening because of pixi.