Skip to content

Commit

Permalink
fix(artschema): bugfix in pkg reqs check with markers
Browse files Browse the repository at this point in the history
Tweak pkg reqs regexp to ignore markers if there are any between the version specifier and the extra group name. This fixes the verification of artifact schema requirements if the required package has specifiers.
  • Loading branch information
lariel-fernandes committed Dec 28, 2024
1 parent f6e0783 commit 59026b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mlopus/utils/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Patterns:
- mlopus[kedro,search]~=1.0.5; extra == "pipelines"
"""

EXTRA_REQ = re.compile(r'^(?P<pkg>[\w.-]+)(\[(?P<extras>.*)])?(?P<specifier>.*); extra == "(?P<extra>\S+)"$')
EXTRA_REQ = re.compile(r'^(?P<pkg>[\w.-]+)(\[(?P<extras>.*)])?(?P<specifier>[^;]*).*; extra == "(?P<extra>\S+)"$')


def get_dist(name: str, strict: bool = True) -> Dist | None:
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 59026b7

Please sign in to comment.