coiled 1.128.3.dev12__py3-none-any.whl → 1.128.3.dev13__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.

Potentially problematic release.


This version of coiled might be problematic. Click here for more details.

@@ -1,6 +1,4 @@
1
- import asyncio
2
1
  import contextlib
3
- import logging
4
2
  import platform
5
3
  import sys
6
4
  import typing
@@ -69,49 +67,52 @@ async def approximate_packages(
69
67
  architecture: ArchitectureTypesEnum = ArchitectureTypesEnum.X86_64,
70
68
  pip_check_errors: Optional[Dict[str, List[str]]] = None,
71
69
  gpu_enabled: bool = False,
70
+ use_uv_installer: bool = True,
72
71
  ) -> typing.List[ResolvedPackageInfo]:
73
72
  user_conda_installed_python = next((p for p in packages if p["name"] == "python"), None)
74
- user_conda_installed_pip = next(
75
- (i for i, p in enumerate(packages) if p["name"] == "pip" and p["source"] == "conda"),
76
- None,
77
- )
78
- if not user_conda_installed_pip:
79
- # This means pip was installed by pip, or the system
80
- # package manager
81
- # Insert a conda version of pip to be installed first, it will
82
- # then be used to install the users version of pip
83
- pip = next(
84
- (p for p in packages if p["name"] == "pip" and p["source"] == "pip"),
73
+ # Only add pip if we need it
74
+ if not use_uv_installer:
75
+ user_conda_installed_pip = next(
76
+ (i for i, p in enumerate(packages) if p["name"] == "pip" and p["source"] == "conda"),
85
77
  None,
86
78
  )
87
- if not pip:
88
- # insert a modern version and hope it does not introduce conflicts
89
- packages.append({
90
- "name": "pip",
91
- "path": None,
92
- "source": "conda",
93
- "channel_url": "https://conda.anaconda.org/conda-forge/",
94
- "channel": "conda-forge",
95
- "subdir": "noarch",
96
- "conda_name": "pip",
97
- "version": "22.3.1",
98
- "wheel_target": None,
99
- "requested": False,
100
- })
101
- else:
102
- # insert the users pip version and hope it exists on conda-forge
103
- packages.append({
104
- "name": "pip",
105
- "path": None,
106
- "source": "conda",
107
- "channel_url": "https://conda.anaconda.org/conda-forge/",
108
- "channel": "conda-forge",
109
- "subdir": "noarch",
110
- "conda_name": "pip",
111
- "version": pip["version"],
112
- "wheel_target": None,
113
- "requested": True,
114
- })
79
+ if not user_conda_installed_pip:
80
+ # This means pip was installed by pip, or the system
81
+ # package manager
82
+ # Insert a conda version of pip to be installed first, it will
83
+ # then be used to install the users version of pip
84
+ pip = next(
85
+ (p for p in packages if p["name"] == "pip" and p["source"] == "pip"),
86
+ None,
87
+ )
88
+ if not pip:
89
+ # insert a modern version and hope it does not introduce conflicts
90
+ packages.append({
91
+ "name": "pip",
92
+ "path": None,
93
+ "source": "conda",
94
+ "channel_url": "https://conda.anaconda.org/conda-forge/",
95
+ "channel": "conda-forge",
96
+ "subdir": "noarch",
97
+ "conda_name": "pip",
98
+ "version": "22.3.1",
99
+ "wheel_target": None,
100
+ "requested": False,
101
+ })
102
+ else:
103
+ # insert the users pip version and hope it exists on conda-forge
104
+ packages.append({
105
+ "name": "pip",
106
+ "path": None,
107
+ "source": "conda",
108
+ "channel_url": "https://conda.anaconda.org/conda-forge/",
109
+ "channel": "conda-forge",
110
+ "subdir": "noarch",
111
+ "conda_name": "pip",
112
+ "version": pip["version"],
113
+ "wheel_target": None,
114
+ "requested": True,
115
+ })
115
116
  coiled_selected_python = None
116
117
  if not user_conda_installed_python:
117
118
  # insert a special python package
@@ -208,6 +209,7 @@ async def create_environment_approximation(
208
209
  progress: Optional[Progress] = None,
209
210
  architecture: ArchitectureTypesEnum = ArchitectureTypesEnum.X86_64,
210
211
  gpu_enabled: bool = False,
212
+ use_uv_installer: bool = True,
211
213
  ) -> typing.List[ResolvedPackageInfo]:
212
214
  packages = await scan_prefix(progress=progress)
213
215
  pip_check_errors = await check_pip_happy(progress)
@@ -237,6 +239,7 @@ async def create_environment_approximation(
237
239
  architecture=architecture,
238
240
  pip_check_errors=pip_check_errors,
239
241
  gpu_enabled=gpu_enabled,
242
+ use_uv_installer=use_uv_installer,
240
243
  )
241
244
  return result
242
245
 
@@ -306,6 +309,7 @@ async def scan_and_create(
306
309
  architecture=architecture,
307
310
  gpu_enabled=gpu_enabled,
308
311
  conda_extras=package_sync_conda_extras,
312
+ use_uv_installer=use_uv_installer,
309
313
  )
310
314
 
311
315
  if not package_sync_only:
@@ -427,39 +431,3 @@ If you use pip, venv, uv, pixi, etc. create a new environment and then:
427
431
 
428
432
  See https://docs.coiled.io/user_guide/software/package_sync_best_practices.html
429
433
  for more best practices. If that doesn't solve your issue, please contact support@coiled.io.""")
430
-
431
-
432
- if __name__ == "__main__":
433
- from logging import basicConfig
434
-
435
- basicConfig(level=logging.INFO)
436
-
437
- from rich.console import Console
438
- from rich.table import Table
439
-
440
- async def run():
441
- async with CloudV2(asynchronous=True) as cloud:
442
- return await create_environment_approximation(
443
- cloud=cloud,
444
- priorities={
445
- ("dask", "conda"): PackageLevelEnum.CRITICAL,
446
- ("twisted", "conda"): PackageLevelEnum.IGNORE,
447
- ("graphviz", "conda"): PackageLevelEnum.LOOSE,
448
- ("icu", "conda"): PackageLevelEnum.LOOSE,
449
- },
450
- )
451
-
452
- result = asyncio.run(run())
453
-
454
- table = Table(title="Packages")
455
- keys = ("name", "source", "include", "client_version", "specifier", "error", "note")
456
-
457
- for key in keys:
458
- table.add_column(key)
459
-
460
- for pkg in result:
461
- row_values = [str(pkg.get(key, "")) for key in keys]
462
- table.add_row(*row_values)
463
- console = Console()
464
- console.print(table)
465
- console.print(table)
coiled/v2/cluster.py CHANGED
@@ -711,7 +711,6 @@ class Cluster(DistributedCluster, Generic[IsAsynchronous]):
711
711
  "distributed",
712
712
  "msgpack-python",
713
713
  "msgpack",
714
- "pip",
715
714
  "python",
716
715
  "tornado",
717
716
  ))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coiled
