fast-dev-cli 0.9.0__tar.gz → 0.9.2__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.
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/PKG-INFO +3 -2
- fast_dev_cli-0.9.2/fast_dev_cli/__init__.py +1 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/fast_dev_cli/cli.py +28 -2
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/pyproject.toml +3 -2
- fast_dev_cli-0.9.0/fast_dev_cli/__init__.py +0 -1
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/LICENSE +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/README.md +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/fast_dev_cli/py.typed +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/pdm_build.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/scripts/check.sh +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/scripts/format.sh +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/scripts/test.sh +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/__init__.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/conftest.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/test_bump.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/test_fast_test.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/test_functions.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/test_lint.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/test_runserver.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/test_sync.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/test_tag.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/test_upgrade.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/test_upload.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/test_version.py +0 -0
- {fast_dev_cli-0.9.0 → fast_dev_cli-0.9.2}/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fast-dev-cli
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.2
|
|
4
4
|
Summary: Python project development tool.
|
|
5
5
|
Author-Email: Waket Zheng <waketzheng@gmail.com>>
|
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -21,10 +21,11 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
21
21
|
Project-URL: Homepage, https://github.com/waketzheng/fast-dev-cli
|
|
22
22
|
Requires-Python: <4,>=3.10
|
|
23
23
|
Requires-Dist: typer<0.13,>=0.12.3
|
|
24
|
+
Requires-Dist: tomli<3,>=2.0.1; python_version < "3.11"
|
|
24
25
|
Requires-Dist: coverage<8,>=7.5.1
|
|
25
26
|
Requires-Dist: ruff<0.6,>=0.4.4
|
|
26
27
|
Requires-Dist: mypy<2,>=1.10.0
|
|
27
|
-
Requires-Dist:
|
|
28
|
+
Requires-Dist: bumpversion2<2,>=1.4.0
|
|
28
29
|
Requires-Dist: pytest<9,>=8.2.0
|
|
29
30
|
Requires-Dist: ipython<9,>=8.24.0; extra == "all"
|
|
30
31
|
Requires-Dist: pytest-mock<4,>=3.14.0; extra == "all"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.2"
|
|
@@ -23,9 +23,12 @@ except ImportError: # pragma: no cover
|
|
|
23
23
|
if sys.version_info >= (3, 11):
|
|
24
24
|
from enum import StrEnum
|
|
25
25
|
from typing import Annotated, Self
|
|
26
|
+
|
|
27
|
+
import tomllib
|
|
26
28
|
else: # pragma: no cover
|
|
27
29
|
from enum import Enum
|
|
28
30
|
|
|
31
|
+
import tomli as tomllib
|
|
29
32
|
from typing_extensions import Annotated, Self
|
|
30
33
|
|
|
31
34
|
class StrEnum(str, Enum):
|
|
@@ -92,7 +95,9 @@ def get_current_version(
|
|
|
92
95
|
cmd = ["poetry", "version", "-s"]
|
|
93
96
|
if verbose:
|
|
94
97
|
echo(f"--> {' '.join(cmd)}")
|
|
95
|
-
|
|
98
|
+
if out := capture_cmd_output(cmd).strip():
|
|
99
|
+
out = out.splitlines()[-1].strip().split()[-1]
|
|
100
|
+
return out
|
|
96
101
|
|
|
97
102
|
|
|
98
103
|
def _ensure_bool(value: bool | OptionInfo) -> bool:
|
|
@@ -147,12 +152,33 @@ class BumpUp(DryRun):
|
|
|
147
152
|
|
|
148
153
|
@staticmethod
|
|
149
154
|
def parse_filename() -> str:
|
|
155
|
+
toml_text = Project.load_toml_text()
|
|
150
156
|
if not Project.manage_by_poetry():
|
|
151
157
|
# version = { source = "file", path = "fast_dev_cli/cli.py" }
|
|
152
|
-
for line in
|
|
158
|
+
for line in toml_text.splitlines():
|
|
153
159
|
if not line.startswith("version = "):
|
|
154
160
|
continue
|
|
155
161
|
return line.split('path = "', 1)[-1].split('"')[0]
|
|
162
|
+
context = tomllib.loads(toml_text)
|
|
163
|
+
if (poetry_item := context["tool"]["poetry"])["version"] == "0":
|
|
164
|
+
try:
|
|
165
|
+
package_item = poetry_item["packages"]
|
|
166
|
+
except KeyError:
|
|
167
|
+
packages = []
|
|
168
|
+
else:
|
|
169
|
+
packages = [j for i in package_item if (j := i.get("include"))]
|
|
170
|
+
# In case of managed by `poetry-version-plugin`
|
|
171
|
+
cwd = Path.cwd()
|
|
172
|
+
pattern = re.compile(r"__version__\s*=\s*['\"]")
|
|
173
|
+
ds = [cwd / i for i in packages] + [cwd / cwd.name.replace("-", "_"), cwd]
|
|
174
|
+
for d in ds:
|
|
175
|
+
if (init_file := d / "__init__.py").exists():
|
|
176
|
+
if pattern.search(init_file.read_text()):
|
|
177
|
+
break
|
|
178
|
+
else:
|
|
179
|
+
raise ParseError("Version file not found! Where are you now?")
|
|
180
|
+
return init_file.relative_to(cwd).as_posix()
|
|
181
|
+
|
|
156
182
|
return TOML_FILE
|
|
157
183
|
|
|
158
184
|
def get_part(self, s: str) -> str:
|
|
@@ -32,13 +32,14 @@ classifiers = [
|
|
|
32
32
|
]
|
|
33
33
|
dependencies = [
|
|
34
34
|
"typer>=0.12.3,<0.13",
|
|
35
|
+
"tomli>=2.0.1,<3; python_version < '3.11'",
|
|
35
36
|
"coverage >=7.5.1,<8",
|
|
36
37
|
"ruff >=0.4.4,<0.6",
|
|
37
38
|
"mypy >=1.10.0,<2",
|
|
38
|
-
"
|
|
39
|
+
"bumpversion2 >=1.4.0,<2",
|
|
39
40
|
"pytest >=8.2.0,<9",
|
|
40
41
|
]
|
|
41
|
-
version = "0.9.
|
|
42
|
+
version = "0.9.2"
|
|
42
43
|
|
|
43
44
|
[project.urls]
|
|
44
45
|
Homepage = "https://github.com/waketzheng/fast-dev-cli"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.9.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|