plain.dev 0.4.0__tar.gz → 0.5.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.
- {plain_dev-0.4.0 → plain_dev-0.5.0}/PKG-INFO +1 -1
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/contribute/cli.py +10 -46
- {plain_dev-0.4.0 → plain_dev-0.5.0}/pyproject.toml +1 -1
- {plain_dev-0.4.0 → plain_dev-0.5.0}/LICENSE +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/README.md +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/README.md +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/__init__.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/cli.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/config.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/contribute/__init__.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/db/__init__.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/db/cli.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/db/container.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/debug.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/default_settings.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/pid.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/precommit/__init__.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/precommit/cli.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/requests.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/services.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/templates/dev/requests.html +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/urls.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/utils.py +0 -0
- {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/views.py +0 -0
@@ -3,7 +3,6 @@ import sys
|
|
3
3
|
from pathlib import Path
|
4
4
|
|
5
5
|
import click
|
6
|
-
import tomllib
|
7
6
|
|
8
7
|
|
9
8
|
@click.command("contribute")
|
@@ -13,22 +12,16 @@ def cli(package, repo):
|
|
13
12
|
"""Contribute to plain by linking a package locally."""
|
14
13
|
|
15
14
|
if package == "reset":
|
16
|
-
click.secho("Undoing any changes to pyproject.toml and
|
17
|
-
result = subprocess.run(["git", "checkout", "pyproject.toml", "
|
15
|
+
click.secho("Undoing any changes to pyproject.toml and uv.lock", bold=True)
|
16
|
+
result = subprocess.run(["git", "checkout", "pyproject.toml", "uv.lock"])
|
18
17
|
if result.returncode:
|
19
|
-
click.secho("Failed to checkout pyproject.toml and
|
18
|
+
click.secho("Failed to checkout pyproject.toml and uv.lock", fg="red")
|
20
19
|
sys.exit(result.returncode)
|
21
20
|
|
22
|
-
click.secho("
|
23
|
-
result = subprocess.run(["
|
21
|
+
click.secho("Running uv sync", bold=True)
|
22
|
+
result = subprocess.run(["uv", "sync"])
|
24
23
|
if result.returncode:
|
25
|
-
click.secho("Failed to
|
26
|
-
sys.exit(result.returncode)
|
27
|
-
|
28
|
-
click.secho("Running poetry install", bold=True)
|
29
|
-
result = subprocess.run(["poetry", "install"])
|
30
|
-
if result.returncode:
|
31
|
-
click.secho("Failed to install", fg="red")
|
24
|
+
click.secho("Failed to sync", fg="red")
|
32
25
|
sys.exit(result.returncode)
|
33
26
|
|
34
27
|
return
|
@@ -53,42 +46,14 @@ def cli(package, repo):
|
|
53
46
|
)
|
54
47
|
click.secho(f"Using repo at {repo} ({repo_branch} branch)", bold=True)
|
55
48
|
|
56
|
-
pyproject = Path("pyproject.toml")
|
57
|
-
if not pyproject.exists():
|
58
|
-
click.secho("pyproject.toml not found", fg="red")
|
59
|
-
return
|
60
|
-
|
61
|
-
poetry_group = "main"
|
62
|
-
|
63
|
-
with pyproject.open("rb") as f:
|
64
|
-
pyproject_data = tomllib.load(f)
|
65
|
-
poetry_dependencies = (
|
66
|
-
pyproject_data.get("tool", {}).get("poetry", {}).get("dependencies", {})
|
67
|
-
)
|
68
|
-
|
69
|
-
for group_name, group_data in (
|
70
|
-
pyproject_data.get("tool", {}).get("poetry", {}).get("group", {}).items()
|
71
|
-
):
|
72
|
-
if package in group_data.get("dependencies", {}).keys():
|
73
|
-
poetry_group = group_name
|
74
|
-
break
|
75
|
-
|
76
|
-
if not poetry_group and package not in poetry_dependencies.keys():
|
77
|
-
click.secho(
|
78
|
-
f"{package} not found in pyproject.toml (only poetry is supported)",
|
79
|
-
fg="red",
|
80
|
-
)
|
81
|
-
return
|
82
|
-
|
83
49
|
click.secho(f"Linking {package} to {repo}", bold=True)
|
84
50
|
if package == "plain" or package.startswith("plain-"):
|
85
51
|
result = subprocess.run(
|
86
52
|
[
|
87
|
-
"
|
53
|
+
"uv",
|
88
54
|
"add",
|
89
55
|
"--editable",
|
90
|
-
"--
|
91
|
-
poetry_group,
|
56
|
+
"--dev",
|
92
57
|
str(repo / package), # Link a subdirectory
|
93
58
|
]
|
94
59
|
)
|
@@ -98,11 +63,10 @@ def cli(package, repo):
|
|
98
63
|
elif package.startswith("plainx-"):
|
99
64
|
result = subprocess.run(
|
100
65
|
[
|
101
|
-
"
|
66
|
+
"uv",
|
102
67
|
"add",
|
103
68
|
"--editable",
|
104
|
-
"--
|
105
|
-
poetry_group,
|
69
|
+
"--dev",
|
106
70
|
str(repo),
|
107
71
|
]
|
108
72
|
)
|
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
|