winipedia-utils 0.2.5__py3-none-any.whl → 0.2.7__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 winipedia-utils might be problematic. Click here for more details.

@@ -14,6 +14,22 @@ def laod_pyproject_toml() -> TOMLDocument:
14
14
  return tomlkit.parse(Path("pyproject.toml").read_text())
15
15
 
16
16
 
17
+ def get_dev_dependencies_from_pyproject_toml() -> set[str]:
18
+ """Get the dev dependencies from pyproject.toml."""
19
+ toml = laod_pyproject_toml()
20
+ dev_dependencies = (
21
+ toml.get("tool", {})
22
+ .get("poetry", {})
23
+ .get("group", {})
24
+ .get("dev", {})
25
+ .get("dependencies", {})
26
+ .keys()
27
+ )
28
+ if not dev_dependencies:
29
+ dev_dependencies = toml.get("dependency-groups", {}).get("dev", [])
30
+ return set(dev_dependencies)
31
+
32
+
17
33
  def dump_pyproject_toml(toml: TOMLDocument) -> None:
18
34
  """Dump the pyproject.toml file."""
19
35
  with Path("pyproject.toml").open("w") as f:
@@ -22,8 +22,8 @@ from winipedia_utils.modules.package import (
22
22
  )
23
23
  from winipedia_utils.projects.poetry.config import (
24
24
  _pyproject_tool_configs_are_correct,
25
+ get_dev_dependencies_from_pyproject_toml,
25
26
  get_poetry_package_name,
26
- laod_pyproject_toml,
27
27
  )
28
28
  from winipedia_utils.testing.assertions import assert_with_msg
