dcicutils 8.16.4__py3-none-any.whl → 8.16.6__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -213,6 +213,25 @@ def verify_untracked_files() -> bool:
213
213
 
214
214
 
215
215
  def verify_not_already_published(package_name: str, package_version: str) -> bool:
216
+ """
217
+ If the given package and version has NOT already been published to PyPi then returns True,
218
+ otherwise prints an error message and returns False.
219
+ """
220
+ url = f"{PYPI_BASE_URL}/pypi/{package_name}/json"
221
+ DEBUG_PRINT(f"curl {url}")
222
+ try:
223
+ response = requests.get(url).json()["releases"]
224
+ except Exception:
225
+ WARNING_PRINT(f"Cannot determine if this package ({package_name} {package_version})"
226
+ f" has already been published or not; ASSUMING NOT.")
227
+ return True
228
+ if response.get(package_version):
229
+ ERROR_PRINT(f"Package {package_name} {package_version} has already been published to PyPi.")
230
+ return False
231
+ return True
232
+
233
+
234
+ def verify_not_already_published_obsolete_no_longer_works_20250110(package_name: str, package_version: str) -> bool:
216
235
  """
217
236
  If the given package and version has not already been published to PyPi then returns True,
218
237
  otherwise prints an error message and returns False.
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright 2017-2024 President and Fellows of Harvard College
3
+ Copyright 2017-2025 President and Fellows of Harvard College
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcicutils
3
- Version: 8.16.4
3
+ Version: 8.16.6
4
4
  Summary: Utility package for interacting with the 4DN Data Portal and other 4DN resources
5
5
  Home-page: https://github.com/4dn-dcic/utils
6
6
  License: MIT
@@ -58,7 +58,7 @@ dcicutils/redis_tools.py,sha256=qkcSNMtvqkpvts-Cm9gWhneK523Q_oHwhNUud1be1qk,7055
58
58
  dcicutils/redis_utils.py,sha256=VJ-7g8pOZqR1ZCtdcjKz3-6as2DMUcs1b1zG6wSprH4,6462
59
59
  dcicutils/s3_utils.py,sha256=Nft1H6ohkYTYpO6Q42bldfEWPtZARqhv_ZGvWme2lj0,28955
60
60
  dcicutils/schema_utils.py,sha256=GmRm-XqZKJ6qine16SQF1txcby9WougDav_sYmKNs9E,12400
61
- dcicutils/scripts/publish_to_pypi.py,sha256=sMd4WASQGlxlh7uLrt2eGkFRXYgONVmvIg8mClMS5RQ,13903
61
+ dcicutils/scripts/publish_to_pypi.py,sha256=Vaq3DSzq4e92ZkruAoEEbnSFvPQrKOoL5IFhOrpVLk4,14727
62
62
  dcicutils/scripts/run_license_checker.py,sha256=z2keYnRDZsHQbTeo1XORAXSXNJK5axVzL5LjiNqZ7jE,4184
63
63
  dcicutils/scripts/update_portal_object.py,sha256=BwZw1cZx2zhzp1ivn_DXUxfnmUyC5A9fAotjHV0fXf4,41875
64
64
  dcicutils/scripts/view_portal_object.py,sha256=uu1w2sPCjrztA_OZAzo-HiPJhju9mICHf-lJ5RC_Ak0,41573
@@ -75,8 +75,8 @@ dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
75
75
  dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
76
76
  dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
77
77
  dcicutils/zip_utils.py,sha256=_Y9EmL3D2dUZhxucxHvrtmmlbZmK4FpSsHEb7rGSJLU,3265
78
- dcicutils-8.16.4.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
79
- dcicutils-8.16.4.dist-info/METADATA,sha256=DaZKSdpZeSUZUtbiaEOXVW2vx57yv2FuAnjHDiZ2yQM,3489
80
- dcicutils-8.16.4.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
81
- dcicutils-8.16.4.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
82
- dcicutils-8.16.4.dist-info/RECORD,,
78
+ dcicutils-8.16.6.dist-info/LICENSE.txt,sha256=IrWHOFtMb2inTgr2ZqwQriRC8H3uMQfQVO6lniaaoE0,1102
79
+ dcicutils-8.16.6.dist-info/METADATA,sha256=xFTXci00sUybvxD0y-TuqQqyB1KAmRxyDBt-wZcKLz4,3489
80
+ dcicutils-8.16.6.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
81
+ dcicutils-8.16.6.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
82
+ dcicutils-8.16.6.dist-info/RECORD,,