From 59026b7696dbb02dbd53f495c55b4990b3944a32 Mon Sep 17 00:00:00 2001 From: Lariel Fernandes Date: Sat, 28 Dec 2024 17:33:07 +0100 Subject: [PATCH] fix(artschema): bugfix in pkg reqs check with markers 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. --- src/mlopus/utils/packaging.py | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mlopus/utils/packaging.py b/src/mlopus/utils/packaging.py index e131bfc..7b148b1 100644 --- a/src/mlopus/utils/packaging.py +++ b/src/mlopus/utils/packaging.py @@ -23,7 +23,7 @@ class Patterns: - mlopus[kedro,search]~=1.0.5; extra == "pipelines" """ - EXTRA_REQ = re.compile(r'^(?P[\w.-]+)(\[(?P.*)])?(?P.*); extra == "(?P\S+)"$') + EXTRA_REQ = re.compile(r'^(?P[\w.-]+)(\[(?P.*)])?(?P[^;]*).*; extra == "(?P\S+)"$') def get_dist(name: str, strict: bool = True) -> Dist | None: diff --git a/uv.lock b/uv.lock index fdb72ac..57d9aa9 100644 --- a/uv.lock +++ b/uv.lock @@ -1408,7 +1408,7 @@ wheels = [ [[package]] name = "mlopus" -version = "1.3.0" +version = "1.3.1" source = { editable = "." } dependencies = [ { name = "dacite" },