package-utils 0.8.2__tar.gz → 0.8.4__tar.gz

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.
Files changed (36) hide show
  1. {package_utils-0.8.2/src/package_utils.egg-info → package_utils-0.8.4}/PKG-INFO +4 -5
  2. {package_utils-0.8.2 → package_utils-0.8.4}/README.md +1 -1
  3. {package_utils-0.8.2 → package_utils-0.8.4}/pyproject.toml +9 -4
  4. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/cli/convertors/dataclass.py +1 -1
  5. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/cli/convertors/parameter.py +1 -1
  6. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/context/loaders/secrets_.py +13 -3
  7. {package_utils-0.8.2 → package_utils-0.8.4/src/package_utils.egg-info}/PKG-INFO +4 -5
  8. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils.egg-info/requires.txt +1 -2
  9. {package_utils-0.8.2 → package_utils-0.8.4}/LICENSE +0 -0
  10. {package_utils-0.8.2 → package_utils-0.8.4}/setup.cfg +0 -0
  11. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/__init__.py +0 -0
  12. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/cli/__init__.py +0 -0
  13. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/cli/cli_runner.py +0 -0
  14. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/cli/convertors/__init__.py +0 -0
  15. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/cli/convertors/class_.py +0 -0
  16. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/cli/convertors/method.py +0 -0
  17. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/cli/entry_point.py +0 -0
  18. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/context/__init__.py +0 -0
  19. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/context/context.py +0 -0
  20. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/context/entry_point.py +0 -0
  21. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/context/loaders/__init__.py +0 -0
  22. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/context/loaders/config.py +0 -0
  23. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/context/loaders/loaders.py +0 -0
  24. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/context/loaders/options.py +0 -0
  25. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/context/models/__init__.py +0 -0
  26. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/context/models/models.py +0 -0
  27. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/dataclasses/__init__.py +0 -0
  28. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/dataclasses/mixins.py +0 -0
  29. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/jobs/__init__.py +0 -0
  30. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/jobs/jobs.py +0 -0
  31. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/py.typed +0 -0
  32. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/storage/__init__.py +0 -0
  33. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils/storage/cached_file_content.py +0 -0
  34. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils.egg-info/SOURCES.txt +0 -0
  35. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils.egg-info/dependency_links.txt +0 -0
  36. {package_utils-0.8.2 → package_utils-0.8.4}/src/package_utils.egg-info/top_level.txt +0 -0
@@ -1,17 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: package-utils
3
- Version: 0.8.2
3
+ Version: 0.8.4
4
4
  Summary: Common utilities for Python packages
5
5
  Author-email: Quinten Roets <qdr2104@columbia.edu>
6
6
  License-Expression: MIT
7
7
  Project-URL: Source Code, https://github.com/quintenroets/package-utils
8
- Requires-Python: <3.14,>=3.10
8
+ Requires-Python: >=3.10
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
11
  Requires-Dist: typer<1,>=0.9.0
12
12
  Provides-Extra: context
13
13
  Requires-Dist: dacite<2,>=1.8.1; extra == "context"
14
- Requires-Dist: powercli<1,>=0.2.0; extra == "context"
15
14
  Requires-Dist: PyYaml<7,>=6.0.1; extra == "context"
16
15
  Requires-Dist: superpathlib<3,>=2.0.0; extra == "context"
17
16
  Provides-Extra: dataclasses
@@ -23,14 +22,14 @@ Requires-Dist: dacite<2,>=1.8.1; extra == "dev"
23
22
  Requires-Dist: PyYaml<7,>=6.0.1; extra == "dev"
24
23
  Requires-Dist: superpathlib<3,>=2.0.0; extra == "dev"
25
24
  Requires-Dist: hypothesis<7,>=6.91.0; extra == "dev"
26
- Requires-Dist: package-dev-tools<1,>=0.7.1; extra == "dev"
25
+ Requires-Dist: package-dev-tools<1,>=0.8.1; extra == "dev"
27
26
  Requires-Dist: package-dev-utils<1,>=0.1.6; extra == "dev"
28
27
  Dynamic: license-file
29
28
 
30
29
  # Package Utils
