plain.dev 0.33.0__tar.gz → 0.33.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.
- {plain_dev-0.33.0 → plain_dev-0.33.2}/PKG-INFO +48 -17
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/CHANGELOG.md +22 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/README.md +46 -15
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/cli.py +7 -2
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/core.py +1 -1
- {plain_dev-0.33.0 → plain_dev-0.33.2}/pyproject.toml +2 -2
- {plain_dev-0.33.0 → plain_dev-0.33.2}/.gitignore +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/LICENSE +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/README.md +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/__init__.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/contribute/README.md +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/contribute/__init__.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/contribute/cli.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/debug.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/default_settings.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/entrypoints.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/gunicorn_logging.json +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/mkcert.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/pdb.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/poncho/__init__.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/poncho/color.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/poncho/compat.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/poncho/manager.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/poncho/printer.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/poncho/process.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/precommit/__init__.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/precommit/cli.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/process.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/services.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/plain/dev/utils.py +0 -0
- {plain_dev-0.33.0 → plain_dev-0.33.2}/tests/settings.py +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: plain.dev
|
3
|
-
Version: 0.33.
|
4
|
-
Summary:
|
3
|
+
Version: 0.33.2
|
4
|
+
Summary: A single command that runs everything you need for local development.
|
5
5
|
Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
|
6
6
|
License-Expression: BSD-3-Clause
|
7
7
|
License-File: LICENSE
|
@@ -17,20 +17,41 @@ Description-Content-Type: text/markdown
|
|
17
17
|
|
18
18
|
# plain.dev
|
19
19
|
|
20
|
-
A single command that runs everything you need for local development
|
20
|
+
**A single command that runs everything you need for local development.**
|
21
21
|
|
22
22
|

