zenml-nightly 0.81.0.dev20250417__py3-none-any.whl → 0.81.0.dev20250419__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
zenml/VERSION CHANGED
@@ -1 +1 @@
1
- 0.81.0.dev20250417
1
+ 0.81.0.dev20250419
@@ -16,6 +16,7 @@
16
16
  import os
17
17
  import re
18
18
  from typing import Any, Dict, List, Optional
19
+ from urllib.parse import urlparse
19
20
  from uuid import uuid4
20
21
 
21
22
  import requests
@@ -237,19 +238,37 @@ class GitHubCodeRepository(BaseCodeRepository):
237
238
  Returns:
238
239
  Whether the remote url is correct.
239
240
  """
241
+ # Normalize repository information
240
242
  host = self.config.host or "github.com"
241
243
  host = host.rstrip("/")
242
-
243
- https_url = (
244
- f"https://{host}/{self.config.owner}/{self.config.repository}.git"
245
- )
246
- if url == https_url:
247
- return True
248
-
249
- ssh_regex = re.compile(
250
- f".*@{host}:{self.config.owner}/{self.config.repository}.git"
251
- )
252
- if ssh_regex.fullmatch(url):
253
- return True
244
+ owner = self.config.owner
245
+ repo = self.config.repository
246
+
247
+ # Clean the input URL by removing any trailing slashes
248
+ url = url.rstrip("/")
249
+
250
+ # Handle HTTPS URLs using urlparse
251
+ parsed_url = urlparse(url)
252
+ if parsed_url.scheme == "https":
253
+ expected_path = f"/{owner}/{repo}"
254
+ actual_path = parsed_url.path.removesuffix(".git")
255
+ return parsed_url.hostname == host and actual_path == expected_path
256
+
257
+ # Create regex patterns for non-HTTPS URL formats
258
+ patterns = [
259
+ # SSH format: git@github.com:owner/repo[.git]
260
+ rf"^[^@]+@{re.escape(host)}:{re.escape(owner)}/{re.escape(repo)}(\.git)?$",
261
+ # Alternative SSH: ssh://git@github.com/owner/repo[.git]
262
+ rf"^ssh://[^@]+@{re.escape(host)}/{re.escape(owner)}/{re.escape(repo)}(\.git)?$",
263
+ # Git protocol: git://github.com/owner/repo[.git]
264
+ rf"^git://{re.escape(host)}/{re.escape(owner)}/{re.escape(repo)}(\.git)?$",
265
+ # GitHub CLI: gh:owner/repo
266
+ rf"^gh:{re.escape(owner)}/{re.escape(repo)}$",
267
+ ]
268
+
269
+ # Try matching against each pattern
270
+ for pattern in patterns:
271
+ if re.match(pattern, url):
272
+ return True
254
273
 
255
274
  return False
@@ -178,23 +178,25 @@ class GitLabCodeRepository(BaseCodeRepository):
178
178
  """
179
179
  host = self.config.host or "gitlab.com"
180
180
  host = host.rstrip("/")
181
+ group = self.config.group
182
+ project = self.config.project
181
183
 
184
+ # Handle HTTPS URLs
182
185
  parsed_url = urlparse(url)
183
- if (
184
- parsed_url.scheme == "https"
185
- and parsed_url.hostname == host
186
- and parsed_url.path
187
- == f"/{self.config.group}/{self.config.project}.git"
188
- ):
189
- return True
186
+ if parsed_url.scheme == "https" and parsed_url.hostname == host:
187
+ # Remove .git suffix if present for comparison
188
+ expected_path = f"/{group}/{project}"
189
+ actual_path = parsed_url.path.removesuffix(".git")
190
+ return actual_path == expected_path
190
191
 
192
+ # Handle SSH URLs
191
193
  ssh_regex = re.compile(
192
194
  r"^(?P<scheme_with_delimiter>ssh://)?"
193
195
  r"(?P<userinfo>git)"
194
196
  f"@{host}:"
195
197
  r"(?P<port>\d+)?"
196
198
  r"(?(scheme_with_delimiter)/|/?)"
197
- f"{self.config.group}/{self.config.project}.git$",
199
+ f"{group}/{project}(\.git)?$",
198
200
  )
199
201
  if ssh_regex.fullmatch(url):
200
202
  return True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: zenml-nightly
3
- Version: 0.81.0.dev20250417
3
+ Version: 0.81.0.dev20250419
4
4
  Summary: ZenML: Write production-ready ML code.
5
5
  License: Apache-2.0
6
6
  Keywords: machine learning,production,pipeline,mlops,devops
@@ -1,5 +1,5 @@
1
1
  zenml/README.md,sha256=827dekbOWAs1BpW7VF1a4d7EbwPbjwccX-2zdXBENZo,1777
2
- zenml/VERSION,sha256=aYtF-ksj5iJaP_lXns-UKRyoEI5LJOygqNJdcYVaIzY,19
2
+ zenml/VERSION,sha256=FmOrvF3wrz-iTCu4wD0WjP-UDy417cFyDc02QOsvjqo,19
3
3
  zenml/__init__.py,sha256=CKEyepFK-7akXYiMrNVh92Nb01Cjs23w4_YyI6sgdc8,2242
4
4
  zenml/actions/__init__.py,sha256=mrt6wPo73iKRxK754_NqsGyJ3buW7RnVeIGXr1xEw8Y,681
