plain.dev 0.3.0__py3-none-any.whl → 0.5.0__py3-none-any.whl

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.
@@ -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
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plain.dev
3
- Version: 0.3.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
@@ -16,7 +16,7 @@ Requires-Dist: debugpy (>=1.6.3,<2.0.0)
16
16
  Requires-Dist: gunicorn (>20)
17
17
  Requires-Dist: honcho (>=1.1.0,<2.0.0)
18
18
  Requires-Dist: plain (<1.0.0)
19
- Requires-Dist: psycopg2-binary (>=2.9.3,<3.0.0)
19
+ Requires-Dist: psycopg[binary] (>=3.2.2,<4.0.0)
20
20
  Requires-Dist: requests (>=2.0.0)
21
21
  Requires-Dist: tomli (>=2.0.1,<3.0.0) ; python_version < "3.11"
22
22
  Project-URL: Documentation, https://plainframework.com/docs/
@@ -3,7 +3,7 @@ plain/dev/__init__.py,sha256=C1JrkNE5XX2DLgBXXLAV_UyhofwVd0ZPL59fPUMbOKo,139
3
3
  plain/dev/cli.py,sha256=4JOdOVvL4jjWad286g4lm4L9sdaFt7UJejaUK-TW3PU,4820
4
4
  plain/dev/config.py,sha256=h6o5YZtJhg-cFIWoqIDWuMCC5T09cxEsBaa3BP4Nii0,632
5
5
  plain/dev/contribute/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
6
- plain/dev/contribute/cli.py,sha256=SKy2UG5cD4M8E2gN48MJxH-PNTcxt53P3N0Xfb5nZWY,3529
6
+ plain/dev/contribute/cli.py,sha256=qZ7YmE_upbw-Y5NRpvaHnJTPp9kvn21fPQ7G0n1LAkg,2277
7
7
  plain/dev/db/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
8
8
  plain/dev/db/cli.py,sha256=058HjRKLGz-FxauQEpwsPoh_LCiy-_NEIpRZl9W1ZKM,2855
9
9
  plain/dev/db/container.py,sha256=RlPJU_CCMKA-zN8Kp0sYAu3jabOizxYAj8fSCsjCf60,5147
@@ -18,8 +18,8 @@ plain/dev/templates/dev/requests.html,sha256=kQKJZq5L77juuL_t8UjcAehEU61U4RXNnKa
18
18
  plain/dev/urls.py,sha256=b4NL2I6Ok-t7nTPjRnKoz_LQRttE3_mp8l2NlmeYQ9I,146
19
19
  plain/dev/utils.py,sha256=mL3C3l3GsKmtI6eF4sRjv7w9n7Y9lLVqJulj81JrqWw,312
20
20
  plain/dev/views.py,sha256=r2Ivk7OXytpRhXq4DZpsb7FXNP9vzmEE3D5kLajYG4w,1073
21
- plain_dev-0.3.0.dist-info/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
22
- plain_dev-0.3.0.dist-info/METADATA,sha256=0QH3g_Idl7I7jOCgj-gtEBamHbO6NNOZm09S_QK_iV8,4727
23
- plain_dev-0.3.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
24
- plain_dev-0.3.0.dist-info/entry_points.txt,sha256=rBo-S4THn07f55UwHBuUhIbDhlUq3EzTOD8mIb5fGQg,99
25
- plain_dev-0.3.0.dist-info/RECORD,,
21
+ plain_dev-0.5.0.dist-info/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
22
+ plain_dev-0.5.0.dist-info/METADATA,sha256=BUN9CnXC6gRHWTrI3S1_awfvuPONdIwala0ln9j6M5E,4727
23
+ plain_dev-0.5.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
24
+ plain_dev-0.5.0.dist-info/entry_points.txt,sha256=rBo-S4THn07f55UwHBuUhIbDhlUq3EzTOD8mIb5fGQg,99
25
+ plain_dev-0.5.0.dist-info/RECORD,,