8000 Skip requirements with inapplicable markers, vol. 2 by danielhollas · Pull Request #561 · aiidalab/aiidalab · GitHub
[go: up one dir, main page]

Skip to content

Skip requirements with inapplicable markers, vol. 2 - #561

Merged
danielhollas merged 1 commit into
mainfrom
claude-fix-2
Oct 19, 2026
Merged

danielhollas merged 1 commit into
mainfrom
claude-fix-2

Conversation

@danielhollas
@danielhollas danielhollas commented Oct 18, 2026 •
Copy link
Copy Markdown
Contributor

Follow-up to #532, turns out I haven't been thorough enough and that PR did not fully worked in all cases.

_find_incompatibilities_python now skips any requirement whose marker doesn't apply before looking up the package. A requirement like pywin32; sys_platform == 'win32' on Linux no longer makes the app incompatible.

Fixes point 3 in #559

Testing

I've tested manually by adding pywin32; sys_platform == 'win32' as a dependency and seeing the app became incompatible on main branch, which remains compatible on this PR.

image

@danielhollas
danielhollas added this pull request to stack #562 October 18, 2026 23:10
@codecov
codecov Bot commented Oct 18, 2026 •
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.26%. Comparing base (326e214) to head (6c141c7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #561      +/-   ##
==========================================
+ Coverage   79.23%   79.26%   +0.02%     
==========================================
  Files          18       18              
  Lines        1763     1765       +2     
==========================================
+ Hits         1397     1399       +2     
  Misses        366      366              
Flag Coverage Δ
py-3.12 79.26% <100.00%> (+0.02%) ⬆️
py-3.14 79.16% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from claude-fix-1 to main October 19, 2026 08:06
Follow-up to #532

_find_incompatibilities_python now skips any requirement whose marker
doesn't 
8000
apply before looking up the package.
A requirement like pywin32; sys_platform == 'win32' on Linux
no longer makes the app incompatible.
@danielhollas
danielhollas marked this pull request as ready for review October 19, 2026 08:30
Comment thread aiidalab/app.py
if requirement.marker and not requirement.marker.evaluate():
continue
pkg = get_package_by_name(packages, requirement.name)
if pkg is None or not pkg.fulfills(requirement):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pkg.fullfils already has the correct marker logic, but I missed that this or expression is short-circuited if the package is not present in the current python environment.

@edan-bainglass edan-bainglass left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Good catch

@danielhollas
Copy link
Copy Markdown
Contributor Author

LGTM! Good catch

Good catch by Claude indeed. 😅 I'm in the middle of existential crisis, but at least aiidalab package will be super robust! 🤣

@danielhollas
danielhollas merged commit f828875 into main Oct 19, 2026
9 checks passed
@danielhollas
danielhollas deleted the claude-fix-2 branch October 19, 2026 08:39
@danielhollas danielhollas added the bug Something isn't working label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0