5
5
  zenml/actions/base_action.py,sha256=UcaHev6BTuLDwuswnyaPjdA8AgUqB5xPZ-lRtuvf2FU,25553
@@ -277,14 +277,14 @@ zenml/integrations/gcp/step_operators/vertex_step_operator.py,sha256=X8CCniyAo7N
277
277
  zenml/integrations/gcp/vertex_custom_job_parameters.py,sha256=B5RLkw7KDOi4ZfWHFnC6TGLphXMzToMjROxszCEAS9c,3676
278
278
  zenml/integrations/github/__init__.py,sha256=movoEHoX8SpY0t6mBS5D64enxG6lPkpYJIEQ9jElHLA,1427
279
279
  zenml/integrations/github/code_repositories/__init__.py,sha256=ub_hSE2ks2mZB1aeHRjQYz7QIRQIgOw2s080IIqJaGs,817
280
- zenml/integrations/github/code_repositories/github_code_repository.py,sha256=1tkDQNK7X87bf5E2pdA9Ll49RksY1hc2lcS9h5cNDfI,8392
280
+ zenml/integrations/github/code_repositories/github_code_repository.py,sha256=wrx-orSgEfEsicFNwHXfJ27rn5v0nQE1SSOsBuC_Ch8,9395
281
281
  zenml/integrations/github/plugins/__init__.py,sha256=yf7xkBs8wEUMP2-nFbDIVeXs1omHtZoyZBgobMYB1l0,804
282
282
  zenml/integrations/github/plugins/event_sources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
283
283
  zenml/integrations/github/plugins/event_sources/github_webhook_event_source.py,sha256=nU--Wk9s2W7koF-JrtWIrSpuNWNVouftHQDiEY8dkdQ,17101
284
284
  zenml/integrations/github/plugins/github_webhook_event_source_flavor.py,sha256=jth8sxrmyg22-wT5Ax0fdsiLhTQwHXxaiTnB3kD97pk,1669
285
285
  zenml/integrations/gitlab/__init__.py,sha256=dxo7rxGj-w8ZLgjx9xlDGOSBfGmQylUAROmeabQkUp8,964
286
286
  zenml/integrations/gitlab/code_repositories/__init__.py,sha256=Ds7NL6tCqLApRsOgvUofEq3Ms2No5_Z095uvi1gLVIk,817
287
- zenml/integrations/gitlab/code_repositories/gitlab_code_repository.py,sha256=QLiDTHHZBblpWg1y6DmV2bsuxFs5FNOo9E903yLlGbs,6532
287
+ zenml/integrations/gitlab/code_repositories/gitlab_code_repository.py,sha256=miWGRNjIny5ZvLaFsrFUwFSzdQ3-xPyND9vuI3EyrKE,6701
288
288
  zenml/integrations/great_expectations/__init__.py,sha256=x6L4OokAE_Q0sC1vgZGi1X705AJIe_TNpdAEVKAvgFU,2546
289
289
  zenml/integrations/great_expectations/data_validators/__init__.py,sha256=Z16qmLfUoataEABQ6Ec-HSLM_a9VRALHFa4OoAyozIk,857
290
290
  zenml/integrations/great_expectations/data_validators/ge_data_validator.py,sha256=qp2ZFqQiYPszRc6vGhZhK22GEHhGoTQ0Y9u0trXNQyg,21404
@@ -1316,8 +1316,8 @@ zenml/zen_stores/secrets_stores/sql_secrets_store.py,sha256=nEO0bAPlULBLxLVk-UTR
1316
1316
  zenml/zen_stores/sql_zen_store.py,sha256=7ISpj0CC31xb66ehW1PZZ2Yapk3Sxu-CiuOGZlLqGQA,441658
1317
1317
  zenml/zen_stores/template_utils.py,sha256=GWBP5QEOyvhzndS_MLPmvh28sQaOPpPoZFXCIX9CRL4,9065
1318
1318
  zenml/zen_stores/zen_store_interface.py,sha256=fF_uL_FplnvGvM5o3jOQ8i1zHXhuhKLL2n4nvIKSR7E,92090
1319
- zenml_nightly-0.81.0.dev20250417.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1320
- zenml_nightly-0.81.0.dev20250417.dist-info/METADATA,sha256=QeRiC-2To8f8FbrB4LJSeMr51h2RZtG82F_nBhWIOrY,24312
1321
- zenml_nightly-0.81.0.dev20250417.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
1322
- zenml_nightly-0.81.0.dev20250417.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1323
- zenml_nightly-0.81.0.dev20250417.dist-info/RECORD,,
1319
+ zenml_nightly-0.81.0.dev20250419.dist-info/LICENSE,sha256=wbnfEnXnafPbqwANHkV6LUsPKOtdpsd-SNw37rogLtc,11359
1320
+ zenml_nightly-0.81.0.dev20250419.dist-info/METADATA,sha256=rAyG36q25Lse3NGIagH-PcQOpIN7lkAW2h7esLrqRws,24312
1321
+ zenml_nightly-0.81.0.dev20250419.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
1322
+ zenml_nightly-0.81.0.dev20250419.dist-info/entry_points.txt,sha256=QK3ETQE0YswAM2mWypNMOv8TLtr7EjnqAFq1br_jEFE,43
1323
+ zenml_nightly-0.81.0.dev20250419.dist-info/RECORD,,