fast-dev-cli 0.18.5__tar.gz → 0.19.0__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.18.5 → fast_dev_cli-0.19.0}/PKG-INFO +2 -3
- fast_dev_cli-0.19.0/fast_dev_cli/__init__.py +1 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/fast_dev_cli/cli.py +18 -4
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/pyproject.toml +3 -4
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/conftest.py +1 -3
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_lint.py +1 -1
- fast_dev_cli-0.18.5/fast_dev_cli/__init__.py +0 -1
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/LICENSE +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/README.md +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/fast_dev_cli/py.typed +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/pdm_build.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/scripts/check.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/scripts/deps.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/scripts/format.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/scripts/test.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/__init__.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/assets/uv-tx.lock +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/assets/uv.lock +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_bump.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_deps.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_exec.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_fast_test.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_functions.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_help.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_poetry_version_plugin.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_pypi.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_runserver.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_sync.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_tag.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_upgrade.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_upload.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/tests/test_version.py +0 -0
- {fast_dev_cli-0.18.5 → fast_dev_cli-0.19.0}/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.19.0
|
|
4
4
|
Summary: Python project development tool.
|
|
5
5
|
Author-Email: Waket Zheng <waketzheng@gmail.com>>
|
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -9,7 +9,6 @@ Classifier: Intended Audience :: Science/Research
|
|
|
9
9
|
Classifier: Intended Audience :: System Administrators
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
11
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -21,7 +20,7 @@ Classifier: Topic :: Software Development
|
|
|
21
20
|
Classifier: Typing :: Typed
|
|
22
21
|
Classifier: License :: OSI Approved :: MIT License
|
|
23
22
|
Project-URL: Homepage, https://github.com/waketzheng/fast-dev-cli
|
|
24
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.10
|
|
25
24
|
Requires-Dist: typer-slim<1,>=0.12.3
|
|
26
25
|
Requires-Dist: tomli<3,>=2.0.1; python_version < "3.11"
|
|
27
26
|
Requires-Dist: emoji>=2.12.1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.19.0"
|
|
@@ -109,6 +109,8 @@ def is_windows() -> bool:
|
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
def yellow_warn(msg: str) -> None:
|
|
112
|
+
if is_windows() and (encoding := sys.stdout.encoding) != "utf-8":
|
|
113
|
+
msg = msg.encode(encoding, errors="ignore").decode(encoding)
|
|
112
114
|
secho(msg, fg="yellow")
|
|
113
115
|
|
|
114
116
|
|
|
@@ -219,7 +221,7 @@ def exit_if_run_failed(
|
|
|
219
221
|
|
|
220
222
|
|
|
221
223
|
def _parse_version(line: str, pattern: re.Pattern[str]) -> str:
|
|
222
|
-
return pattern.sub("", line).split("#")[0].strip(" '\"")
|
|
224
|
+
return pattern.sub("", line).split("#")[0].strip().strip(" '\"")
|
|
223
225
|
|
|
224
226
|
|
|
225
227
|
def read_version_from_file(
|
|
@@ -1003,7 +1005,11 @@ class LintCode(DryRun):
|
|
|
1003
1005
|
|
|
1004
1006
|
@staticmethod
|
|
1005
1007
|
def check_lint_tool_installed() -> bool:
|
|
1006
|
-
|
|
1008
|
+
try:
|
|
1009
|
+
return check_call("ruff --version")
|
|
1010
|
+
except FileNotFoundError:
|
|
1011
|
+
# Windows may raise FileNotFoundError when ruff not installed
|
|
1012
|
+
return False
|
|
1007
1013
|
|
|
1008
1014
|
@staticmethod
|
|
1009
1015
|
def missing_mypy_exec() -> bool:
|
|
@@ -1070,7 +1076,7 @@ class LintCode(DryRun):
|
|
|
1070
1076
|
if not should_run_by_tool:
|
|
1071
1077
|
if is_venv() and Path(sys.argv[0]).parent != Path.home().joinpath(
|
|
1072
1078
|
".local/bin"
|
|
1073
|
-
):
|
|
1079
|
+
): # Virtual environment activated and fast-dev-cli is installed in it
|
|
1074
1080
|
if not ruff_exists:
|
|
1075
1081
|
should_run_by_tool = True
|
|
1076
1082
|
command = "pipx install ruff"
|
|
@@ -1089,6 +1095,14 @@ class LintCode(DryRun):
|
|
|
1089
1095
|
"You may need to run the following command"
|
|
1090
1096
|
f" to install lint tools:\n\n {command}\n"
|
|
1091
1097
|
)
|
|
1098
|
+
elif tool == ToolOption.default:
|
|
1099
|
+
root = Project.get_work_dir(allow_cwd=True)
|
|
1100
|
+
if py := shutil.which("python"):
|
|
1101
|
+
try:
|
|
1102
|
+
Path(py).relative_to(root)
|
|
1103
|
+
except ValueError:
|
|
1104
|
+
# Virtual environment not activated
|
|
1105
|
+
should_run_by_tool = True
|
|
1092
1106
|
else:
|
|
1093
1107
|
should_run_by_tool = True
|
|
1094
1108
|
if should_run_by_tool and tool:
|
|
@@ -1268,7 +1282,7 @@ class Sync(DryRun):
|
|
|
1268
1282
|
ensure_pip = ""
|
|
1269
1283
|
if not UpgradeDependencies.should_with_dev():
|
|
1270
1284
|
export_cmd = export_cmd.replace(" --with=dev", "")
|
|
1271
|
-
if extras and isinstance(extras,
|
|
1285
|
+
if extras and isinstance(extras, str | list):
|
|
1272
1286
|
export_cmd += f" --{extras=}".replace("'", '"')
|
|
1273
1287
|
elif check_call(prefix + "python -m pip --version"):
|
|
1274
1288
|
ensure_pip = ""
|
|
@@ -12,7 +12,7 @@ authors = [
|
|
|
12
12
|
{ name = "Waket Zheng", email = "waketzheng@gmail.com>" },
|
|
13
13
|
]
|
|
14
14
|
readme = "README.md"
|
|
15
|
-
requires-python = ">=3.
|
|
15
|
+
requires-python = ">=3.10"
|
|
16
16
|
classifiers = [
|
|
17
17
|
"Development Status :: 4 - Beta",
|
|
18
18
|
"Intended Audience :: Developers",
|
|
@@ -20,7 +20,6 @@ classifiers = [
|
|
|
20
20
|
"Intended Audience :: System Administrators",
|
|
21
21
|
"Operating System :: OS Independent",
|
|
22
22
|
"Programming Language :: Python :: 3 :: Only",
|
|
23
|
-
"Programming Language :: Python :: 3.9",
|
|
24
23
|
"Programming Language :: Python :: 3.10",
|
|
25
24
|
"Programming Language :: Python :: 3.11",
|
|
26
25
|
"Programming Language :: Python :: 3.12",
|
|
@@ -42,7 +41,7 @@ dependencies = [
|
|
|
42
41
|
"bumpversion2 >=1.4.3",
|
|
43
42
|
"pytest >=8.2.0",
|
|
44
43
|
]
|
|
45
|
-
version = "0.
|
|
44
|
+
version = "0.19.0"
|
|
46
45
|
|
|
47
46
|
[project.urls]
|
|
48
47
|
Homepage = "https://github.com/waketzheng/fast-dev-cli"
|
|
@@ -164,7 +163,7 @@ omit = [
|
|
|
164
163
|
|
|
165
164
|
[tool.mypy]
|
|
166
165
|
pretty = true
|
|
167
|
-
python_version = "3.
|
|
166
|
+
python_version = "3.10"
|
|
168
167
|
ignore_missing_imports = true
|
|
169
168
|
check_untyped_defs = true
|
|
170
169
|
warn_unused_ignores = true
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import sys
|
|
2
1
|
from pathlib import Path
|
|
3
2
|
|
|
4
3
|
import pytest
|
|
@@ -59,6 +58,5 @@ def tmp_work_dir(tmp_path):
|
|
|
59
58
|
@pytest.fixture
|
|
60
59
|
def tmp_poetry_project(tmp_work_dir: Path):
|
|
61
60
|
Path(TOML_FILE).write_text(TOML_CONTENT)
|
|
62
|
-
|
|
63
|
-
run_and_echo("poetry config --local virtualenvs.in-project true")
|
|
61
|
+
run_and_echo("poetry config --local virtualenvs.in-project true")
|
|
64
62
|
yield tmp_work_dir
|
|
@@ -183,7 +183,7 @@ def test_dmypy_run(monkeypatch):
|
|
|
183
183
|
def test_lint_with_prefix(mocker):
|
|
184
184
|
mocker.patch("fast_dev_cli.cli.is_venv", return_value=False)
|
|
185
185
|
with capture_stdout() as stream:
|
|
186
|
-
make_style(["."], check_only=False, dry=True)
|
|
186
|
+
make_style(["."], check_only=False, dry=True, prefix=True)
|
|
187
187
|
assert "pdm run" in stream.getvalue()
|
|
188
188
|
|
|
189
189
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.18.5"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|