PyArch-CLI 0.2.0__tar.gz → 0.3.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.
- pyarch_cli-0.3.0/.github/workflows/ci.yml +34 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/.gitignore +15 -11
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/.python-version +1 -1
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/PKG-INFO +85 -30
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/README.md +339 -282
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/assets/Dockerfile.vhs +11 -11
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/assets/pyarch-demo.tape +37 -37
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/assets/vhs-uv +17 -17
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/pyproject.toml +48 -48
- pyarch_cli-0.3.0/src/pyarch/__init__.py +1 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/cli/__init__.py +1 -1
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/cli/app.py +36 -29
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/cli/common.py +26 -24
- pyarch_cli-0.3.0/src/pyarch/cli/db.py +48 -0
- pyarch_cli-0.3.0/src/pyarch/cli/init.py +65 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/config/__init__.py +1 -1
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/config/manifest.py +190 -164
- pyarch_cli-0.3.0/src/pyarch/config/models.py +93 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/__init__.py +1 -1
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/common/__init__.py +1 -1
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/common/commands.py +6 -6
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/common/filesystem.py +46 -58
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/common/renderer.py +31 -31
- pyarch_cli-0.3.0/src/pyarch/generators/common/source_edit.py +322 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/integration/auth.py +72 -25
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/module/__init__.py +1 -1
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/module/layered.py +58 -39
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/project/__init__.py +1 -1
- pyarch_cli-0.3.0/src/pyarch/generators/project/base.py +145 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/project/layered.py +190 -159
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/main.py +9 -9
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/services/__init__.py +1 -1
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/services/add_integration.py +47 -44
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/services/create_module.py +29 -28
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/services/create_project.py +35 -31
- pyarch_cli-0.3.0/src/pyarch/services/database.py +228 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/alembic_env.py.j2 +57 -58
- pyarch_cli-0.3.0/src/pyarch/templates/layered/auth/config.py.j2 +13 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/auth/dependencies.py.j2 +3 -4
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/auth/refresh_session_model.py.j2 +6 -1
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/auth/routes.py.j2 +13 -14
- pyarch_cli-0.3.0/src/pyarch/templates/layered/auth/schemas.py.j2 +55 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/auth/service.py.j2 +55 -39
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/auth/test_auth.py.j2 +195 -117
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/auth/test_helpers.py.j2 +47 -47
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/auth/tokens.py.j2 +5 -5
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/auth/user_model.py.j2 +3 -2
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/auth/utils.py.j2 +4 -6
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/config.py.j2 +25 -22
- pyarch_cli-0.3.0/src/pyarch/templates/layered/env.example.j2 +17 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/errors.py.j2 +5 -6
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/exception_handlers.py.j2 +13 -13
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/models_init.py.j2 +5 -5
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/module/module_model.py.j2 +13 -13
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/module/module_repo.py.j2 +63 -57
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/module/module_router.py.j2 +59 -60
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/module/module_router_protected.py.j2 +73 -74
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/module/module_schema.py.j2 +23 -23
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/module/module_service.py.j2 +73 -67
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/module/module_test.py.j2 +43 -43
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/module/module_test_protected.py.j2 +70 -71
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/pagination.py.j2 +22 -22
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/router.py.j2 +7 -8
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/layered/session.py.j2 +33 -33
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/project/base/Dockerfile.j2 +2 -2
- pyarch_cli-0.3.0/src/pyarch/templates/project/base/README.md.j2 +39 -0
- pyarch_cli-0.3.0/src/pyarch/templates/project/base/ci.yml.j2 +26 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/project/base/conftest.py.j2 +68 -45
- pyarch_cli-0.3.0/src/pyarch/templates/project/base/docker-compose.postgres.yml.j2 +44 -0
- pyarch_cli-0.3.0/src/pyarch/templates/project/base/docker-compose.sqlite.yml.j2 +6 -0
- pyarch_cli-0.3.0/src/pyarch/templates/project/base/dockerignore.j2 +14 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/templates/project/base/main.py.j2 +8 -9
- pyarch_cli-0.3.0/src/pyarch/templates/project/base/ruff.toml.j2 +16 -0
- pyarch_cli-0.3.0/tests/integration/test_generated_project.py +77 -0
- pyarch_cli-0.3.0/tests/integration/test_project_generation.py +203 -0
- pyarch_cli-0.3.0/tests/unit/test_auth_integration.py +172 -0
- pyarch_cli-0.3.0/tests/unit/test_database_cli.py +57 -0
- pyarch_cli-0.3.0/tests/unit/test_database_service.py +380 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/tests/unit/test_filesystem.py +30 -27
- pyarch_cli-0.3.0/tests/unit/test_manifest.py +153 -0
- pyarch_cli-0.3.0/tests/unit/test_module_generator.py +163 -0
- pyarch_cli-0.3.0/tests/unit/test_source_edit.py +558 -0
- pyarch_cli-0.3.0/tests/unit/test_templates.py +209 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/uv.lock +567 -565
- pyarch_cli-0.2.0/.release-dist/.gitignore +0 -1
- pyarch_cli-0.2.0/src/pyarch/__init__.py +0 -1
- pyarch_cli-0.2.0/src/pyarch/cli/init.py +0 -34
- pyarch_cli-0.2.0/src/pyarch/config/models.py +0 -50
- pyarch_cli-0.2.0/src/pyarch/generators/project/base.py +0 -85
- pyarch_cli-0.2.0/src/pyarch/templates/layered/auth/config.py.j2 +0 -36
- pyarch_cli-0.2.0/src/pyarch/templates/layered/auth/schemas.py.j2 +0 -31
- pyarch_cli-0.2.0/src/pyarch/templates/layered/env.example.j2 +0 -16
- pyarch_cli-0.2.0/src/pyarch/templates/project/base/README.md.j2 +0 -13
- pyarch_cli-0.2.0/src/pyarch/templates/project/base/docker-compose.postgres.yml.j2 +0 -53
- pyarch_cli-0.2.0/src/pyarch/templates/project/base/docker-compose.sqlite.yml.j2 +0 -14
- pyarch_cli-0.2.0/tests/integration/test_generated_project.py +0 -58
- pyarch_cli-0.2.0/tests/integration/test_project_generation.py +0 -95
- pyarch_cli-0.2.0/tests/unit/test_manifest.py +0 -29
- pyarch_cli-0.2.0/tests/unit/test_module_generator.py +0 -43
- pyarch_cli-0.2.0/tests/unit/test_templates.py +0 -65
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/LICENSE +0 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/assets/pyarch-demo.gif +0 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/cli/add.py +0 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/cli/generate.py +0 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/cli/info.py +0 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/common/gitignore.py +0 -0
- {pyarch_cli-0.2.0 → pyarch_cli-0.3.0}/src/pyarch/generators/integration/__init__.py +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: pyarch-ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
checks:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v5
|
|
12
|
+
|
|
13
|
+
- uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.13"
|
|
16
|
+
|
|
17
|
+
- name: Install dependencies
|
|
18
|
+
run: |
|
|
19
|
+
pip install uv
|
|
20
|
+
uv sync
|
|
21
|
+
|
|
22
|
+
- name: linter
|
|
23
|
+
run: |
|
|
24
|
+
uv run ruff check .
|
|
25
|
+
uv run ruff format --check .
|
|
26
|
+
|
|
27
|
+
- name: run tests
|
|
28
|
+
run: uv run pytest
|
|
29
|
+
|
|
30
|
+
- name: type check
|
|
31
|
+
run: uv run mypy src tests
|
|
32
|
+
|
|
33
|
+
- name: build package
|
|
34
|
+
run: uv build
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
# Python-generated files
|
|
2
|
-
__pycache__/
|
|
3
|
-
*.py[oc]
|
|
4
|
-
build/
|
|
5
|
-
dist
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
*dist
|
|
6
|
+
dist/
|
|
7
|
+
wheels/
|
|
8
|
+
*.egg-info
|
|
9
|
+
*_cache
|
|
10
|
+
|
|
11
|
+
# Virtual environments
|
|
12
|
+
.venv
|
|
13
|
+
|
|
14
|
+
# OMP agent workspace
|
|
15
|
+
.omp/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
3.13
|
|
1
|
+
3.13
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: PyArch-CLI
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Stateful CLI generator for Layered FastAPI projects
|
|
5
5
|
Project-URL: Homepage, https://github.com/Allcode-1/PyArch
|
|
6
6
|
Project-URL: Repository, https://github.com/Allcode-1/PyArch
|
|
@@ -19,9 +19,7 @@ Classifier: Topic :: Software Development :: Code Generators
|
|
|
19
19
|
Requires-Python: >=3.13
|
|
20
20
|
Requires-Dist: cryptography>=46.0.3
|
|
21
21
|
Requires-Dist: jinja2>=3.1.6
|
|
22
|
-
Requires-Dist: mypy>=2.3.0
|
|
23
22
|
Requires-Dist: rich>=15.0.0
|
|
24
|
-
Requires-Dist: ruff>=0.16.1
|
|
25
23
|
Requires-Dist: tomlkit>=0.15.0
|
|
26
24
|
Requires-Dist: typer>=0.24.2
|
|
27
25
|
Description-Content-Type: text/markdown
|
|
@@ -34,7 +32,7 @@ Description-Content-Type: text/markdown
|
|
|
34
32
|

