fast-dev-cli 0.11.1__tar.gz → 0.11.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.
Files changed (29) hide show
  1. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/PKG-INFO +10 -10
  2. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/README.md +8 -8
  3. fast_dev_cli-0.11.2/fast_dev_cli/__init__.py +1 -0
  4. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/pyproject.toml +2 -2
  5. fast_dev_cli-0.11.2/scripts/check.py +29 -0
  6. fast_dev_cli-0.11.2/scripts/format.py +13 -0
  7. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_bump.py +1 -1
  8. fast_dev_cli-0.11.1/fast_dev_cli/__init__.py +0 -1
  9. fast_dev_cli-0.11.1/scripts/check.py +0 -20
  10. fast_dev_cli-0.11.1/scripts/format.py +0 -15
  11. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/LICENSE +0 -0
  12. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/fast_dev_cli/__main__.py +0 -0
  13. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/fast_dev_cli/cli.py +0 -0
  14. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/fast_dev_cli/py.typed +0 -0
  15. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/pdm_build.py +0 -0
  16. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/scripts/test.py +0 -0
  17. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/__init__.py +0 -0
  18. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/conftest.py +0 -0
  19. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_fast_test.py +0 -0
  20. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_functions.py +0 -0
  21. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_lint.py +0 -0
  22. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_poetry_version_plugin.py +0 -0
  23. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_runserver.py +0 -0
  24. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_sync.py +0 -0
  25. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_tag.py +0 -0
  26. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_upgrade.py +0 -0
  27. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_upload.py +0 -0
  28. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.2}/tests/test_version.py +0 -0
  29. {fast_dev_cli-0.11.1 → fast_dev_cli-0.11.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.11.1
3
+ Version: 0.11.2
4
4
  Summary: Python project development tool.
5
5
  Author-Email: Waket Zheng <waketzheng@gmail.com>>
6
6
  Classifier: Development Status :: 4 - Beta
@@ -26,7 +26,7 @@ Requires-Dist: tomli<3,>=2.0.1; python_version < "3.11"
26
26
  Requires-Dist: coverage<8,>=7.5.1
27
27
  Requires-Dist: ruff<0.8,>=0.4.4
28
28
  Requires-Dist: mypy<2,>=1.10.0
29
- Requires-Dist: bumpversion2<2,>=1.4.2
29
+ Requires-Dist: bumpversion2<2,>=1.4.3
30
30
  Requires-Dist: pytest<9,>=8.2.0
31
31
  Provides-Extra: all
32
32
  Requires-Dist: ipython<9,>=8.24.0; extra == "all"
@@ -41,10 +41,10 @@ Description-Content-Type: text/markdown
41
41
  </p>
42
42
  <p align="center">
43
43
  <a href="https://pypi.org/project/fast-dev-cli" target="_blank">
44
- <img src="https://img.shields.io/pypi/v/fast-dev-cli?color=%2334D058&label=pypi%20package" alt="Package version">
44
+ <img src="https://img.shields.io/pypi/pyversions/fast-dev-cli.svg" alt="Supported Python versions">
45
45
  </a>
46
46
  <a href="https://pypi.org/project/fast-dev-cli" target="_blank">
47
- <img src="https://img.shields.io/pypi/pyversions/fast-dev-cli.svg" alt="Supported Python versions">
47
+ <img src="https://img.shields.io/pypi/v/fast-dev-cli?color=%2334D058&label=pypi%20package" alt="Package version">
48
48
  </a>
49
49
  <a href="https://github.com/waketzheng/fast-dev-cli/actions?query=workflow:ci" target="_blank">
50
50
  <img src="https://github.com/waketzheng/fast-dev-cli/workflows/ci/badge.svg" alt="GithubActionResult">
@@ -52,14 +52,14 @@ Description-Content-Type: text/markdown
52
52
  <a href="https://coveralls.io/github/waketzheng/fast-dev-cli?branch=main" target="_blank">
53
53
  <img src="https://coveralls.io/repos/github/waketzheng/fast-dev-cli/badge.svg?branch=main" alt="Coverage Status">
54
54
  </a>
55
- <a href="https://github.com/astral-sh/ruff" target="_blank">
56
- <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
57
- </a>
58
55
  <a href="https://github.com/python/mypy" target="_blank">
59
- <img src="https://img.shields.io/badge/mypy-100%25-green.svg" alt="Mypy Coverage">
56
+ <img src="https://img.shields.io/badge/mypy-100%25-brightgreen.svg" alt="Mypy Coverage">
60
57
  </a>
61
58
  <a href="https://github.com/PyCQA/bandit" target="_blank">
62
- <img src="https://img.shields.io/badge/security-bandit-yellow.svg" alt="security: bandit">
59
+ <img src="https://img.shields.io/badge/security-bandit-orange.svg" alt="security: bandit">
60
+ </a>
61
+ <a href="https://github.com/astral-sh/ruff" target="_blank">
62
+ <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
63
63
  </a>
64
64
  </p>
65
65
 
@@ -88,7 +88,7 @@ pip install fast-dev-cli
88
88
 
89
89
  - Lint py code:
90
90
  ```bash
91
- fast lint /path/to/file-or-directory
91
+ fast lint [/path/to/file-or-directory]
92
92
  ```
93
93
  - Check only
94
94
  ```bash
@@ -6,10 +6,10 @@
6
6
  </p>
7
7
  <p align="center">
8
8
  <a href="https://pypi.org/project/fast-dev-cli" target="_blank">
9
- <img src="https://img.shields.io/pypi/v/fast-dev-cli?color=%2334D058&label=pypi%20package" alt="Package version">
9
+ <img src="https://img.shields.io/pypi/pyversions/fast-dev-cli.svg" alt="Supported Python versions">
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" alt="Supported Python versions">
12
+ <img src="https://img.shields.io/pypi/v/fast-dev-cli?color=%2334D058&label=pypi%20package" alt="Package version">
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">
@@ -17,14 +17,14 @@
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
20
  <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">
21
+ <img src="https://img.shields.io/badge/mypy-100%25-brightgreen.svg" alt="Mypy Coverage">
25
22
  </a>
26
23
  <a href="https://github.com/PyCQA/bandit" target="_blank">
27
- <img src="https://img.shields.io/badge/security-bandit-yellow.svg" alt="security: bandit">
24
+ <img src="https://img.shields.io/badge/security-bandit-orange.svg" alt="security: bandit">
25
+ </a>
26
+ <a href="https://github.com/astral-sh/ruff" target="_blank">
27
+ <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
28
28
  </a>
29
29
  </p>
30
30
 
@@ -53,7 +53,7 @@ pip install fast-dev-cli
53
53
 
54
54
  - Lint py code:
55
55
  ```bash
56
- fast lint /path/to/file-or-directory
56
+ fast lint [/path/to/file-or-directory]
57
57
  ```
58
58
  - Check only
59
59
  ```bash
@@ -0,0 +1 @@
1
+ __version__ = "0.11.2"
@@ -37,10 +37,10 @@ dependencies = [
37
37
  "coverage >=7.5.1,<8",
38
38
  "ruff >=0.4.4,<0.8",
39
39
  "mypy >=1.10.0,<2",
40
- "bumpversion2 >=1.4.2,<2",
40
+ "bumpversion2 >=1.4.3,<2",
41
41
  "pytest >=8.2.0,<9",
42
42
  ]
43
- version = "0.11.1"
43
+ version = "0.11.2"
44
44
 
45
45
  [project.urls]
46
46
  Homepage = "https://github.com/waketzheng/fast-dev-cli"
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding:utf-8 -*-
3
+ import os
4
+ import sys
5
+
6
+ TOOL = ("pdm", "poetry", "uv")[0]
7
+ parent = os.path.abspath(os.path.dirname(__file__))
8
+ work_dir = os.path.dirname(parent)
9
+ if os.getcwd() != work_dir:
10
+ os.chdir(work_dir)
11
+
12
+
13
+ def run_and_echo(cmd, tool=TOOL, verbose=True):
14
+ # type: (str, str, bool) -> int
15
+ if tool:
16
+ cmd = tool + " run " + cmd
17
+ if verbose:
18
+ print("--> " + cmd)
19
+ return os.system(cmd)
20
+
21
+
22
+ if run_and_echo("fast check", verbose=False) != 0:
23
+ print("\033[1m Please run './scripts/format.py' to auto-fix style issues \033[0m")
24
+ sys.exit(1)
25
+
26
+ package_name = os.path.basename(work_dir).replace("-", "_").replace(" ", "_")
27
+ if run_and_echo("bandit -r {}".format(package_name)) != 0:
28
+ sys.exit(1)
29
+ print("Done. ✨ 🍰 ✨")
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding:utf-8 -*-
3
+ import os
4
+ import sys
5
+
6
+ parent = os.path.abspath(os.path.dirname(__file__))
7
+ work_dir = os.path.dirname(parent)
8
+ if os.getcwd() != work_dir:
9
+ os.chdir(work_dir)
10
+
11
+ cmd = "pdm run fast lint --skip-mypy"
12
+ if os.system(cmd) != 0:
13
+ sys.exit(1)
@@ -166,5 +166,5 @@ def test_bump_with_emoji(mocker, tmp_path, monkeypatch):
166
166
  subprocess.run(["poetry", "run", "pip", "install", "bumpversion2"])
167
167
  subprocess.run(["fast", "bump", "patch", "--commit"])
168
168
  out = capture_cmd_output(["git", "log"])
169
- new_commit = "⬆️ Bump version: 0.1.0 → 0.1.1"
169
+ new_commit = "⬆️ Bump version: 0.1.0 → 0.1.1"
170
170
  assert new_commit in out
@@ -1 +0,0 @@
1
- __version__ = "0.11.1"
@@ -1,20 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding:utf-8 -*-
3
- import os
4
- import sys
5
-
6
- parent = os.path.abspath(os.path.dirname(__file__))
7
- work_dir = os.path.dirname(parent)
8
- if os.getcwd() != work_dir:
9
- os.chdir(work_dir)
10
-
11
- if os.system("pdm run fast check") != 0:
12
- print("\033[1m Please run './scripts/format.py' to auto-fix style issues \033[0m")
13
- sys.exit(1)
14
-
15
- package_name = os.path.basename(work_dir).replace("-", "_")
16
- cmd = "pdm run bandit -r {}".format(package_name)
17
- print("-->", cmd)
18
- if os.system(cmd) != 0:
19
- sys.exit(1)
20
- print("Done. ✨ 🍰 ✨")
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding:utf-8 -*-
3
- import os
4
- import shlex
5
- import subprocess
6
- import sys
7
- from pathlib import Path
8
-
9
- work_dir = Path(__file__).parent.resolve().parent
10
- if Path.cwd() != work_dir:
11
- os.chdir(str(work_dir))
12
-
13
- cmd = "pdm run fast lint"
14
- r = subprocess.run(shlex.split(cmd), env=dict(os.environ, SKIP_MYPY="1"))
15
- sys.exit(None if r.returncode == 0 else 1)
File without changes