fast-dev-cli 0.6.1__tar.gz → 0.6.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.
- {fast_dev_cli-0.6.1 → fast_dev_cli-0.6.4}/PKG-INFO +11 -9
- {fast_dev_cli-0.6.1 → fast_dev_cli-0.6.4}/README.md +8 -6
- {fast_dev_cli-0.6.1 → fast_dev_cli-0.6.4}/fast_dev_cli/cli.py +18 -18
- {fast_dev_cli-0.6.1 → fast_dev_cli-0.6.4}/pyproject.toml +5 -5
- {fast_dev_cli-0.6.1 → fast_dev_cli-0.6.4}/LICENSE +0 -0
- {fast_dev_cli-0.6.1 → fast_dev_cli-0.6.4}/fast_dev_cli/__init__.py +0 -0
- {fast_dev_cli-0.6.1 → fast_dev_cli-0.6.4}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.6.1 → fast_dev_cli-0.6.4}/fast_dev_cli/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fast-dev-cli
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.4
|
|
4
4
|
Summary:
|
|
5
5
|
Author: Waket Zheng
|
|
6
6
|
Author-email: waketzheng@gmail.com
|
|
@@ -15,9 +15,9 @@ Requires-Dist: click (>=7.1.1)
|
|
|
15
15
|
Requires-Dist: coverage (>=6.5.0) ; extra == "all"
|
|
16
16
|
Requires-Dist: isort (>=5.12.0) ; extra == "all"
|
|
17
17
|
Requires-Dist: mypy (>=1.5.0) ; extra == "all"
|
|
18
|
-
Requires-Dist: pytest (>=8.
|
|
18
|
+
Requires-Dist: pytest (>=8.1.1,<9.0.0) ; extra == "all"
|
|
19
19
|
Requires-Dist: ruff (>=0.3) ; extra == "all"
|
|
20
|
-
Requires-Dist: typer
|
|
20
|
+
Requires-Dist: typer (>=0.12.0) ; extra == "all"
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
|
|
23
23
|
<p align="center">
|
|
@@ -31,7 +31,7 @@ Description-Content-Type: text/markdown
|
|
|
31
31
|
<img src="https://img.shields.io/pypi/v/fast-dev-cli?color=%2334D058&label=pypi%20package" alt="Package version">
|
|
32
32
|
</a>
|
|
33
33
|
<a href="https://pypi.org/project/fast-dev-cli" target="_blank">
|
|
34
|
-
<img src="https://img.shields.io/pypi/pyversions/fast-dev-cli.svg
|
|
34
|
+
<img src="https://img.shields.io/pypi/pyversions/fast-dev-cli.svg" alt="Supported Python versions">
|
|
35
35
|
</a>
|
|
36
36
|
<a href="https://github.com/waketzheng/fast-dev-cli/actions?query=workflow:ci" target="_blank">
|
|
37
37
|
<img src="https://github.com/waketzheng/fast-dev-cli/workflows/ci/badge.svg" alt="GithubActionResult">
|
|
@@ -59,6 +59,8 @@ $ pip install "fast-dev-cli[all]"
|
|
|
59
59
|
Successfully installed fast-dev-cli
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
</div>
|
|
63
|
+
|
|
62
64
|
## Usage
|
|
63
65
|
|
|
64
66
|
- Lint py code:
|
|
@@ -69,16 +71,16 @@ fast lint /path/to/file-or-directory
|
|
|
69
71
|
```bash
|
|
70
72
|
fast bump
|
|
71
73
|
```
|
|
74
|
+
- Run unittest and report coverage
|
|
75
|
+
```bash
|
|
76
|
+
fast test
|
|
77
|
+
```
|
|
72
78
|
- Export requirement file and install `pip install -r `
|
|
73
79
|
```bash
|
|
74
80
|
fast sync
|
|
75
81
|
```
|
|
76
|
-
- Upgrade main/dev
|
|
82
|
+
- Upgrade main/dev dependencies to latest version
|
|
77
83
|
```bash
|
|
78
84
|
fast upgrade
|
|
79
85
|
```
|
|
80
|
-
- Run unittest and report coverage
|
|
81
|
-
```bash
|
|
82
|
-
fast test
|
|
83
|
-
```
|
|
84
86
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<img src="https://img.shields.io/pypi/v/fast-dev-cli?color=%2334D058&label=pypi%20package" alt="Package version">
|
|
10
10
|
</a>
|
|
11
11
|
<a href="https://pypi.org/project/fast-dev-cli" target="_blank">
|
|
12
|
-
<img src="https://img.shields.io/pypi/pyversions/fast-dev-cli.svg
|
|
12
|
+
<img src="https://img.shields.io/pypi/pyversions/fast-dev-cli.svg" alt="Supported Python versions">
|
|
13
13
|
</a>
|
|
14
14
|
<a href="https://github.com/waketzheng/fast-dev-cli/actions?query=workflow:ci" target="_blank">
|
|
15
15
|
<img src="https://github.com/waketzheng/fast-dev-cli/workflows/ci/badge.svg" alt="GithubActionResult">
|
|
@@ -37,6 +37,8 @@ $ pip install "fast-dev-cli[all]"
|
|
|
37
37
|
Successfully installed fast-dev-cli
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
</div>
|
|
41
|
+
|
|
40
42
|
## Usage
|
|
41
43
|
|
|
42
44
|
- Lint py code:
|
|
@@ -47,15 +49,15 @@ fast lint /path/to/file-or-directory
|
|
|
47
49
|
```bash
|
|
48
50
|
fast bump
|
|
49
51
|
```
|
|
52
|
+
- Run unittest and report coverage
|
|
53
|
+
```bash
|
|
54
|
+
fast test
|
|
55
|
+
```
|
|
50
56
|
- Export requirement file and install `pip install -r `
|
|
51
57
|
```bash
|
|
52
58
|
fast sync
|
|
53
59
|
```
|
|
54
|
-
- Upgrade main/dev
|
|
60
|
+
- Upgrade main/dev dependencies to latest version
|
|
55
61
|
```bash
|
|
56
62
|
fast upgrade
|
|
57
63
|
```
|
|
58
|
-
- Run unittest and report coverage
|
|
59
|
-
```bash
|
|
60
|
-
fast test
|
|
61
|
-
```
|
|
@@ -164,9 +164,9 @@ class BumpUp(DryRun):
|
|
|
164
164
|
raise Exit(1) from e
|
|
165
165
|
|
|
166
166
|
def gen(self) -> str:
|
|
167
|
-
|
|
167
|
+
_version = get_current_version()
|
|
168
168
|
filename = self.filename
|
|
169
|
-
echo(f"Current version(@{filename}): {
|
|
169
|
+
echo(f"Current version(@{filename}): {_version}")
|
|
170
170
|
if self.part:
|
|
171
171
|
part = self.get_part(self.part)
|
|
172
172
|
else:
|
|
@@ -177,7 +177,7 @@ class BumpUp(DryRun):
|
|
|
177
177
|
part = "patch"
|
|
178
178
|
self.part = part
|
|
179
179
|
parse = r'--parse "(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)"'
|
|
180
|
-
cmd = f'bumpversion {parse} --current-version="{
|
|
180
|
+
cmd = f'bumpversion {parse} --current-version="{_version}" {part} {filename}'
|
|
181
181
|
if self.commit:
|
|
182
182
|
if part != "patch":
|
|
183
183
|
cmd += " --tag"
|
|
@@ -279,11 +279,11 @@ class UpgradeDependencies(Project, DryRun):
|
|
|
279
279
|
|
|
280
280
|
Example::
|
|
281
281
|
>>> s= 'typer = {extras = ["all"], version = "^0.9.0", optional = true}'
|
|
282
|
-
>>> parse_value(s, 'extras')
|
|
282
|
+
>>> UpgradeDependencies.parse_value(s, 'extras')
|
|
283
283
|
'all'
|
|
284
|
-
>>> parse_value(s, 'optional')
|
|
284
|
+
>>> UpgradeDependencies.parse_value(s, 'optional')
|
|
285
285
|
'true'
|
|
286
|
-
>>> parse_value(s, 'version')
|
|
286
|
+
>>> UpgradeDependencies.parse_value(s, 'version')
|
|
287
287
|
'^0.9.0'
|
|
288
288
|
"""
|
|
289
289
|
sep = key + " = "
|
|
@@ -402,16 +402,16 @@ class UpgradeDependencies(Project, DryRun):
|
|
|
402
402
|
dev_flags: str,
|
|
403
403
|
) -> str:
|
|
404
404
|
command = "poetry add "
|
|
405
|
-
|
|
405
|
+
_upgrade = ""
|
|
406
406
|
if main_args:
|
|
407
|
-
|
|
407
|
+
_upgrade = command + " ".join(main_args)
|
|
408
408
|
if dev_args:
|
|
409
|
-
if
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
if _upgrade:
|
|
410
|
+
_upgrade += " && "
|
|
411
|
+
_upgrade += command + dev_flags + " " + " ".join(dev_args)
|
|
412
412
|
for single in others:
|
|
413
|
-
|
|
414
|
-
return
|
|
413
|
+
_upgrade += f" && poetry add {' '.join(single)}"
|
|
414
|
+
return _upgrade
|
|
415
415
|
|
|
416
416
|
def gen(self) -> str:
|
|
417
417
|
return self.gen_cmd()
|
|
@@ -437,11 +437,11 @@ class GitTag(DryRun):
|
|
|
437
437
|
return "git push" in self.git_status
|
|
438
438
|
|
|
439
439
|
def gen(self):
|
|
440
|
-
|
|
440
|
+
_version = get_current_version(verbose=False)
|
|
441
441
|
if self.has_v_prefix():
|
|
442
442
|
# Add `v` at prefix to compare with bumpversion tool
|
|
443
|
-
|
|
444
|
-
cmd = f"git tag -a {
|
|
443
|
+
_version = "v" + _version
|
|
444
|
+
cmd = f"git tag -a {_version} -m {self.message!r} && git push --tags"
|
|
445
445
|
if self.should_push():
|
|
446
446
|
cmd += " && git push"
|
|
447
447
|
return cmd
|
|
@@ -484,7 +484,7 @@ class LintCode(DryRun):
|
|
|
484
484
|
@classmethod
|
|
485
485
|
def to_cmd(cls, paths=".", check_only=False):
|
|
486
486
|
cmd = ""
|
|
487
|
-
tools = ["isort", "black", "ruff check --fix", "mypy"]
|
|
487
|
+
tools = ["isort --profile=black", "black", "ruff check --fix", "mypy"]
|
|
488
488
|
if check_only:
|
|
489
489
|
tools[0] += " --check-only"
|
|
490
490
|
tools[1] += " --check --fast"
|
|
@@ -555,7 +555,7 @@ def make_style(
|
|
|
555
555
|
|
|
556
556
|
|
|
557
557
|
@cli.command(name="check")
|
|
558
|
-
def
|
|
558
|
+
def only_check(
|
|
559
559
|
dry: bool = Option(False, "--dry", help="Only print, not really run shell command"),
|
|
560
560
|
):
|
|
561
561
|
"""Check code style without reformat"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "fast-dev-cli"
|
|
3
|
-
version = "0.6.
|
|
3
|
+
version = "0.6.4"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["Waket Zheng <waketzheng@gmail.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -12,11 +12,11 @@ click = ">=7.1.1"
|
|
|
12
12
|
isort = {version = ">=5.12.0", optional = true}
|
|
13
13
|
black = {version = ">=23.9.1", optional = true}
|
|
14
14
|
ruff = {version = ">=0.3", optional = true}
|
|
15
|
-
typer = {extras = ["all"], version = ">=0.9.0", optional = true}
|
|
16
15
|
mypy = {version = ">=1.5.0", optional = true}
|
|
17
16
|
coverage = {version = ">=6.5.0", optional = true}
|
|
18
17
|
bumpversion = {version = "^0.6.0", optional = true}
|
|
19
|
-
pytest = {version = "^8.
|
|
18
|
+
pytest = {version = "^8.1.1", optional = true}
|
|
19
|
+
typer = {version = ">=0.12.0", optional = true}
|
|
20
20
|
|
|
21
21
|
[tool.poetry.extras]
|
|
22
22
|
all = ["isort", "black", "ruff", "typer", "mypy", "bumpversion", "pytest", "coverage"]
|
|
@@ -30,9 +30,9 @@ pytest = "*"
|
|
|
30
30
|
coverage = "*"
|
|
31
31
|
bumpversion = "*"
|
|
32
32
|
typer = {extras = ["all"], version = "*"}
|
|
33
|
-
ipython = "^8.
|
|
33
|
+
ipython = "^8.23.0"
|
|
34
34
|
coveralls = "^3.3.1"
|
|
35
|
-
pytest-mock = "^3.
|
|
35
|
+
pytest-mock = "^3.14.0"
|
|
36
36
|
|
|
37
37
|
[build-system]
|
|
38
38
|
requires = ["poetry-core"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|