|
|
35
33
|

|
|
36
34
|

|
|
37
|
-

|
|
38
36
|
|
|
39
37
|
PyArch is a CLI for creating and extending Layered FastAPI projects. It sets up
|
|
40
38
|
the application structure, database, tests and Alembic, then lets you add CRUD
|
|
@@ -56,6 +54,7 @@ ready to change.
|
|
|
56
54
|
- Layered FastAPI project structure
|
|
57
55
|
- PostgreSQL and SQLite support
|
|
58
56
|
- Complete CRUD modules with models, schemas, repositories, services and routes
|
|
57
|
+
- GitHub Actions workflow for generated-project linting and tests
|
|
59
58
|
- Automatic model and router registration
|
|
60
59
|
- JWT auth integration with generated RSA keys
|
|
61
60
|
- Protected CRUD routes
|
|
@@ -64,13 +63,25 @@ ready to change.
|
|
|
64
63
|
- Project-aware generation through `pyarch.toml`
|
|
65
64
|
- Atomic project creation and rollback for failed extensions
|
|
66
65
|
|
|
67
|
-
## v0.
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
|
|
66
|
+
## v0.3.0 Highlights
|
|
67
|
+
|
|
68
|
+
- `ruff` and `mypy` moved to dev dependencies, keeping the installed CLI lean
|
|
69
|
+
- Auth settings live in `app/auth/config.py` and are registered in
|
|
70
|
+
`app/core/config.py` instead of overwriting the core config file
|
|
71
|
+
- Registration works without `# pyarch:*` markers: when a marker is missing
|
|
72
|
+
(older projects or user edits), PyArch finds the insertion point in the
|
|
73
|
+
Python syntax tree, so no manual edits are needed
|
|
74
|
+
- Password policy for auth users: at least 8 characters with uppercase,
|
|
75
|
+
lowercase, digit and special characters, limited to 72 bytes
|
|
76
|
+
- Refresh-token reuse detection revokes the whole token family
|
|
77
|
+
- Configurable application, tests and migrations directories
|
|
78
|
+
(`--app-dir`, `--tests-dir`, `--migrations-dir`), honored by every generator
|
|
79
|
+
- `pyarch db upgrade` restarts only the API service, waits until it is healthy,
|
|
80
|
+
and detects Compose service names automatically
|
|
81
|
+
- Zero manual setup: `.env` is created with working local defaults, host ports
|
|
82
|
+
are configurable via `POSTGRES_PORT` / `API_PORT`, the test database is
|
|
83
|
+
created automatically, and the project is pinned to Python 3.13 to match the
|
|
84
|
+
Docker image and CI
|
|
74
85
|
|
|
75
86
|
## Quick Start
|
|
76
87
|
|
|
@@ -90,9 +101,16 @@ pyarch init my_project --database postgres
|
|
|
90
101
|
cd my_project
|
|
91
102
|
```
|
|
92
103
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
`pyarch init` creates a ready-to-run `.env` from `.env.example` (local
|
|
105
|
+
PostgreSQL credentials `postgres`/`postgres`, database `app`). If host ports
|
|
106
|
+
5432 or 8000 are taken, change `POSTGRES_PORT` / `API_PORT` in `.env` (and the
|
|
107
|
+
port in `DATABASE_URL` / `TEST_DATABASE_URL`). The test suite creates the
|
|
108
|
+
`app_test` database on the same server automatically. For a PostgreSQL
|
|
109
|
+
project, initialize the database schema before starting the app:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pyarch db init
|
|
113
|
+
```
|
|
96
114
|
|
|
97
115
|
Start the generated application:
|
|
98
116
|
|
|
@@ -100,12 +118,22 @@ Start the generated application:
|
|
|
100
118
|
docker compose up -d
|
|
101
119
|
```
|
|
102
120
|
|
|
103
|
-
After
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
121
|
+
After a model change in a PostgreSQL project, generate and apply a reviewed
|
|
122
|
+
revision and restart the application with:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
pyarch db upgrade --message "describe schema change"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Without `--message`, PyArch prompts for one. Only the API service is stopped
|
|
129
|
+
and rebuilt; the database service keeps running. PyArch detects both Compose
|
|
130
|
+
service names from `docker compose config` (the service with a `build` key and
|
|
131
|
+
the one running a `postgres` image), so renaming them is fine; when detection
|
|
132
|
+
is ambiguous, pin the names in `pyarch.toml` with
|
|
133
|
+
`[compose] api_service = "..."` / `db_service = "..."`. When Alembic finds no
|
|
134
|
+
metadata changes, `db upgrade` restarts the API service but creates no empty
|
|
135
|
+
revision. Compose never runs migrations implicitly; migration files remain
|
|
136
|
+
source code and should be reviewed and committed.
|
|
109
137
|
|
|
110
138
|
## Safe Generation
|
|
111
139
|
|
|
@@ -120,12 +148,16 @@ Open `http://127.0.0.1:8000/docs` to use the generated Swagger UI.
|
|
|
120
148
|
You can now extend the project:
|
|
121
149
|
|
|
122
150
|
```bash
|
|
123
|
-
pyarch generate module
|
|
151
|
+
pyarch generate module user
|
|
124
152
|
pyarch add integration auth
|
|
125
|
-
pyarch generate module
|
|
153
|
+
pyarch generate module task --protected
|
|
126
154
|
pyarch info
|
|
127
155
|
```
|
|
128
156
|
|
|
157
|
+
Module names must be singular identifiers. PyArch derives the plural table and
|
|
158
|
+
route names from them: use `user` to generate `/users` and the `users` table,
|
|
159
|
+
not `users`.
|
|
160
|
+
|
|
129
161
|
## What Gets Generated
|
|
130
162
|
|
|
131
163
|
A new project includes the application layers, database configuration, test
|
|
@@ -145,6 +177,7 @@ my_project/
|
|
|
145
177
|
│ └── main.py
|
|
146
178
|
├── tests/
|
|
147
179
|
├── alembic/ # PostgreSQL and SQLite only
|
|
180
|
+
├── .env # created from .env.example, git-ignored
|
|
148
181
|
├── .env.example
|
|
149
182
|
├── pyarch.toml
|
|
150
183
|
└── pyproject.toml
|
|
@@ -165,9 +198,10 @@ Each generated CRUD module adds:
|
|
|
165
198
|
| ------------------------------------------- | ------------------------------------------------ |
|
|
166
199
|
| `pyarch init <name>` | Create a Layered FastAPI project |
|
|
167
200
|
| `pyarch init <name> --database <engine>` | Select PostgreSQL or SQLite |
|
|
168
|
-
| `pyarch
|
|
201
|
+
| `pyarch init <name> --app-dir <pkg> --tests-dir <pkg> --migrations-dir <path>` | Custom application package, tests package and Alembic directory |
|
|
202
|
+
| `pyarch generate module <singular-name>` | Add a CRUD module to the current project |
|
|
169
203
|
| `pyarch add integration auth` | Add JWT authentication and user management |
|
|
170
|
-
| `pyarch generate module <name> --protected` | Generate CRUD routes
|
|
204
|
+
| `pyarch generate module <singular-name> --protected` | Generate protected CRUD routes |
|
|
171
205
|
| `pyarch info` | Show the current project configuration |
|
|
172
206
|
| `pyarch --help` | Show CLI help |
|
|
173
207
|
|
|
@@ -184,6 +218,9 @@ Current limitations:
|
|
|
184
218
|
|
|
185
219
|
- only Layered Architecture is supported;
|
|
186
220
|
- generated applications use synchronous database access;
|
|
221
|
+
- SQLite projects run locally and do not include Docker Compose; `pyarch db`
|
|
222
|
+
lifecycle commands are PostgreSQL-only. SQLite migrations can be run with
|
|
223
|
+
Alembic directly;
|
|
187
224
|
- generated projects are starter scaffolds and still require
|
|
188
225
|
application-specific configuration and code;
|
|
189
226
|
- the manifest format may change before a stable release.
|
|
@@ -267,8 +304,10 @@ not have to guess the architecture, database or enabled features.
|
|
|
267
304
|
<summary>Why marker-based registration?</summary>
|
|
268
305
|
|
|
269
306
|
PyArch modifies files it generated itself. Explicit markers provide stable and
|
|
270
|
-
readable insertion points for model and
|
|
271
|
-
|
|
307
|
+
readable insertion points for model, router and settings registration. When a
|
|
308
|
+
marker is missing, PyArch falls back to the Python syntax tree: imports go after
|
|
309
|
+
the last import, settings fields into the `Settings` class, model names into
|
|
310
|
+
`__all__` and router includes to the end of the router module.
|
|
272
311
|
|
|
273
312
|
</details>
|
|
274
313
|
|
|
@@ -283,14 +322,30 @@ instead of producing incomplete files.
|
|
|
283
322
|
|
|
284
323
|
## Roadmap
|
|
285
324
|
|
|
286
|
-
### v0.
|
|
325
|
+
### v0.3.0 (current)
|
|
326
|
+
|
|
327
|
+
- dev-only linting and type-checking dependencies for the CLI itself;
|
|
328
|
+
- auth settings registration that preserves the core config;
|
|
329
|
+
- marker-free fallback registration via the Python syntax tree;
|
|
330
|
+
- password policy and refresh-token family revocation on reuse;
|
|
331
|
+
- configurable project paths honored by every generator;
|
|
332
|
+
- API-only restart with auto-detected Compose service names;
|
|
333
|
+
- ready-to-run `.env`, configurable host ports, auto-created test database.
|
|
334
|
+
|
|
335
|
+
### v0.2.1
|
|
336
|
+
|
|
337
|
+
- singular module-name contract and corrected SQLite workflow documentation;
|
|
338
|
+
- generated GitHub Actions workflow for linting and tests;
|
|
339
|
+
- package and generated-manifest versions kept in sync.
|
|
340
|
+
|
|
341
|
+
### v0.2.0
|
|
287
342
|
|
|
288
343
|
- atomic project creation and cleanup on failure;
|
|
289
344
|
- rollback for failed module and auth generation;
|
|
290
|
-
- PostgreSQL
|
|
345
|
+
- PostgreSQL Compose template and SQLite local setup;
|
|
291
346
|
- self-test suite and generated-project integration coverage.
|
|
292
347
|
|
|
293
|
-
### v0.
|
|
348
|
+
### v0.4
|
|
294
349
|
|
|
295
350
|
- Redis integration foundation;
|
|
296
351
|
- opt-in cache-aside generation for CRUD modules;
|
|
@@ -305,6 +360,6 @@ instead of producing incomplete files.
|
|
|
305
360
|
|
|
306
361
|
## Status
|
|
307
362
|
|
|
308
|
-
PyArch v0.
|
|
363
|
+
PyArch v0.3.0 is an early alpha release. The main workflow is usable, but
|
|
309
364
|
commands, templates, generated code and the manifest may still change before a
|
|
310
365
|
stable release.
|