|
23
23
|
|
24
|
-
|
24
|
+
- [Overview](#overview)
|
25
|
+
- [Commands](#commands)
|
26
|
+
- [`plain dev`](#plain-dev)
|
27
|
+
- [Services](#services)
|
28
|
+
- [Custom processes](#custom-processes)
|
29
|
+
- [`plain dev services`](#plain-dev-services)
|
30
|
+
- [`plain dev logs`](#plain-dev-logs)
|
31
|
+
- [`plain pre-commit`](#plain-pre-commit)
|
32
|
+
- [VS Code debugging](#vs-code-debugging)
|
33
|
+
- [Installation](#installation)
|
25
34
|
|
26
|
-
|
27
|
-
- [`plain dev services`](#plain-dev-services)
|
28
|
-
- [`plain dev logs`](#plain-dev-logs)
|
29
|
-
- [`plain pre-commit`](#plain-pre-commit)
|
30
|
-
- [`plain contrib`](#plain-contrib)
|
31
|
-
- [VS Code debugging](#vscode-debugging)
|
35
|
+
## Overview
|
32
36
|
|
33
|
-
|
37
|
+
The `plain.dev` package provides development tools for Plain applications. The main command, `plain dev`, starts everything you need for local development with a single command:
|
38
|
+
|
39
|
+
```bash
|
40
|
+
plain dev
|
41
|
+
```
|
42
|
+
|
43
|
+
This will:
|
44
|
+
|
45
|
+
- Run preflight checks
|
46
|
+
- Execute pending migrations
|
47
|
+
- Start your development server with auto-reload
|
48
|
+
- Build and watch CSS with Tailwind (if installed)
|
49
|
+
- Start required services (like databases)
|
50
|
+
- Run any custom processes you've defined
|
51
|
+
|
52
|
+
## Commands
|
53
|
+
|
54
|
+
### `plain dev`
|
34
55
|
|
35
56
|
The `plain dev` command does several things:
|
36
57
|
|
@@ -43,7 +64,7 @@ The `plain dev` command does several things:
|
|
43
64
|
- Any custom process defined in `pyproject.toml` at `tool.plain.dev.run`
|
44
65
|
- Necessary services (ex. Postgres) defined in `pyproject.toml` at `tool.plain.dev.services`
|
45
66
|
|
46
|
-
|
67
|
+
#### Services
|
47
68
|
|
48
69
|
Use services to define databases or other processes that your app _needs_ to be functional. The services will be started automatically in `plain dev`, but also in `plain pre-commit` (so preflight and tests have a database).
|
49
70
|
|
@@ -55,7 +76,7 @@ Ultimately, how you run your development database is up to you. But a recommende
|
|
55
76
|
postgres = {cmd = "docker run --name app-postgres --rm -p 54321:5432 -v $(pwd)/.plain/dev/pgdata:/var/lib/postgresql/data -e POSTGRES_PASSWORD=postgres postgres:15 postgres"}
|
56
77
|
```
|
57
78
|
|
58
|
-
|
79
|
+
#### Custom processes
|
59
80
|
|
60
81
|
Unlike [services](#services), custom processes are _only_ run during `plain dev`. This is a good place to run something like [ngrok](https://ngrok.com/) or a [Plain worker](../../../plain-worker), which you might need to use your local site, but don't need running for executing tests, for example.
|
61
82
|
|
@@ -65,12 +86,12 @@ Unlike [services](#services), custom processes are _only_ run during `plain dev`
|
|
65
86
|
ngrok = {command = "ngrok http $PORT"}
|
66
87
|
```
|
67
88
|
|
68
|
-
|
89
|
+
### `plain dev services`
|
69
90
|
|
70
91
|
Starts your [services](#services) by themselves.
|
71
92
|
Logs are stored in `.plain/dev/logs/services/`.
|
72
93
|
|
73
|
-
|
94
|
+
### `plain dev logs`
|
74
95
|
|
75
96
|
Show output from recent `plain dev` runs.
|
76
97
|
|
@@ -83,7 +104,7 @@ plain dev logs --pid 1234
|
|
83
104
|
plain dev logs --path
|
84
105
|
```
|
85
106
|
|
86
|
-
|
107
|
+
### `plain pre-commit`
|
87
108
|
|
88
109
|
A built-in pre-commit hook that can be installed with `plain pre-commit --install`.
|
89
110
|
|
@@ -104,7 +125,7 @@ Runs:
|
|
104
125
|
|
105
126
|
Since `plain dev` runs multiple processes at once, the regular [pdb](https://docs.python.org/3/library/pdb.html) debuggers don't quite work.
|
106
127
|
|
107
|
-
Instead, we include [microsoft/debugpy](https://github.com/microsoft/debugpy) and
|
128
|
+
Instead, we include [microsoft/debugpy](https://github.com/microsoft/debugpy) and provide debugging utilities to make it easier to use VS Code's debugger.
|
108
129
|
|
109
130
|
First, import and run the `debug.attach()` function:
|
110
131
|
|
@@ -127,3 +148,13 @@ class HomeView(TemplateView):
|
|
127
148
|
When you load the page, you'll see "Waiting for debugger to attach...".
|
128
149
|
|
129
150
|
You can then run the VS Code debugger and attach to an existing Python process, at localhost:5678.
|
151
|
+
|
152
|
+
## Installation
|
153
|
+
|
154
|
+
Install the `plain.dev` package from [PyPI](https://pypi.org/project/plain.dev/):
|
155
|
+
|
156
|
+
```bash
|
157
|
+
uv add plain.dev --dev
|
158
|
+
```
|
159
|
+
|
160
|
+
Note: The `plain.dev` package does not need to be added to `INSTALLED_PACKAGES`.
|
@@ -1,5 +1,27 @@
|
|
1
1
|
# plain-dev changelog
|
2
2
|
|
3
|
+
## [0.33.2](https://github.com/dropseed/plain/releases/plain-dev@0.33.2) (2025-08-22)
|
4
|
+
|
5
|
+
### What's changed
|
6
|
+
|
7
|
+
- The development localhost hostname is now automatically lowercased when generated from the pyproject.toml name ([4454f01](https://github.com/dropseed/plain/commit/4454f01787))
|
8
|
+
- Updated README with improved structure, table of contents, and better installation instructions ([4ebecd1](https://github.com/dropseed/plain/commit/4ebecd1856))
|
9
|
+
|
10
|
+
### Upgrade instructions
|
11
|
+
|
12
|
+
- No changes required
|
13
|
+
|
14
|
+
## [0.33.1](https://github.com/dropseed/plain/releases/plain-dev@0.33.1) (2025-07-18)
|
15
|
+
|
16
|
+
### What's changed
|
17
|
+
|
18
|
+
- Dev services are no longer automatically started when running in CI environments unless explicitly enabled with `PLAIN_DEV_SERVICES_AUTO=true` ([b8452bae74](https://github.com/dropseed/plain/commit/b8452bae74))
|
19
|
+
- The `plain dev logs` command now skips automatic service startup to avoid conflicts ([ff65428bca](https://github.com/dropseed/plain/commit/ff65428bca))
|
20
|
+
|
21
|
+
### Upgrade instructions
|
22
|
+
|
23
|
+
- No changes required
|
24
|
+
|
3
25
|
## [0.33.0](https://github.com/dropseed/plain/releases/plain-dev@0.33.0) (2025-07-18)
|
4
26
|
|
5
27
|
### What's changed
|
@@ -1,19 +1,40 @@
|
|
1
1
|
# plain.dev
|
2
2
|
|
3
|
-
A single command that runs everything you need for local development
|
3
|
+
**A single command that runs everything you need for local development.**
|
4
4
|
|
5
5
|

|
6
6
|
|
7
|
-
|
7
|
+
- [Overview](#overview)
|
8
|
+
- [Commands](#commands)
|
9
|
+
- [`plain dev`](#plain-dev)
|
10
|
+
- [Services](#services)
|
11
|
+
- [Custom processes](#custom-processes)
|
12
|
+
- [`plain dev services`](#plain-dev-services)
|
13
|
+
- [`plain dev logs`](#plain-dev-logs)
|
14
|
+
- [`plain pre-commit`](#plain-pre-commit)
|
15
|
+
- [VS Code debugging](#vs-code-debugging)
|
16
|
+
- [Installation](#installation)
|
8
17
|
|
9
|
-
|
10
|
-
- [`plain dev services`](#plain-dev-services)
|
11
|
-
- [`plain dev logs`](#plain-dev-logs)
|
12
|
-
- [`plain pre-commit`](#plain-pre-commit)
|
13
|
-
- [`plain contrib`](#plain-contrib)
|
14
|
-
- [VS Code debugging](#vscode-debugging)
|
18
|
+
## Overview
|
15
19
|
|
16
|
-
|
20
|
+
The `plain.dev` package provides development tools for Plain applications. The main command, `plain dev`, starts everything you need for local development with a single command:
|
21
|
+
|
22
|
+
```bash
|
23
|
+
plain dev
|
24
|
+
```
|
25
|
+
|
26
|
+
This will:
|
27
|
+
|
28
|
+
- Run preflight checks
|
29
|
+
- Execute pending migrations
|
30
|
+
- Start your development server with auto-reload
|
31
|
+
- Build and watch CSS with Tailwind (if installed)
|
32
|
+
- Start required services (like databases)
|
33
|
+
- Run any custom processes you've defined
|
34
|
+
|
35
|
+
## Commands
|
36
|
+
|
37
|
+
### `plain dev`
|
17
38
|
|
18
39
|
The `plain dev` command does several things:
|
19
40
|
|
@@ -26,7 +47,7 @@ The `plain dev` command does several things:
|
|
26
47
|
- Any custom process defined in `pyproject.toml` at `tool.plain.dev.run`
|
27
48
|
- Necessary services (ex. Postgres) defined in `pyproject.toml` at `tool.plain.dev.services`
|
28
49
|
|
29
|
-
|
50
|
+
#### Services
|
30
51
|
|
31
52
|
Use services to define databases or other processes that your app _needs_ to be functional. The services will be started automatically in `plain dev`, but also in `plain pre-commit` (so preflight and tests have a database).
|
32
53
|
|
@@ -38,7 +59,7 @@ Ultimately, how you run your development database is up to you. But a recommende
|
|
38
59
|
postgres = {cmd = "docker run --name app-postgres --rm -p 54321:5432 -v $(pwd)/.plain/dev/pgdata:/var/lib/postgresql/data -e POSTGRES_PASSWORD=postgres postgres:15 postgres"}
|
39
60
|
```
|
40
61
|
|
41
|
-
|
62
|
+
#### Custom processes
|
42
63
|
|
43
64
|
Unlike [services](#services), custom processes are _only_ run during `plain dev`. This is a good place to run something like [ngrok](https://ngrok.com/) or a [Plain worker](../../../plain-worker), which you might need to use your local site, but don't need running for executing tests, for example.
|
44
65
|
|
@@ -48,12 +69,12 @@ Unlike [services](#services), custom processes are _only_ run during `plain dev`
|
|
48
69
|
ngrok = {command = "ngrok http $PORT"}
|
49
70
|
```
|
50
71
|
|
51
|
-
|
72
|
+
### `plain dev services`
|
52
73
|
|
53
74
|
Starts your [services](#services) by themselves.
|
54
75
|
Logs are stored in `.plain/dev/logs/services/`.
|
55
76
|
|
56
|
-
|
77
|
+
### `plain dev logs`
|
57
78
|
|
58
79
|
Show output from recent `plain dev` runs.
|
59
80
|
|
@@ -66,7 +87,7 @@ plain dev logs --pid 1234
|
|
66
87
|
plain dev logs --path
|
67
88
|
```
|
68
89
|
|
69
|
-
|
90
|
+
### `plain pre-commit`
|
70
91
|
|
71
92
|
A built-in pre-commit hook that can be installed with `plain pre-commit --install`.
|
72
93
|
|
@@ -87,7 +108,7 @@ Runs:
|
|
87
108
|
|
88
109
|
Since `plain dev` runs multiple processes at once, the regular [pdb](https://docs.python.org/3/library/pdb.html) debuggers don't quite work.
|
89
110
|
|
90
|
-
Instead, we include [microsoft/debugpy](https://github.com/microsoft/debugpy) and
|
111
|
+
Instead, we include [microsoft/debugpy](https://github.com/microsoft/debugpy) and provide debugging utilities to make it easier to use VS Code's debugger.
|
91
112
|
|
92
113
|
First, import and run the `debug.attach()` function:
|
93
114
|
|
@@ -110,3 +131,13 @@ class HomeView(TemplateView):
|
|
110
131
|
When you load the page, you'll see "Waiting for debugger to attach...".
|
111
132
|
|
112
133
|
You can then run the VS Code debugger and attach to an existing Python process, at localhost:5678.
|
134
|
+
|
135
|
+
## Installation
|
136
|
+
|
137
|
+
Install the `plain.dev` package from [PyPI](https://pypi.org/project/plain.dev/):
|
138
|
+
|
139
|
+
```bash
|
140
|
+
uv add plain.dev --dev
|
141
|
+
```
|
142
|
+
|
143
|
+
Note: The `plain.dev` package does not need to be added to `INSTALLED_PACKAGES`.
|
@@ -24,6 +24,10 @@ class DevGroup(click.Group):
|
|
24
24
|
def _auto_start_services():
|
25
25
|
"""Start dev *services* in the background if not already running."""
|
26
26
|
|
27
|
+
# Check if we're in CI and auto-start is not explicitly enabled
|
28
|
+
if os.environ.get("CI") and os.environ.get("PLAIN_DEV_SERVICES_AUTO") is None:
|
29
|
+
return
|
30
|
+
|
27
31
|
if os.environ.get("PLAIN_DEV_SERVICES_AUTO", "true") not in [
|
28
32
|
"1",
|
29
33
|
"true",
|
@@ -32,8 +36,9 @@ class DevGroup(click.Group):
|
|
32
36
|
return
|
33
37
|
|
34
38
|
# Don't do anything if it looks like a "services" command is being run explicitly
|
35
|
-
if "
|
36
|
-
|
39
|
+
if "dev" in sys.argv:
|
40
|
+
if "logs" in sys.argv or "services" in sys.argv or "--stop" in sys.argv:
|
41
|
+
return
|
37
42
|
|
38
43
|
if not ServicesProcess.get_services(APP_PATH.parent):
|
39
44
|
return
|
@@ -1,7 +1,7 @@
|
|
1
1
|
[project]
|
2
2
|
name = "plain.dev"
|
3
|
-
version = "0.33.
|
4
|
-
description = "
|
3
|
+
version = "0.33.2"
|
4
|
+
description = "A single command that runs everything you need for local development."
|
5
5
|
authors = [{name = "Dave Gaeddert", email = "dave.gaeddert@dropseed.dev"}]
|
6
6
|
license = "BSD-3-Clause"
|
7
7
|
readme = "README.md"
|
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
|