3
- Version: 1.128.3.dev12
3
+ Version: 1.128.3.dev13
4
4
  Summary: Python client for coiled.io dask clusters
5
5
  Project-URL: Homepage, https://coiled.io
6
6
  Maintainer-email: Coiled <info@coiled.io>
@@ -3,7 +3,7 @@ coiled/__main__.py,sha256=4XILBmm4ChZYo7h3JzgslFU0tjQVzdX0XtYcQLhCv0w,171
3
3
  coiled/analytics.py,sha256=96CeL8KVnm3-76lvT4fNkgML0lHebaLea-YP3wW-KqM,7486
4
4
  coiled/auth.py,sha256=go7vWtCwBbwtWyNrNBxg28xBrdjrETbE-mn3KaN5Yl8,1867
5
5
  coiled/batch.py,sha256=QH-BMlMKkjdToPbw6q0I1W1TTJIDHu24B363mUGDL2c,7102
6
- coiled/capture_environment.py,sha256=K5mNwUe8KM_l203h3oZvcZUJTrGozT-CH1GrtuPYv8U,18458
6
+ coiled/capture_environment.py,sha256=YYNk_T4xOcw8vmFIOcy19d5-ptDvoes3RWa7fRy0sB4,17750
7
7
  coiled/cluster.py,sha256=wwK9-SefbFBUEHJjYHXlWN3YvPcvR6XD2J-RdPCGhgc,5049
