csrd-utils 0.3.44__tar.gz → 0.3.45__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.
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/PKG-INFO +1 -1
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/pyproject.toml +1 -1
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/generator.py +94 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/pyproject.toml +0 -3
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/tests/conftest.py +1 -5
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/tests/test_items.py +4 -4
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/tests/unit/test_cache.py +1 -1
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/tests/unit/test_settings_contracts.py +5 -5
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/tests/unit/test_worker_broker.py +1 -1
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/.gitignore +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/README.md +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/__main__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/audit.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/augmentor.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/cluster.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/doctor.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/conftest.fragment.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/docker-compose.fragment.yaml +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/manifest.yaml +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/requirements.fragment +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/settings.fragment.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/src/app/cache.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/tests/test_cache.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/logging/conftest.fragment.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/logging/manifest.yaml +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/logging/requirements.fragment +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/logging/settings.fragment.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/logging/src/app/middleware/logging.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/logging/tests/test_logging_middleware.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/conftest.fragment.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/docker-compose.fragment.yaml +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/manifest.yaml +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/requirements.fragment +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/settings.fragment.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/src/app/middleware/metrics.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/tests/test_metrics_middleware.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/tracing/conftest.fragment.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/tracing/manifest.yaml +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/tracing/requirements.fragment +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/tracing/settings.fragment.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/tracing/src/app/middleware/tracing.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/tracing/tests/test_tracing_middleware.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/conftest.fragment.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/docker-compose.fragment.yaml +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/manifest.yaml +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/requirements.fragment +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/settings.fragment.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/src/app/workers/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/src/app/workers/celery_app.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/src/app/workers/tasks.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/tests/test_workers.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/fragments.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/resources.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/README.md +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/cookiecutter.json +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/hooks/post_gen_project.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/.cookiecutterignore +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/.dockerignore +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/Dockerfile +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/README.md +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/cache.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/delegates/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/delegates/upstreams.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/dependencies/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/dependencies/delegates.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/dependencies/item_repository.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/dependencies/worker_broker.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/docker-compose.yml +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/middleware/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/middleware/logging.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/py.typed +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/repositories/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/repositories/item_repository.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/requirements.txt +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/settings.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/tests/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/tests/acceptance/test_logging_middleware.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/tests/unit/test_database_settings.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/tests/unit/test_delegates.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/views/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/views/unversioned/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/views/unversioned/health_view.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/views/unversioned/items_view.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/workers/__init__.py +0 -0
- {csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.__service_name_snake}}/workers/tasks.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: csrd-utils
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.45
|
|
4
4
|
Summary: CLI utilities for csrd service generation and feature augmentation
|
|
5
5
|
Project-URL: Repository, https://github.com/csrd-api/fastapi-common
|
|
6
6
|
Project-URL: Documentation, https://github.com/csrd-api/fastapi-common/tree/main/packages/utils
|
|
@@ -9,6 +9,61 @@ from cookiecutter.main import cookiecutter
|
|
|
9
9
|
|
|
10
10
|
from .resources import templates_path
|
|
11
11
|
|
|
12
|
+
_WORKSPACE_PYTEST_TOML = """\
|
|
13
|
+
# Workspace-level tool configuration.
|
|
14
|
+
# Add [project] and [build-system] sections if you need to publish this workspace as a package.
|
|
15
|
+
|
|
16
|
+
[tool.pytest.ini_options]
|
|
17
|
+
asyncio_mode = "auto"
|
|
18
|
+
testpaths = ["tests"]
|
|
19
|
+
pythonpath = ["src"]
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
_WORKSPACE_README = """\
|
|
23
|
+
# Workspace
|
|
24
|
+
|
|
25
|
+
Generated workspace with one or more microservices.
|
|
26
|
+
|
|
27
|
+
## Run tests
|
|
28
|
+
|
|
29
|
+
From the workspace root, run all tests:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pytest
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Run tests for a specific service:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pytest tests/unit/{service_name}
|
|
39
|
+
pytest tests/acceptance/{service_name}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Run tests in watch mode (requires `pytest-watch`):
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
ptw
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Run services
|
|
49
|
+
|
|
50
|
+
See individual service README files under `src/{service_name}/README.md` for instructions on running each service.
|
|
51
|
+
|
|
52
|
+
## Docker Compose
|
|
53
|
+
|
|
54
|
+
Run all services and infrastructure:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
docker compose up --build
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Check service health:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
./smoke.sh
|
|
64
|
+
```
|
|
65
|
+
"""
|
|
66
|
+
|
|
12
67
|
|
|
13
68
|
def _build_context(
|
|
14
69
|
*,
|
|
@@ -123,6 +178,12 @@ def generate_service(
|
|
|
123
178
|
_move_docker_files_to_workspace_root(generated_path, output_root, name)
|
|
124
179
|
_move_tests_to_workspace_root(generated_path, output_root, name)
|
|
125
180
|
|
|
181
|
+
# Ensure workspace root has a pyproject.toml with pytest config.
|
|
182
|
+
_write_workspace_pyproject(output_root)
|
|
183
|
+
|
|
184
|
+
# Ensure workspace root has a README with test running instructions.
|
|
185
|
+
_write_workspace_readme(output_root)
|
|
186
|
+
|
|
126
187
|
return generated_path
|
|
127
188
|
|
|
128
189
|
|
|
@@ -193,3 +254,36 @@ def _move_tests_to_workspace_root(
|
|
|
193
254
|
shutil.copy2(src_file, acceptance_dst / filename)
|
|
194
255
|
|
|
195
256
|
shutil.rmtree(tests_src, ignore_errors=True)
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def _write_workspace_pyproject(workspace_root: Path) -> None:
|
|
260
|
+
"""Write or update workspace-level pyproject.toml with pytest configuration.
|
|
261
|
+
|
|
262
|
+
If the file does not exist it is created from scratch. If it already exists
|
|
263
|
+
and already contains a ``[tool.pytest.ini_options]`` section it is left
|
|
264
|
+
untouched (the user may have customised it). Otherwise the pytest block is
|
|
265
|
+
appended so that a second ``generate_service`` call on the same workspace
|
|
266
|
+
gains the config without clobbering prior edits.
|
|
267
|
+
"""
|
|
268
|
+
dst = workspace_root / "pyproject.toml"
|
|
269
|
+
if dst.exists():
|
|
270
|
+
existing = dst.read_text(encoding="utf-8")
|
|
271
|
+
if "[tool.pytest.ini_options]" in existing:
|
|
272
|
+
return
|
|
273
|
+
dst.write_text(
|
|
274
|
+
existing.rstrip() + "\n\n" + _WORKSPACE_PYTEST_TOML,
|
|
275
|
+
encoding="utf-8",
|
|
276
|
+
)
|
|
277
|
+
else:
|
|
278
|
+
dst.write_text(_WORKSPACE_PYTEST_TOML, encoding="utf-8")
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
def _write_workspace_readme(workspace_root: Path) -> None:
|
|
282
|
+
"""Write workspace-level README.md with test running and setup instructions.
|
|
283
|
+
|
|
284
|
+
If the file does not exist it is created from scratch. If it already exists
|
|
285
|
+
it is left untouched (the user may have customised it).
|
|
286
|
+
"""
|
|
287
|
+
dst = workspace_root / "README.md"
|
|
288
|
+
if not dst.exists():
|
|
289
|
+
dst.write_text(_WORKSPACE_README, encoding="utf-8")
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"""Shared test fixtures for {{ cookiecutter.service_name }}."""
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
-
import sys
|
|
5
|
-
from pathlib import Path
|
|
6
4
|
|
|
7
5
|
import pytest
|
|
8
6
|
from fastapi.testclient import TestClient
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
from app import build_app
|
|
8
|
+
from {{cookiecutter.__service_name_snake}} import build_app
|
|
13
9
|
|
|
14
10
|
HAS_DATABASE = {{"True" if cookiecutter.has_database else "False"}}
|
|
15
11
|
DB_KIND = "{{ cookiecutter.database }}"
|
|
@@ -111,7 +111,7 @@ def test_delegate_create_and_list(monkeypatch, client):
|
|
|
111
111
|
return {"id": "d1", "name": payload["name"], "created_at": "2026-01-01T00:00:00Z"}
|
|
112
112
|
return {"{{ cookiecutter.model_name_plural | lower | replace(' ', '_') }}": [{"id": "d1", "name": "X", "created_at": "t"}]}
|
|
113
113
|
|
|
114
|
-
monkeypatch.setattr("
|
|
114
|
+
monkeypatch.setattr("{{cookiecutter.__service_name_snake}}.views.unversioned.items_view._delegate_request", fake_delegate_request)
|
|
115
115
|
|
|
116
116
|
created = client.post(
|
|
117
117
|
"/api/{{ cookiecutter.model_name_plural | lower | replace(' ', '_') }}", json={"name": "X"}
|
|
@@ -130,7 +130,7 @@ def test_delegate_error_mapping(monkeypatch, client):
|
|
|
130
130
|
async def fake_delegate_request(_method: str, _path: str, payload=None):
|
|
131
131
|
raise HTTPException(status_code=404, detail="not found")
|
|
132
132
|
|
|
133
|
-
monkeypatch.setattr("
|
|
133
|
+
monkeypatch.setattr("{{cookiecutter.__service_name_snake}}.views.unversioned.items_view._delegate_request", fake_delegate_request)
|
|
134
134
|
response = client.get("/api/{{ cookiecutter.model_name_plural | lower | replace(' ', '_') }}/missing")
|
|
135
135
|
assert response.status_code == 404
|
|
136
136
|
|
|
@@ -147,7 +147,7 @@ def test_delegate_get_update_upsert_delete(monkeypatch, client):
|
|
|
147
147
|
return {"id": "d2", "deleted": True}
|
|
148
148
|
return {}
|
|
149
149
|
|
|
150
|
-
monkeypatch.setattr("
|
|
150
|
+
monkeypatch.setattr("{{cookiecutter.__service_name_snake}}.views.unversioned.items_view._delegate_request", fake_delegate_request)
|
|
151
151
|
|
|
152
152
|
fetched = client.get("/api/{{ cookiecutter.model_name_plural | lower | replace(' ', '_') }}/d2")
|
|
153
153
|
assert fetched.status_code == 200
|
|
@@ -176,7 +176,7 @@ def test_delegate_list_invalid_payload_returns_502(monkeypatch, client):
|
|
|
176
176
|
async def fake_delegate_request(_method: str, _path: str, payload=None):
|
|
177
177
|
return {"{{ cookiecutter.model_name_plural | lower | replace(' ', '_') }}": "bad"}
|
|
178
178
|
|
|
179
|
-
monkeypatch.setattr("
|
|
179
|
+
monkeypatch.setattr("{{cookiecutter.__service_name_snake}}.views.unversioned.items_view._delegate_request", fake_delegate_request)
|
|
180
180
|
response = client.get("/api/{{ cookiecutter.model_name_plural | lower | replace(' ', '_') }}")
|
|
181
181
|
assert response.status_code == 502
|
|
182
182
|
{%- endif %}
|
|
@@ -17,7 +17,7 @@ def test_cache_client_uses_decode_responses() -> None:
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
def test_cache_client_uses_runtime_cache_url() -> None:
|
|
20
|
-
settings_mod = importlib.import_module("
|
|
20
|
+
settings_mod = importlib.import_module("{{cookiecutter.__service_name_snake}}.settings")
|
|
21
21
|
original = settings_mod.settings.cache_url
|
|
22
22
|
try:
|
|
23
23
|
settings_mod.settings.cache_url = "redis://cache-host:6381/2"
|
|
@@ -73,11 +73,11 @@ def test_validate_db_credentials_rejects_weak_defaults(
|
|
|
73
73
|
|
|
74
74
|
def test_app_package_init_modules_expose_tuple_all() -> None:
|
|
75
75
|
for module_name in [
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
76
|
+
"{{cookiecutter.__service_name_snake}}.delegates",
|
|
77
|
+
"{{cookiecutter.__service_name_snake}}.dependencies",
|
|
78
|
+
"{{cookiecutter.__service_name_snake}}.middleware",
|
|
79
|
+
"{{cookiecutter.__service_name_snake}}.repositories",
|
|
80
|
+
"{{cookiecutter.__service_name_snake}}.workers",
|
|
81
81
|
]:
|
|
82
82
|
module = importlib.import_module(module_name)
|
|
83
83
|
exports = getattr(module, "__all__", ())
|
|
@@ -16,7 +16,7 @@ def test_ping_task_returns_pong() -> None:
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def test_worker_broker_url_reflects_runtime_settings() -> None:
|
|
19
|
-
settings_mod = importlib.import_module("
|
|
19
|
+
settings_mod = importlib.import_module("{{cookiecutter.__service_name_snake}}.settings")
|
|
20
20
|
original = settings_mod.settings.worker_broker_url
|
|
21
21
|
try:
|
|
22
22
|
settings_mod.settings.worker_broker_url = "amqp://runtime-test"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/conftest.fragment.py
RENAMED
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/docker-compose.fragment.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/requirements.fragment
RENAMED
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/caching/settings.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/logging/conftest.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/logging/requirements.fragment
RENAMED
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/logging/settings.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/conftest.fragment.py
RENAMED
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/docker-compose.fragment.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/requirements.fragment
RENAMED
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/metrics/settings.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/tracing/conftest.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/tracing/requirements.fragment
RENAMED
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/tracing/settings.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/conftest.fragment.py
RENAMED
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/docker-compose.fragment.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/requirements.fragment
RENAMED
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/settings.fragment.py
RENAMED
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/src/app/workers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/src/app/workers/tasks.py
RENAMED
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/features/workers/tests/test_workers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.44 → csrd_utils-0.3.45}/src/csrd_utils/templates/cookiecutter-service/README.md
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|