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.
Files changed (24) hide show
  1. {plain_dev-0.4.0 → plain_dev-0.5.0}/PKG-INFO +1 -1
  2. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/contribute/cli.py +10 -46
  3. {plain_dev-0.4.0 → plain_dev-0.5.0}/pyproject.toml +1 -1
  4. {plain_dev-0.4.0 → plain_dev-0.5.0}/LICENSE +0 -0
  5. {plain_dev-0.4.0 → plain_dev-0.5.0}/README.md +0 -0
  6. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/README.md +0 -0
  7. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/__init__.py +0 -0
  8. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/cli.py +0 -0
  9. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/config.py +0 -0
  10. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/contribute/__init__.py +0 -0
  11. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/db/__init__.py +0 -0
  12. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/db/cli.py +0 -0
  13. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/db/container.py +0 -0
  14. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/debug.py +0 -0
  15. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/default_settings.py +0 -0
  16. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/pid.py +0 -0
  17. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/precommit/__init__.py +0 -0
  18. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/precommit/cli.py +0 -0
  19. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/requests.py +0 -0
  20. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/services.py +0 -0
  21. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/templates/dev/requests.html +0 -0
  22. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/urls.py +0 -0
  23. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/utils.py +0 -0
  24. {plain_dev-0.4.0 → plain_dev-0.5.0}/plain/dev/views.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plain.dev
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Local development tools for Plain.
5
5
  Home-page: https://plainframework.com
6
6
  License: BSD-3-Clause
@@ -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 poetry.lock", bold=True)
17
- result = subprocess.run(["git", "checkout", "pyproject.toml", "poetry.lock"])
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 poetry.lock", fg="red")
18
+ click.secho("Failed to checkout pyproject.toml and uv.lock", fg="red")
20
19
  sys.exit(result.returncode)
21
20
 
22
- click.secho("Removing current .venv", bold=True)
23
- result = subprocess.run(["rm", "-rf", ".venv"])
21
+ click.secho("Running uv sync", bold=True)
22
+ result = subprocess.run(["uv", "sync"])
24
23
  if result.returncode:
25
- click.secho("Failed to remove .venv", fg="red")
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
- "poetry",
53
+ "uv",
88
54
  "add",
89
55
  "--editable",
90
- "--group",
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
- "poetry",
66
+ "uv",
102
67
  "add",
103
68
  "--editable",
104
- "--group",
105
- poetry_group,
69
+ "--dev",
106
70
  str(repo),
107
71
  ]
108
72
  )
@@ -5,7 +5,7 @@ packages = [
5
5
  { include = "plain" },
6
6
  ]
7
7
 
8
- version = "0.4.0"
8
+ version = "0.5.0"
9
9
  description = "Local development tools for Plain."
10
10
  authors = ["Dave Gaeddert <dave.gaeddert@dropseed.dev>"]
11
11
  license = "BSD-3-Clause"
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