8
8
  coiled/coiled.yaml,sha256=z70xzNUy0E8b8Yt12tYYmjJDDmp-U63oUD61ccuu5N0,1037
9
9
  coiled/compatibility.py,sha256=pZAPgTnqPaPpuZ6ZmCXgm0TJNenZPLBnIq4CaohwMY4,762
@@ -88,7 +88,7 @@ coiled/extensions/prefect/__init__.py,sha256=cZp1mqX29FrnINoQsuH6pz4z4uuOACs0mgi
88
88
  coiled/extensions/prefect/runners.py,sha256=AcaGS1637TnqFPKnjmmLHpdzjwAsxBLDKrOF7OpfEwM,987
89
89
  coiled/extensions/prefect/workers.py,sha256=Z2VuAhTm5AjWEKyCniMZrTxqtkn3uJp3sO3bFeR2Rr0,1642
90
90
  coiled/v2/__init__.py,sha256=KaCULaAqatcsYbTbj_SQtTLocbSKZa-uQXiyCICKFRM,805
91
- coiled/v2/cluster.py,sha256=hGs5_SVdrh2zKWpd_8RNPC7LbNd1F6ggEgAj9fCEDm8,148134
91
+ coiled/v2/cluster.py,sha256=5-dq9Vfs7R28MEzeZW4nNxmhlNLvASDQXNglKFVtkF4,148111
92
92
  coiled/v2/cluster_comms.py,sha256=UcJWLeZlc68S0uaNd9lLKbF5uaDhYqqkdTsA0CBXYRI,2643
93
93
  coiled/v2/core.py,sha256=Bf5A_rzK3tuUqqMVAgN5vix-tX_F8AEWR2pICnG3YcA,71615
94
94
  coiled/v2/cwi_log_link.py,sha256=d4k6wRYhcdDVdhWYZIX6WL1g0lscXY0yq__H1sPUNWk,1883
@@ -97,8 +97,8 @@ coiled/v2/widgets/__init__.py,sha256=Bt3GHTTyri-kFUaqGRVydDM-sCg5NdNujDg2RyvgV8U
97
97
  coiled/v2/widgets/interface.py,sha256=YeMQ5qdRbbpM04x9qIg2LE1xwxyRxFbdDYnkrwHazPk,301
98
98
  coiled/v2/widgets/rich.py,sha256=3rU5-yso92NdeEh3uSvEE-GwPNyp6i0Nb5PE5czXCik,28974
99
99
  coiled/v2/widgets/util.py,sha256=Y8qpGqwNzqfCzgyRFRy7vcscBoXqop-Upi4HLPpXLgg,3120
100
- coiled-1.128.3.dev12.dist-info/METADATA,sha256=9qTJCHl999gTXQwfwuowHf8cayMzs4mBVuYZXlLH_8c,2182
101
- coiled-1.128.3.dev12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
102
- coiled-1.128.3.dev12.dist-info/entry_points.txt,sha256=C8dz1ST_bTlTO-kNvuHBJQma9PyJPotg0S4xpPt5aHY,47
103
- coiled-1.128.3.dev12.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
104
- coiled-1.128.3.dev12.dist-info/RECORD,,
100
+ coiled-1.128.3.dev13.dist-info/METADATA,sha256=51DbcP-e2O8npsrsU7O69Bo3vjeIheFbc1jVq9ij7lE,2182
101
+ coiled-1.128.3.dev13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
102
+ coiled-1.128.3.dev13.dist-info/entry_points.txt,sha256=C8dz1ST_bTlTO-kNvuHBJQma9PyJPotg0S4xpPt5aHY,47
103
+ coiled-1.128.3.dev13.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
104
+ coiled-1.128.3.dev13.dist-info/RECORD,,