fast-dev-cli 0.7.0__tar.gz → 0.7.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.7.0 → fast_dev_cli-0.7.1}/PKG-INFO +15 -6
- {fast_dev_cli-0.7.0 → fast_dev_cli-0.7.1}/README.md +6 -0
- fast_dev_cli-0.7.1/fast_dev_cli/__init__.py +31 -0
- {fast_dev_cli-0.7.0 → fast_dev_cli-0.7.1}/fast_dev_cli/cli.py +16 -5
- fast_dev_cli-0.7.1/pyproject.toml +50 -0
- fast_dev_cli-0.7.0/fast_dev_cli/__init__.py +0 -2
- fast_dev_cli-0.7.0/pyproject.toml +0 -53
- {fast_dev_cli-0.7.0 → fast_dev_cli-0.7.1}/LICENSE +0 -0
- {fast_dev_cli-0.7.0 → fast_dev_cli-0.7.1}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.7.0 → fast_dev_cli-0.7.1}/fast_dev_cli/py.typed +0 -0
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fast-dev-cli
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.1
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Waket Zheng
|
|
6
6
|
Author-email: waketzheng@gmail.com
|
|
7
|
-
Requires-Python: >=3.
|
|
7
|
+
Requires-Python: >=3.10,<4.0
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
9
10
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
12
|
Provides-Extra: all
|
|
12
13
|
Requires-Dist: bumpversion (>=0.6.0,<0.7.0) ; extra == "all"
|
|
13
14
|
Requires-Dist: click (>=7.1.1)
|
|
14
15
|
Requires-Dist: coverage (>=6.5.0) ; extra == "all"
|
|
15
|
-
Requires-Dist: mypy (>=1.
|
|
16
|
-
Requires-Dist: pytest (>=8.
|
|
17
|
-
Requires-Dist: ruff (>=0.
|
|
18
|
-
Requires-Dist:
|
|
16
|
+
Requires-Dist: mypy (>=1.10.0,<2.0.0) ; extra == "all"
|
|
17
|
+
Requires-Dist: pytest (>=8.2.0,<9.0.0) ; extra == "all"
|
|
18
|
+
Requires-Dist: ruff (>=0.4.2,<0.5.0) ; extra == "all"
|
|
19
|
+
Requires-Dist: strenum (>=0.4.15) ; python_version < "3.11"
|
|
20
|
+
Requires-Dist: type-extensions (>=0.1.2) ; python_version < "3.11"
|
|
21
|
+
Requires-Dist: typer (>=0.12.3,<0.13.0) ; extra == "all"
|
|
19
22
|
Description-Content-Type: text/markdown
|
|
20
23
|
|
|
21
24
|
<p align="center">
|
|
@@ -37,6 +40,12 @@ Description-Content-Type: text/markdown
|
|
|
37
40
|
<a href="https://coveralls.io/github/waketzheng/fast-dev-cli?branch=main" target="_blank">
|
|
38
41
|
<img src="https://coveralls.io/repos/github/waketzheng/fast-dev-cli/badge.svg?branch=main" alt="Coverage Status">
|
|
39
42
|
</a>
|
|
43
|
+
<a href="https://github.com/astral-sh/ruff" target="_blank">
|
|
44
|
+
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
|
|
45
|
+
</a>
|
|
46
|
+
<a href="https://github.com/python/mypy" target="_blank">
|
|
47
|
+
<img src="https://img.shields.io/badge/mypy-100%25-green.svg" alt="Mypy Coverage">
|
|
48
|
+
</a>
|
|
40
49
|
</p>
|
|
41
50
|
|
|
42
51
|
---
|
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
<a href="https://coveralls.io/github/waketzheng/fast-dev-cli?branch=main" target="_blank">
|
|
18
18
|
<img src="https://coveralls.io/repos/github/waketzheng/fast-dev-cli/badge.svg?branch=main" alt="Coverage Status">
|
|
19
19
|
</a>
|
|
20
|
+
<a href="https://github.com/astral-sh/ruff" target="_blank">
|
|
21
|
+
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
|
|
22
|
+
</a>
|
|
23
|
+
<a href="https://github.com/python/mypy" target="_blank">
|
|
24
|
+
<img src="https://img.shields.io/badge/mypy-100%25-green.svg" alt="Mypy Coverage">
|
|
25
|
+
</a>
|
|
20
26
|
</p>
|
|
21
27
|
|
|
22
28
|
---
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from .cli import (
|
|
2
|
+
__version__,
|
|
3
|
+
bump,
|
|
4
|
+
bump_version,
|
|
5
|
+
check,
|
|
6
|
+
lint,
|
|
7
|
+
make_style,
|
|
8
|
+
only_check,
|
|
9
|
+
sync,
|
|
10
|
+
tag,
|
|
11
|
+
test,
|
|
12
|
+
upgrade,
|
|
13
|
+
upload,
|
|
14
|
+
version,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
__all__ = (
|
|
18
|
+
"__version__",
|
|
19
|
+
"version",
|
|
20
|
+
"bump_version",
|
|
21
|
+
"bump",
|
|
22
|
+
"lint",
|
|
23
|
+
"check",
|
|
24
|
+
"upload",
|
|
25
|
+
"test",
|
|
26
|
+
"sync",
|
|
27
|
+
"tag",
|
|
28
|
+
"upgrade",
|
|
29
|
+
"make_style",
|
|
30
|
+
"only_check",
|
|
31
|
+
)
|
|
@@ -3,11 +3,18 @@ import os
|
|
|
3
3
|
import re
|
|
4
4
|
import subprocess
|
|
5
5
|
import sys
|
|
6
|
-
from enum import StrEnum
|
|
7
6
|
from functools import cached_property
|
|
8
7
|
from pathlib import Path
|
|
9
8
|
from subprocess import CompletedProcess
|
|
10
|
-
from typing import
|
|
9
|
+
from typing import Type
|
|
10
|
+
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from enum import StrEnum
|
|
13
|
+
from typing import Self
|
|
14
|
+
else: # pragma: no cover
|
|
15
|
+
from strenum import StrEnum # type:ignore[no-redef,assignment]
|
|
16
|
+
from typing_extensions import Self
|
|
17
|
+
|
|
11
18
|
|
|
12
19
|
__version__ = importlib.metadata.version(Path(__file__).parent.name)
|
|
13
20
|
|
|
@@ -380,8 +387,9 @@ class UpgradeDependencies(Project, DryRun):
|
|
|
380
387
|
main_title = "[tool.poetry.dependencies]"
|
|
381
388
|
text = toml_text.split(main_title)[-1]
|
|
382
389
|
dev_flag = "--group dev"
|
|
383
|
-
|
|
384
|
-
|
|
390
|
+
new_flag, old_flag = cls.DevFlag.new, cls.DevFlag.old
|
|
391
|
+
if (dev_title := getattr(new_flag, "value", new_flag)) not in text:
|
|
392
|
+
dev_title = getattr(old_flag, "value", old_flag) # For poetry<=1.2
|
|
385
393
|
dev_flag = "--dev"
|
|
386
394
|
others: list[list[str]] = []
|
|
387
395
|
try:
|
|
@@ -596,12 +604,15 @@ def _should_run_test_script(path: Path) -> bool:
|
|
|
596
604
|
@cli.command()
|
|
597
605
|
def test(
|
|
598
606
|
dry: bool = Option(False, "--dry", help="Only print, not really run shell command"),
|
|
607
|
+
ignore_script: bool = Option(False, "--ignore-script", "-i"),
|
|
599
608
|
) -> None:
|
|
600
609
|
"""Run unittest by pytest and report coverage"""
|
|
601
610
|
cwd = Path.cwd()
|
|
602
611
|
root = Project.get_work_dir(cwd=cwd, allow_cwd=True)
|
|
603
612
|
test_script = root / "scripts" / "test.sh"
|
|
604
|
-
if
|
|
613
|
+
if not isinstance(ignore_script, bool):
|
|
614
|
+
ignore_script = getattr(ignore_script, "default", False)
|
|
615
|
+
if not ignore_script and _should_run_test_script(test_script):
|
|
605
616
|
cmd = f"sh {test_script.relative_to(root)}"
|
|
606
617
|
if cwd != root:
|
|
607
618
|
cmd = f"cd {root} && " + cmd
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "fast-dev-cli"
|
|
3
|
+
version = "0.7.1"
|
|
4
|
+
description = ""
|
|
5
|
+
authors = ["Waket Zheng <waketzheng@gmail.com>"]
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
packages = [{include = "fast_dev_cli"}]
|
|
8
|
+
|
|
9
|
+
[tool.poetry.dependencies]
|
|
10
|
+
python = "^3.10"
|
|
11
|
+
click = ">=7.1.1" # Many package depends on click, so only limit min version
|
|
12
|
+
strenum = {version = ">=0.4.15", python = "<3.11"}
|
|
13
|
+
type-extensions = {version = ">=0.1.2", python = "<3.11"}
|
|
14
|
+
coverage = {version = ">=6.5.0", optional = true}
|
|
15
|
+
ruff = {version = "^0.4.2", optional = true}
|
|
16
|
+
mypy = {version = "^1.10.0", optional = true}
|
|
17
|
+
bumpversion = {version = "^0.6.0", optional = true}
|
|
18
|
+
pytest = {version = "^8.2.0", optional = true}
|
|
19
|
+
typer = {version = "^0.12.3", optional = true}
|
|
20
|
+
|
|
21
|
+
[tool.poetry.extras]
|
|
22
|
+
all = ["ruff", "typer", "mypy", "bumpversion", "pytest", "coverage"]
|
|
23
|
+
|
|
24
|
+
[tool.poetry.group.dev.dependencies]
|
|
25
|
+
coveralls = {version = ">=4.0.0", python = ">=3.10,<3.13"}
|
|
26
|
+
coverage = ">=6.5.0" # use >= to compare with coveralls
|
|
27
|
+
typer = "^0.12.3"
|
|
28
|
+
ruff = "^0.4.2"
|
|
29
|
+
mypy = "^1.10.0"
|
|
30
|
+
pytest = "^8.2.0"
|
|
31
|
+
ipython = "^8.24.0"
|
|
32
|
+
bumpversion = "^0.6.0"
|
|
33
|
+
pytest-mock = "^3.14.0"
|
|
34
|
+
type-extensions = "^0.1.2"
|
|
35
|
+
strenum = "^0.4.15"
|
|
36
|
+
|
|
37
|
+
[build-system]
|
|
38
|
+
requires = ["poetry-core"]
|
|
39
|
+
build-backend = "poetry.core.masonry.api"
|
|
40
|
+
|
|
41
|
+
[tool.poetry.scripts]
|
|
42
|
+
fast = "fast_dev_cli:cli.cli"
|
|
43
|
+
|
|
44
|
+
[tool.mypy]
|
|
45
|
+
pretty = true
|
|
46
|
+
ignore_missing_imports = true
|
|
47
|
+
check_untyped_defs = true
|
|
48
|
+
|
|
49
|
+
[tool.ruff.lint.per-file-ignores]
|
|
50
|
+
"test_*.py" = ["E501"]
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
[tool.poetry]
|
|
2
|
-
name = "fast-dev-cli"
|
|
3
|
-
version = "0.7.0"
|
|
4
|
-
description = ""
|
|
5
|
-
authors = ["Waket Zheng <waketzheng@gmail.com>"]
|
|
6
|
-
readme = "README.md"
|
|
7
|
-
packages = [{include = "fast_dev_cli"}]
|
|
8
|
-
|
|
9
|
-
[tool.poetry.dependencies]
|
|
10
|
-
python = "^3.11"
|
|
11
|
-
click = ">=7.1.1"
|
|
12
|
-
ruff = {version = ">=0.3", optional = true}
|
|
13
|
-
mypy = {version = ">=1.5.0", optional = true}
|
|
14
|
-
coverage = {version = ">=6.5.0", optional = true}
|
|
15
|
-
bumpversion = {version = "^0.6.0", optional = true}
|
|
16
|
-
pytest = {version = "^8.1.1", optional = true}
|
|
17
|
-
typer = {version = ">=0.12.0", optional = true}
|
|
18
|
-
|
|
19
|
-
[tool.poetry.extras]
|
|
20
|
-
all = ["ruff", "typer", "mypy", "bumpversion", "pytest", "coverage"]
|
|
21
|
-
|
|
22
|
-
[tool.poetry.group.dev.dependencies]
|
|
23
|
-
ruff = ">=0.3"
|
|
24
|
-
mypy = "*"
|
|
25
|
-
pytest = "*"
|
|
26
|
-
coverage = "*"
|
|
27
|
-
bumpversion = "*"
|
|
28
|
-
typer = {extras = ["all"], version = "*"}
|
|
29
|
-
ipython = "^8.23.0"
|
|
30
|
-
coveralls = "^3.3.1"
|
|
31
|
-
pytest-mock = "^3.14.0"
|
|
32
|
-
|
|
33
|
-
[build-system]
|
|
34
|
-
requires = ["poetry-core"]
|
|
35
|
-
build-backend = "poetry.core.masonry.api"
|
|
36
|
-
|
|
37
|
-
[tool.poetry.scripts]
|
|
38
|
-
fast = "fast_dev_cli:cli"
|
|
39
|
-
|
|
40
|
-
[tool.ruff]
|
|
41
|
-
target-version = "py311"
|
|
42
|
-
|
|
43
|
-
[tool.mypy]
|
|
44
|
-
pretty = true
|
|
45
|
-
ignore_missing_imports = true
|
|
46
|
-
check_untyped_defs = true
|
|
47
|
-
|
|
48
|
-
[[tool.mypy.overrides]]
|
|
49
|
-
module = ["tests.*"]
|
|
50
|
-
check_untyped_defs = false
|
|
51
|
-
|
|
52
|
-
[tool.ruff.lint.per-file-ignores]
|
|
53
|
-
"test_*.py" = ["E501"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|