31
30
  [![PyPI version](https://badge.fury.io/py/package-utils.svg)](https://badge.fury.io/py/package-utils)
32
31
  ![PyPI downloads](https://img.shields.io/pypi/dm/package-utils)
33
- ![Python version](https://img.shields.io/badge/python-3.10--3.13-brightgreen)
32
+ ![Python version](https://img.shields.io/badge/python-3.10+-brightgreen)
34
33
  ![Operating system](https://img.shields.io/badge/os-linux%20%7c%20macOS%20%7c%20windows-brightgreen)
35
34
  ![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)
36
35
 
@@ -1,7 +1,7 @@
1
1
  # Package Utils
2
2
  [![PyPI version](https://badge.fury.io/py/package-utils.svg)](https://badge.fury.io/py/package-utils)
3
3
  ![PyPI downloads](https://img.shields.io/pypi/dm/package-utils)
4
- ![Python version](https://img.shields.io/badge/python-3.10--3.13-brightgreen)
4
+ ![Python version](https://img.shields.io/badge/python-3.10+-brightgreen)
5
5
  ![Operating system](https://img.shields.io/badge/os-linux%20%7c%20macOS%20%7c%20windows-brightgreen)
6
6
  ![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)
7
7
 
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "package-utils"
3
- version = "0.8.2"
3
+ version = "0.8.4"
4
4
  description = "Common utilities for Python packages"
5
5
  authors = [{name = "Quinten Roets", email = "qdr2104@columbia.edu"}]
6
6
  license = "MIT"
7
7
  readme = "README.md"
8
- requires-python = ">=3.10, <3.14"
8
+ requires-python = ">=3.10"
9
9
  dependencies = [
10
10
  "typer>=0.9.0, <1",
11
11
  ]
@@ -13,7 +13,6 @@ dependencies = [
13
13
  [project.optional-dependencies]
14
14
  context = [
15
15
  "dacite >=1.8.1, <2",
16
- "powercli >= 0.2.0, <1",
17
16
  "PyYaml >=6.0.1, <7",
18
17
  "superpathlib >=2.0.0, <3",
19
18
  ]
@@ -30,7 +29,7 @@ dev = [
30
29
  "superpathlib >=2.0.0, <3",
31
30
 
32
31
  "hypothesis >=6.91.0, <7",
33
- "package-dev-tools >=0.7.1, <1",
32
+ "package-dev-tools >=0.8.1, <1",
34
33
  "package-dev-utils >=0.1.6, <1",
35
34
  ]
36
35
 
@@ -66,6 +65,12 @@ ignore = [
66
65
  "ANN401", # annotated with Any
67
66
  "D", # docstrings
68
67
  "G004", # logging f-string
68
+ "D1", # missing docstrings
69
+ "D200", # one-line docstring
70
+ "D203", # conflicts with D211
71
+ "D205", # blank line between summary and description
72
+ "D212", # conflicts with D213
73
+ "D401", # imperative first line
69
74
  ]
70
75
 
71
76
  [tool.ruff.lint.per-file-ignores]
@@ -27,7 +27,7 @@ class Convertor(class_.Convertor[T]):
27
27
  def wrapped_method(**kwargs: Any) -> Any:
28
28
  specified_kwargs = {k: v for k, v in kwargs.items() if v is not None}
29
29
  if self.flattened_arguments_mapper:
30
- import dacite
30
+ import dacite # noqa: PLC0415
31
31
 
32
32
  self.unflatten(specified_kwargs)
33
33
  config = dacite.Config(strict=True)
@@ -50,7 +50,7 @@ class CliParameter:
50
50
  annotations = self.extract_optional_annotations()
51
51
  annotation = next(annotations, None)
52
52
  if annotation is not None:
53
- self.annotation = Optional[annotation] # noqa: UP007
53
+ self.annotation = Optional[annotation] # noqa: UP045
54
54
 
55
55
  def extract_optional_annotations(self) -> Iterator[object]:
56
56
  annotations = typing.get_args(self.annotation)
@@ -2,11 +2,12 @@ from __future__ import annotations
2
2
 
3
3
  import dataclasses
4
4
  import os
5
+ import shlex
6
+ import subprocess
5
7
  import typing
6
8
  from dataclasses import dataclass, fields, is_dataclass
7
9
  from typing import Generic, TypeVar, cast
8
10
 
9
- import cli
10
11
  import dacite
11
12
 
12
13
  from package_utils.context.models import Config, Options, Secrets
@@ -28,8 +29,17 @@ class SecretLoader:
28
29
  name: str
29
30
 
30
31
  def load(self) -> str:
31
- env_name = self.name.upper()
32
- return os.environ.get(env_name) or cli.capture_output("pw", self.name)
32
+ env_name = self.name.upper().replace(" ", "_")
33
+ value = os.environ.get(env_name)
34
+ if not value and (askpass := os.environ.get("SECRET_ASKPASS")):
35
+ command = [*shlex.split(askpass), self.name]
36
+ value = subprocess.check_output(command).decode().strip() # noqa: S603
37
+ if not value:
38
+ message = (
39
+ f"Secret {self.name!r} not found (set {env_name} or SECRET_ASKPASS)"
40
+ )
41
+ raise RuntimeError(message)
42
+ return value
33
43
 
34
44
 
35
45
  @dataclass
@@ -1,17 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: package-utils
3
- Version: 0.8.2
3
+ Version: 0.8.4
4
4
  Summary: Common utilities for Python packages
5
5
  Author-email: Quinten Roets <qdr2104@columbia.edu>
6
6
  License-Expression: MIT
7
7
  Project-URL: Source Code, https://github.com/quintenroets/package-utils
8
- Requires-Python: <3.14,>=3.10
8
+ Requires-Python: >=3.10
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
11
  Requires-Dist: typer<1,>=0.9.0
12
12
  Provides-Extra: context
13
13
  Requires-Dist: dacite<2,>=1.8.1; extra == "context"
14
- Requires-Dist: powercli<1,>=0.2.0; extra == "context"
15
14
  Requires-Dist: PyYaml<7,>=6.0.1; extra == "context"
16
15
  Requires-Dist: superpathlib<3,>=2.0.0; extra == "context"
17
16
  Provides-Extra: dataclasses
@@ -23,14 +22,14 @@ Requires-Dist: dacite<2,>=1.8.1; extra == "dev"
23
22
  Requires-Dist: PyYaml<7,>=6.0.1; extra == "dev"
24
23
  Requires-Dist: superpathlib<3,>=2.0.0; extra == "dev"
25
24
  Requires-Dist: hypothesis<7,>=6.91.0; extra == "dev"
26
- Requires-Dist: package-dev-tools<1,>=0.7.1; extra == "dev"
25
+ Requires-Dist: package-dev-tools<1,>=0.8.1; extra == "dev"
27
26
  Requires-Dist: package-dev-utils<1,>=0.1.6; extra == "dev"
28
27
  Dynamic: license-file
29
28
 
30
29
  # Package Utils
31
30
  [![PyPI version](https://badge.fury.io/py/package-utils.svg)](https://badge.fury.io/py/package-utils)
32
31
  ![PyPI downloads](https://img.shields.io/pypi/dm/package-utils)
33
- ![Python version](https://img.shields.io/badge/python-3.10--3.13-brightgreen)
32
+ ![Python version](https://img.shields.io/badge/python-3.10+-brightgreen)
34
33
  ![Operating system](https://img.shields.io/badge/os-linux%20%7c%20macOS%20%7c%20windows-brightgreen)
35
34
  ![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)
36
35
 
@@ -2,7 +2,6 @@ typer<1,>=0.9.0
2
2
 
3
3
  [context]
4
4
  dacite<2,>=1.8.1
5
- powercli<1,>=0.2.0
6
5
  PyYaml<7,>=6.0.1
7
6
  superpathlib<3,>=2.0.0
8
7
 
@@ -14,7 +13,7 @@ dacite<2,>=1.8.1
14
13
  PyYaml<7,>=6.0.1
15
14
  superpathlib<3,>=2.0.0
16
15
  hypothesis<7,>=6.91.0
17
- package-dev-tools<1,>=0.7.1
16
+ package-dev-tools<1,>=0.8.1
18
17
  package-dev-utils<1,>=0.1.6
19
18
 
20
19
  [storage]
File without changes
File without changes