-
Notifications
You must be signed in to change notification settings - Fork 21
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 lowest-direct dependency resolution #163
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #163 +/- ##
=======================================
Coverage 83.09% 83.09%
=======================================
Files 9 9
Lines 1479 1479
Branches 319 319
=======================================
Hits 1229 1229
Misses 214 214
Partials 36 36 ☔ View full report in Codecov by Sentry. |
Closes #157 |
@@ -48,7 +52,7 @@ jobs: | |||
- name: Setup Python | |||
uses: actions/setup-python@v5 | |||
with: | |||
python-version: ${{ matrix.python-version }}${{ matrix.dev }} | |||
python-version: ${{ matrix.version.python }}${{ matrix.dev }} |
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.
Thanks @abhardwaj73 ! Studying the pymatgen
PR more closely, I was about to say that you need to pass the resolution
argument into the matrix call here, e.g.
name: Install dependencies
run: |
pip install uv
uv pip install '.[${{ matrix.version.extras }}]' --system --resolution=${{ matrix.version.resolution }}
But then I realized that pymatgen
is using uv
, not pip
to install dependencies, and that package is what's receiving the argument (not pip
- pip
actually doesn't have a resolution
option).
I was not familiar with uv, but it appears to be a much faster alternative to pip, much like how ruff
is a much faster linter than flake8
or pycodestyle
. It could be beneficial to use in unit tests because it will make them run faster (by installing deps faster). Plus obviously make it possible to use these different resolution strategies.
Can you update this to install uv
, similar to the pymatgen
workflow, and then pass it the resolution argument?
Added uv and resolution parameter. I'm not sure if we need to keep |
Thanks @abhardwaj73 ! I see what you're asking; I think a small change is still needed. So in this line
the bit
Much like So since extras=strict, In pyEQL, we don't have a On a related note, I don't think the variable Please adjust as you see fit and then I'll merge. Ultimately we'll just have to see what happens when |
Actually, I didn't sync my code with the last PR (Sean's log edit) |
Removing this line was not causing the tests to pass, I think it is important. |
Either way is OK, since you are working on different parts of the code.
I see why you thought that. I looked at the test failure and it's actually caused by something different (which I need to figure out how to fix). TL;DR - I recently added parallelization to the unit tests, and this seems to be causing intermittent, non-reproducible problems in the cases where multiple threads are trying to access the same file. If I manually re-run the failed test, it usually works. Anyway, there's no way you would know this; I just have seen it enough times that it's familiar. This is a good reminder to investigate. I'll merge and let's see what happens! |
OK, not working yet - https://github.com/KingsburyLab/pyEQL/actions/runs/10293990190. there's another instance of |
Summary
Major changes:
instead of:
python-version: ['3.9', '3.10', '3.11']
similar to in materialsproject/jobflow#640 (comment)
Todos
If this is not the right approach, @rkingsbury please let me know