29
29
  from winipedia_utils.testing.convention import (
@@ -52,15 +52,7 @@ def _test_dev_dependencies_const_correct() -> None:
52
52
  # this const is only used in winipedia_utils
53
53
  # to be able to install them with setup.py
54
54
  return
55
- toml_dict = laod_pyproject_toml()
56
- actual_dev_dependencies = (
57
- toml_dict.get("tool", {})
58
- .get("poetry", {})
59
- .get("group", {})
60
- .get("dev", {})
61
- .get("dependencies", {})
62
- .keys()
63
- )
55
+ actual_dev_dependencies = get_dev_dependencies_from_pyproject_toml()
64
56
  assert_with_msg(
65
57
  set(actual_dev_dependencies) == set(_DEV_DEPENDENCIES),
66
58
  "Dev dependencies in consts.py are not correct",
@@ -78,15 +70,7 @@ def _test_dev_dependencies_are_in_pyproject_toml() -> None:
78
70
  ImportError: If a dev dependency is not installed
79
71
 
80
72
  """
81
- toml_dict = laod_pyproject_toml()
82
- dev_dependencies = (
83
- toml_dict.get("tool", {})
84
- .get("poetry", {})
85
- .get("group", {})
86
- .get("dev", {})
87
- .get("dependencies", {})
88
- .keys()
89
- )
73
+ dev_dependencies = get_dev_dependencies_from_pyproject_toml()
90
74
  assert_with_msg(
91
75
  set(_DEV_DEPENDENCIES).issubset(set(dev_dependencies)),
92
76
  "Dev dependencies in consts.py are not a subset of the ones in pyproject.toml",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: winipedia-utils
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: A package with many utility functions
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -35,7 +35,7 @@ winipedia_utils/os/__init__.py,sha256=WSLt7tb6HqWRlCGGIEwRfVksF0sLJNeEW3iZeJhGWk
35
35
  winipedia_utils/os/os.py,sha256=CXPVnagfj3dXlc8OIv1DirJpin8oaGXWetnmx2lULE4,1831
36
36
  winipedia_utils/projects/__init__.py,sha256=6oTiSlUMAwO5xnH4SGVnvspzKcxrxo9kn1L4xkjq1p8,53
37
37
  winipedia_utils/projects/poetry/__init__.py,sha256=0yNMuu9KmM19od4VBxBV3HLK-RdCsa0e2Zhg33J7RmQ,60
38
- winipedia_utils/projects/poetry/config.py,sha256=kKhnhLDzXqdmmsAlNSRUWQi714dZWfk2fykMLbVlEFs,3270
38
+ winipedia_utils/projects/poetry/config.py,sha256=mkJUTEa65i7QOlAgSlE8DB5VdMZDinBPN0yUONbU8UU,3761
39
39
  winipedia_utils/projects/poetry/poetry.py,sha256=QoQ-b8NgMiWaqq85gs2HZh_436VpNqKzGogrWPS5DrU,965
40
40
  winipedia_utils/projects/project.py,sha256=2nz1Hh51A-shjgdPCgiDw-ODrVtOtiHEHQnMPjAJZ-A,1587
41
41
  winipedia_utils/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
@@ -68,14 +68,14 @@ winipedia_utils/testing/tests/base/fixtures/scopes/class_.py,sha256=XCx4HZeHbJJ-
68
68
  winipedia_utils/testing/tests/base/fixtures/scopes/function.py,sha256=5dW7-IPqJ_3Q2j1vftZL5FYKvNSKufqiHzLTTWYhja4,309
69
69
  winipedia_utils/testing/tests/base/fixtures/scopes/module.py,sha256=V0H9WFrdSV7uj__bXM_GKcCJnjResqI7fFjcxyvNaZk,1169
70
70
  winipedia_utils/testing/tests/base/fixtures/scopes/package.py,sha256=IKOfj6vfyjEQdRV5cJoPRQvALmePpGxWkGy23di00-w,309
71
- winipedia_utils/testing/tests/base/fixtures/scopes/session.py,sha256=g7B9-OnC06Qx46zeB6HOG-YKrK6aaYrpa8RkktnC6h0,10422
71
+ winipedia_utils/testing/tests/base/fixtures/scopes/session.py,sha256=aarxA_ElCZ0wNq3L1WG9PmGXfIEn1G7_785rosTYkUw,10101
72
72
  winipedia_utils/testing/tests/base/utils/__init__.py,sha256=mC-8dCkp8xarqkQu2QQLrPjHi6Ww9hcixWdHeQHWeRs,68
73
73
  winipedia_utils/testing/tests/base/utils/utils.py,sha256=mAhKC0ycOQVjUNjad-7TOXmZftg2hOFDFg-FG31zR-8,3633
74
74
  winipedia_utils/testing/tests/conftest.py,sha256=8RounBlI8Jq1aLaLNpv84MW4ne8Qq0aavQextDOp5ng,920
75
75
  winipedia_utils/testing/tests/test_0.py,sha256=LFs2C8-A193VdGDfuJzqUSim5JUw1FmOf9w2ZvGS3P4,320
76
76
  winipedia_utils/text/__init__.py,sha256=j2bwtK6kyeHI6SnoBjpRju0C1W2n2paXBDlNjNtaUxA,48
77
77
  winipedia_utils/text/string.py,sha256=pK_VQXxSZa8HqHY1a6oMKfmN-OKteFE32eZaweCI22E,3508
78
- winipedia_utils-0.2.5.dist-info/licenses/LICENSE,sha256=3PrKJ2CWNrnyyHaC_r0wPDSukVWgmjOxHr__eQVH7cw,1087
79
- winipedia_utils-0.2.5.dist-info/METADATA,sha256=ibLmISgpTlK54UozpA2MuGXYIKYvds7ogNi8wuVl1Yc,12507
80
- winipedia_utils-0.2.5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
81
- winipedia_utils-0.2.5.dist-info/RECORD,,
78
+ winipedia_utils-0.2.7.dist-info/licenses/LICENSE,sha256=3PrKJ2CWNrnyyHaC_r0wPDSukVWgmjOxHr__eQVH7cw,1087
79
+ winipedia_utils-0.2.7.dist-info/METADATA,sha256=DuuAcDhIJy1fcLB1sRlQ_NndEIWHA2CKQsmgm81B4CM,12507
80
+ winipedia_utils-0.2.7.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
81
+ winipedia_utils-0.2.7.dist-info/RECORD,,