fast-dev-cli 0.15.2__tar.gz → 0.16.1__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.15.2 → fast_dev_cli-0.16.1}/PKG-INFO +3 -2
- fast_dev_cli-0.16.1/fast_dev_cli/__init__.py +1 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/fast_dev_cli/cli.py +24 -5
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/pyproject.toml +11 -2
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_bump.py +36 -0
- fast_dev_cli-0.15.2/fast_dev_cli/__init__.py +0 -1
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/LICENSE +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/README.md +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/fast_dev_cli/py.typed +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/pdm_build.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/scripts/check.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/scripts/format.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/scripts/test.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/__init__.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/conftest.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_fast_test.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_functions.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_lint.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_poetry_version_plugin.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_runserver.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_sync.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_tag.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_upgrade.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_upload.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/test_version.py +0 -0
- {fast_dev_cli-0.15.2 → fast_dev_cli-0.16.1}/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fast-dev-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.1
|
|
4
4
|
Summary: Python project development tool.
|
|
5
5
|
Author-Email: Waket Zheng <waketzheng@gmail.com>>
|
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
18
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
19
|
Classifier: Topic :: Software Development :: Libraries
|
|
19
20
|
Classifier: Topic :: Software Development
|
|
@@ -22,9 +23,9 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
22
23
|
Project-URL: Homepage, https://github.com/waketzheng/fast-dev-cli
|
|
23
24
|
Requires-Python: >=3.9
|
|
24
25
|
Requires-Dist: typer<1,>=0.12.3
|
|
26
|
+
Requires-Dist: tomli<3,>=2.0.1; python_version < "3.11"
|
|
25
27
|
Requires-Dist: emoji<3,>=2.12.1
|
|
26
28
|
Requires-Dist: packaging>=20.5
|
|
27
|
-
Requires-Dist: tomli<3,>=2.0.1; python_version < "3.11"
|
|
28
29
|
Requires-Dist: coverage<8,>=7.5.1
|
|
29
30
|
Requires-Dist: mypy<2,>=1.15.0
|
|
30
31
|
Requires-Dist: bumpversion2<2,>=1.4.3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.16.1"
|
|
@@ -18,11 +18,21 @@ from typing import (
|
|
|
18
18
|
get_args,
|
|
19
19
|
)
|
|
20
20
|
|
|
21
|
-
import emoji
|
|
22
21
|
import typer
|
|
23
22
|
from typer import Exit, Option, echo, secho
|
|
24
23
|
from typer.models import ArgumentInfo, OptionInfo
|
|
25
24
|
|
|
25
|
+
try:
|
|
26
|
+
from emoji import is_emoji
|
|
27
|
+
except ImportError:
|
|
28
|
+
|
|
29
|
+
def is_emoji(char: str) -> bool: # type:ignore[misc]
|
|
30
|
+
return (
|
|
31
|
+
not re.match(r"[\w\d\s]", char)
|
|
32
|
+
and not "\u4e00" <= char <= "\u9fff" # Chinese
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
26
36
|
try:
|
|
27
37
|
from . import __version__
|
|
28
38
|
except ImportError: # pragma: no cover
|
|
@@ -59,7 +69,12 @@ class ShellCommandError(Exception): ...
|
|
|
59
69
|
|
|
60
70
|
def poetry_module_name(name: str) -> str:
|
|
61
71
|
"""Get module name that generated by `poetry new`"""
|
|
62
|
-
|
|
72
|
+
try:
|
|
73
|
+
from packaging.utils import canonicalize_name
|
|
74
|
+
except ImportError:
|
|
75
|
+
|
|
76
|
+
def canonicalize_name(s: str) -> str: # type:ignore[misc]
|
|
77
|
+
return re.sub(r"[-_.]+", "-", s)
|
|
63
78
|
|
|
64
79
|
return canonicalize_name(name).replace("-", "_").replace(" ", "_")
|
|
65
80
|
|
|
@@ -175,9 +190,13 @@ def get_current_version(
|
|
|
175
190
|
work_dir = Project.get_work_dir()
|
|
176
191
|
package_name = re.sub(r"[- ]", "_", work_dir.name)
|
|
177
192
|
try:
|
|
178
|
-
|
|
193
|
+
installed_version = importlib_metadata.version(package_name)
|
|
179
194
|
except importlib_metadata.PackageNotFoundError:
|
|
180
|
-
|
|
195
|
+
...
|
|
196
|
+
else:
|
|
197
|
+
if installed_version != "0.0.0":
|
|
198
|
+
return installed_version
|
|
199
|
+
return read_version_from_file(package_name, work_dir)
|
|
181
200
|
|
|
182
201
|
cmd = ["poetry", "version", "-s"]
|
|
183
202
|
if verbose:
|
|
@@ -267,7 +286,7 @@ class BumpUp(DryRun):
|
|
|
267
286
|
except (IndexError, ShellCommandError):
|
|
268
287
|
return False
|
|
269
288
|
else:
|
|
270
|
-
return
|
|
289
|
+
return is_emoji(first_char)
|
|
271
290
|
|
|
272
291
|
@staticmethod
|
|
273
292
|
def parse_filename(
|
|
@@ -25,6 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Programming Language :: Python :: 3.11",
|
|
26
26
|
"Programming Language :: Python :: 3.12",
|
|
27
27
|
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Programming Language :: Python :: 3.14",
|
|
28
29
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
29
30
|
"Topic :: Software Development :: Libraries",
|
|
30
31
|
"Topic :: Software Development",
|
|
@@ -33,15 +34,15 @@ classifiers = [
|
|
|
33
34
|
]
|
|
34
35
|
dependencies = [
|
|
35
36
|
"typer >=0.12.3,<1",
|
|
37
|
+
"tomli >=2.0.1,<3; python_version < '3.11'",
|
|
36
38
|
"emoji >=2.12.1,<3",
|
|
37
39
|
"packaging >=20.5",
|
|
38
|
-
"tomli >=2.0.1,<3; python_version < '3.11'",
|
|
39
40
|
"coverage >=7.5.1,<8",
|
|
40
41
|
"mypy >=1.15.0,<2",
|
|
41
42
|
"bumpversion2 >=1.4.3,<2",
|
|
42
43
|
"pytest >=8.2.0,<9",
|
|
43
44
|
]
|
|
44
|
-
version = "0.
|
|
45
|
+
version = "0.16.1"
|
|
45
46
|
|
|
46
47
|
[project.urls]
|
|
47
48
|
Homepage = "https://github.com/waketzheng/fast-dev-cli"
|
|
@@ -163,3 +164,11 @@ exclude_dirs = [
|
|
|
163
164
|
"examples",
|
|
164
165
|
".venv",
|
|
165
166
|
]
|
|
167
|
+
|
|
168
|
+
[dependency-groups]
|
|
169
|
+
ci = [
|
|
170
|
+
"coveralls @ git+https://github.com/waketzheng/coveralls-python@4.1.1",
|
|
171
|
+
]
|
|
172
|
+
dev = [
|
|
173
|
+
"twine>=6.1.0",
|
|
174
|
+
]
|
|
@@ -365,3 +365,39 @@ build-backend = "pdm.backend"
|
|
|
365
365
|
out = capture_cmd_output("fast bump patch")
|
|
366
366
|
assert str(version_file) in out
|
|
367
367
|
assert "0.3.1" in version_file.read_text()
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
def test_installed_version_is_0_0_0(tmp_work_dir):
|
|
371
|
+
project_name = "my-project"
|
|
372
|
+
package_name = "app"
|
|
373
|
+
Path(project_name).mkdir()
|
|
374
|
+
with chdir(project_name):
|
|
375
|
+
Path(package_name).mkdir()
|
|
376
|
+
version_file = Path(package_name, "__init__.py")
|
|
377
|
+
version_file.write_text('__version__ = "0.3.0"')
|
|
378
|
+
toml_file = Path("pyproject.toml")
|
|
379
|
+
toml_file.write_text("""
|
|
380
|
+
[project]
|
|
381
|
+
name = "my-project"
|
|
382
|
+
description = ""
|
|
383
|
+
authors = [{name="Waket Zheng", email="waketzheng@gmail.com"}]
|
|
384
|
+
readme = "README.md"
|
|
385
|
+
dynamic = ["version"]
|
|
386
|
+
keywords = []
|
|
387
|
+
requires-python = ">=3.9"
|
|
388
|
+
dependencies = []
|
|
389
|
+
|
|
390
|
+
[tool.pdm]
|
|
391
|
+
distribution = false
|
|
392
|
+
|
|
393
|
+
[tool.pdm.version]
|
|
394
|
+
source = "file"
|
|
395
|
+
path = "app/__init__.py"
|
|
396
|
+
|
|
397
|
+
[build-system]
|
|
398
|
+
requires = ["pdm-backend"]
|
|
399
|
+
build-backend = "pdm.backend"
|
|
400
|
+
""")
|
|
401
|
+
out = capture_cmd_output("fast bump patch")
|
|
402
|
+
assert str(version_file) in out
|
|
403
|
+
assert "0.3.1" in version_file.read_text()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.15.2"
|
|
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
|