-
-
Notifications
You must be signed in to change notification settings - Fork 28
Fix non-reproducible installs by locking dependencies (closes #101) #104
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
base: master
Are you sure you want to change the base?
Conversation
This commit introduces reproducible builds to the openTEPES project. It replaces the previous dependency management files (`requirements.txt`, `environment.yaml`) with a modern `pyproject.toml`-based approach. It introduces `uv` to generate a `requirements.lock` file, which pins all direct and transitive dependencies to exact versions. The installation instructions in `README.rst` are also correctly updated to use this new lock file. This directly addresses the problem of non-reproducible environments described in issue #101.
This commit updates the GitHub Actions workflow to use `uv` for installing dependencies from the `requirements.lock` file. This change ensures that the CI environment is consistent with the new dependency management system.
…ucible-builds-14609547659915451716
…-builds-14609547659915451716 Feat: Add reproducible builds using uv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes non-reproducible installation issues by consolidating dependency management to a single locked requirements file. It removes the parallel environment.yaml and requirements.txt files that could drift, implements locked dependencies via requirements.lock, and updates the CI workflow to use deterministic installs with uv.
Changes:
- Consolidated dependency management to use
requirements.lockfor reproducible installs - Added version constraints to all dependencies in
pyproject.tomlto prevent unexpected updates - Updated CI workflow to use modern actions and install dependencies from the lock file
- Fixed CSV file encoding issues (removed BOM characters)
Reviewed changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Added version upper bounds to all dependencies and included uv as build requirement for deterministic installs |
| .github/workflows/python-package-conda.yml | Modernized CI workflow to use uv for locked dependency installation and updated to use newer action versions |
| README.rst | Updated installation instructions to reference requirements.lock instead of using direct pip install |
| openTEPES/sSEP/oT_Data_Stage_sSEP.csv | Removed BOM character from CSV header |
| openTEPES/sSEP/oT_Data_RESEnergy_sSEP.csv | Removed BOM character from CSV header |
| openTEPES/9n/oT_Data_Stage_9n.csv | Removed BOM character from CSV header |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Erik, |
The workflow is based on Linux and is functioning correctly. However, testing on Windows is still missing. I will try to include this as well. |
|
I already added a sequence in the workflow to include win64, and macOS, as well as Python 3.13, and it is working well. But still, I suggest incorporating these changes after your seminar. |
|
I will test in Google Colab çthe new version and see what happens |
This PR addresses the non-reproducible installation issues reported in #101.
environment.yamlandrequirements.txtto avoid parallel, drifting install pathsrequirements.lock) for deterministic installsNo changes to model logic or results.
Closes #101.