csrd-utils 0.3.24__tar.gz → 0.3.26__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.24 → csrd_utils-0.3.26}/PKG-INFO +25 -2
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/README.md +24 -1
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/pyproject.toml +1 -1
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/__main__.py +77 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/README.md +2 -2
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/.gitignore +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/audit.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/augmentor.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/cluster.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/doctor.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/conftest.fragment.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/docker-compose.fragment.yaml +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/manifest.yaml +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/requirements.fragment +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/settings.fragment.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/src/app/cache.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/tests/test_cache.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/logging/conftest.fragment.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/logging/manifest.yaml +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/logging/requirements.fragment +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/logging/settings.fragment.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/logging/src/app/middleware/logging.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/logging/tests/test_logging_middleware.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/conftest.fragment.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/docker-compose.fragment.yaml +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/manifest.yaml +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/requirements.fragment +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/settings.fragment.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/src/app/middleware/metrics.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/tests/test_metrics_middleware.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/tracing/conftest.fragment.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/tracing/manifest.yaml +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/tracing/requirements.fragment +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/tracing/settings.fragment.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/tracing/src/app/middleware/tracing.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/tracing/tests/test_tracing_middleware.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/conftest.fragment.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/docker-compose.fragment.yaml +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/manifest.yaml +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/requirements.fragment +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/settings.fragment.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/src/app/workers/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/src/app/workers/celery_app.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/src/app/workers/tasks.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/tests/test_workers.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/fragments.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/generator.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/resources.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/cookiecutter.json +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/hooks/post_gen_project.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/.dockerignore +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/.env.example +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/.gitignore +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/Dockerfile +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/README.md +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/docker-compose.yml +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/pyproject.toml +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/requirements.txt +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/cache.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/delegates/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/delegates/upstreams.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/dependencies/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/dependencies/delegates.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/dependencies/item_repository.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/dependencies/worker_broker.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/middleware/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/middleware/logging.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/py.typed +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/repositories/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/repositories/item_repository.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/settings.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/views/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/views/unversioned/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/views/unversioned/health_view.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/views/unversioned/items_view.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/workers/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/src/app/workers/tasks.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/tests/__init__.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/tests/acceptance/test_logging_middleware.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/tests/conftest.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/tests/test_items.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/tests/unit/test_cache.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/tests/unit/test_database_settings.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/tests/unit/test_delegates.py +0 -0
- {csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/{{cookiecutter.service_name}}/tests/unit/test_worker_broker.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.26
|
|
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
|
|
@@ -40,10 +40,21 @@ csrd feature add workers --service .
|
|
|
40
40
|
csrd doctor --service .
|
|
41
41
|
csrd audit # if cwd is workspace, audits all services
|
|
42
42
|
csrd audit --service . # explicitly audit one service path
|
|
43
|
+
csrd completion bash # print bash completion script
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
`feature plan --json` is useful for CI or tooling wrappers.
|
|
46
47
|
|
|
48
|
+
### Bash tab completion
|
|
49
|
+
|
|
50
|
+
Enable command/subcommand completion in bash:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
source <(csrd completion bash)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Then examples like `csrd ne<TAB>` and `csrd new wor<TAB>` complete to `new` and `workspace`.
|
|
57
|
+
|
|
47
58
|
### Workspace extraction command
|
|
48
59
|
|
|
49
60
|
Service extraction into a sibling workspace is supported:
|
|
@@ -54,6 +65,18 @@ csrd workspace extract-service --service ./source-ws/src/pricing --target-worksp
|
|
|
54
65
|
csrd workspace extract-service --service ./source-ws/src/pricing --target-workspace ../pricing-ws --dry-run --json
|
|
55
66
|
```
|
|
56
67
|
|
|
68
|
+
Use extraction when service ownership diverges, release cadence becomes independent,
|
|
69
|
+
or workspace orchestration starts coupling unrelated deployments.
|
|
70
|
+
|
|
71
|
+
Manual fallback remains available if needed:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
csrd new workspace --name pricing-ws --output .. --generate none
|
|
75
|
+
cp -a ./source-ws/src/pricing ../pricing-ws/src/pricing
|
|
76
|
+
cd ../pricing-ws
|
|
77
|
+
csrd new cluster --spec ./.csrd/cluster.yaml --output . --force
|
|
78
|
+
```
|
|
79
|
+
|
|
57
80
|
### Interactive generation behavior
|
|
58
81
|
|
|
59
82
|
- `csrd new service` and `csrd new cluster` are workspace-first commands.
|
|
@@ -119,10 +142,10 @@ with features_path() as feature_lib:
|
|
|
119
142
|
|
|
120
143
|
- `docs/CLI_REFERENCE.md` - full command/flag reference
|
|
121
144
|
- `docs/FEATURES.md` - bundled feature catalog and behavior
|
|
145
|
+
- `docs/FUTURE_WORK.md` - remaining provider-specific CI wiring work (Phase 5B)
|
|
122
146
|
- `docs/AGENT_SMOKE_TESTS.md` - copy/paste validation flow for clean workspaces
|
|
123
147
|
- `docs/COMMAND_MATRIX.yaml` - machine-readable command matrix for automation
|
|
124
148
|
- `AGENTS.md` - package-local rules for autonomous agents
|
|
125
|
-
- `../../docs/SERVICE_EXTRACTION_PLAYBOOK.md` - workspace service extraction workflow and status
|
|
126
149
|
|
|
127
150
|
## CLI-only agent mode
|
|
128
151
|
|
|
@@ -27,10 +27,21 @@ csrd feature add workers --service .
|
|
|
27
27
|
csrd doctor --service .
|
|
28
28
|
csrd audit # if cwd is workspace, audits all services
|
|
29
29
|
csrd audit --service . # explicitly audit one service path
|
|
30
|
+
csrd completion bash # print bash completion script
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
`feature plan --json` is useful for CI or tooling wrappers.
|
|
33
34
|
|
|
35
|
+
### Bash tab completion
|
|
36
|
+
|
|
37
|
+
Enable command/subcommand completion in bash:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
source <(csrd completion bash)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Then examples like `csrd ne<TAB>` and `csrd new wor<TAB>` complete to `new` and `workspace`.
|
|
44
|
+
|
|
34
45
|
### Workspace extraction command
|
|
35
46
|
|
|
36
47
|
Service extraction into a sibling workspace is supported:
|
|
@@ -41,6 +52,18 @@ csrd workspace extract-service --service ./source-ws/src/pricing --target-worksp
|
|
|
41
52
|
csrd workspace extract-service --service ./source-ws/src/pricing --target-workspace ../pricing-ws --dry-run --json
|
|
42
53
|
```
|
|
43
54
|
|
|
55
|
+
Use extraction when service ownership diverges, release cadence becomes independent,
|
|
56
|
+
or workspace orchestration starts coupling unrelated deployments.
|
|
57
|
+
|
|
58
|
+
Manual fallback remains available if needed:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
csrd new workspace --name pricing-ws --output .. --generate none
|
|
62
|
+
cp -a ./source-ws/src/pricing ../pricing-ws/src/pricing
|
|
63
|
+
cd ../pricing-ws
|
|
64
|
+
csrd new cluster --spec ./.csrd/cluster.yaml --output . --force
|
|
65
|
+
```
|
|
66
|
+
|
|
44
67
|
### Interactive generation behavior
|
|
45
68
|
|
|
46
69
|
- `csrd new service` and `csrd new cluster` are workspace-first commands.
|
|
@@ -106,10 +129,10 @@ with features_path() as feature_lib:
|
|
|
106
129
|
|
|
107
130
|
- `docs/CLI_REFERENCE.md` - full command/flag reference
|
|
108
131
|
- `docs/FEATURES.md` - bundled feature catalog and behavior
|
|
132
|
+
- `docs/FUTURE_WORK.md` - remaining provider-specific CI wiring work (Phase 5B)
|
|
109
133
|
- `docs/AGENT_SMOKE_TESTS.md` - copy/paste validation flow for clean workspaces
|
|
110
134
|
- `docs/COMMAND_MATRIX.yaml` - machine-readable command matrix for automation
|
|
111
135
|
- `AGENTS.md` - package-local rules for autonomous agents
|
|
112
|
-
- `../../docs/SERVICE_EXTRACTION_PLAYBOOK.md` - workspace service extraction workflow and status
|
|
113
136
|
|
|
114
137
|
## CLI-only agent mode
|
|
115
138
|
|
|
@@ -71,6 +71,75 @@ WORKSPACE_MARKER = ".csrd-workspace"
|
|
|
71
71
|
WORKSPACE_CLUSTER_SPEC = Path(".csrd") / "cluster.yaml"
|
|
72
72
|
|
|
73
73
|
|
|
74
|
+
def _parser_shape(
|
|
75
|
+
parser: argparse.ArgumentParser,
|
|
76
|
+
chain: tuple[str, ...] = (),
|
|
77
|
+
) -> tuple[dict[tuple[str, ...], list[str]], dict[tuple[str, ...], list[str]]]:
|
|
78
|
+
commands: dict[tuple[str, ...], list[str]] = {}
|
|
79
|
+
options: dict[tuple[str, ...], list[str]] = {}
|
|
80
|
+
|
|
81
|
+
subcommands: list[str] = []
|
|
82
|
+
flags: list[str] = []
|
|
83
|
+
for action in parser._actions:
|
|
84
|
+
if isinstance(action, argparse._SubParsersAction):
|
|
85
|
+
subcommands.extend(sorted(action.choices.keys()))
|
|
86
|
+
for name, subparser in action.choices.items():
|
|
87
|
+
child_chain = (*chain, name)
|
|
88
|
+
child_commands, child_options = _parser_shape(subparser, child_chain)
|
|
89
|
+
commands.update(child_commands)
|
|
90
|
+
options.update(child_options)
|
|
91
|
+
else:
|
|
92
|
+
flags.extend([item for item in action.option_strings if item.startswith("-")])
|
|
93
|
+
|
|
94
|
+
commands[chain] = sorted(dict.fromkeys(subcommands))
|
|
95
|
+
options[chain] = sorted(dict.fromkeys(flags))
|
|
96
|
+
return commands, options
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def _render_bash_completion(parser: argparse.ArgumentParser) -> str:
|
|
100
|
+
commands, options = _parser_shape(parser)
|
|
101
|
+
|
|
102
|
+
lines = [
|
|
103
|
+
"# bash completion for csrd",
|
|
104
|
+
"_csrd_completion() {",
|
|
105
|
+
" local cur key token",
|
|
106
|
+
' cur="${COMP_WORDS[COMP_CWORD]}"',
|
|
107
|
+
' key=""',
|
|
108
|
+
"",
|
|
109
|
+
' for token in "${COMP_WORDS[@]:1:COMP_CWORD-1}"; do',
|
|
110
|
+
' case "$token" in',
|
|
111
|
+
" -*) continue ;;",
|
|
112
|
+
" esac",
|
|
113
|
+
' if [[ -n "$key" ]]; then',
|
|
114
|
+
' key="$key $token"',
|
|
115
|
+
" else",
|
|
116
|
+
' key="$token"',
|
|
117
|
+
" fi",
|
|
118
|
+
" done",
|
|
119
|
+
"",
|
|
120
|
+
' case "$key" in',
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
for chain in sorted(commands.keys()):
|
|
124
|
+
key = " ".join(chain)
|
|
125
|
+
command_candidates = commands.get(chain, [])
|
|
126
|
+
option_candidates = options.get(chain, [])
|
|
127
|
+
candidates = " ".join(command_candidates + option_candidates).strip()
|
|
128
|
+
if not candidates:
|
|
129
|
+
continue
|
|
130
|
+
lines.append(f' "{key}") COMPREPLY=( $(compgen -W "{candidates}" -- "$cur") ) ;;')
|
|
131
|
+
|
|
132
|
+
lines.extend(
|
|
133
|
+
[
|
|
134
|
+
" *) COMPREPLY=() ;;",
|
|
135
|
+
" esac",
|
|
136
|
+
"}",
|
|
137
|
+
"complete -F _csrd_completion csrd csrd-utils csrt",
|
|
138
|
+
]
|
|
139
|
+
)
|
|
140
|
+
return "\n".join(lines) + "\n"
|
|
141
|
+
|
|
142
|
+
|
|
74
143
|
def _workspace_services_dir(workspace_root: Path) -> Path:
|
|
75
144
|
return workspace_root / "src"
|
|
76
145
|
|
|
@@ -947,6 +1016,10 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
947
1016
|
extract.add_argument("--json", action="store_true", help="Print extraction result as JSON")
|
|
948
1017
|
extract.add_argument("--force", action="store_true", help="Overwrite target service path")
|
|
949
1018
|
|
|
1019
|
+
completion = sub.add_parser("completion", help="Shell completion helpers")
|
|
1020
|
+
completion_sub = completion.add_subparsers(dest="completion_shell", required=True)
|
|
1021
|
+
completion_sub.add_parser("bash", help="Print bash completion script")
|
|
1022
|
+
|
|
950
1023
|
return parser
|
|
951
1024
|
|
|
952
1025
|
|
|
@@ -1180,6 +1253,10 @@ def main() -> int:
|
|
|
1180
1253
|
print(f"Refreshed source cluster scaffold at: {result['source_cluster']}")
|
|
1181
1254
|
return 0
|
|
1182
1255
|
|
|
1256
|
+
if args.command == "completion" and args.completion_shell == "bash":
|
|
1257
|
+
print(_render_bash_completion(parser), end="")
|
|
1258
|
+
return 0
|
|
1259
|
+
|
|
1183
1260
|
if args.command == "doctor":
|
|
1184
1261
|
return _run_doctor(args.service, args.json)
|
|
1185
1262
|
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/templates/cookiecutter-service/README.md
RENAMED
|
@@ -25,7 +25,7 @@ Key prompts:
|
|
|
25
25
|
- Adapter imports remain explicit via `from csrd.repository import ...`.
|
|
26
26
|
- Feature-specific files are conditionally included using template sections.
|
|
27
27
|
- `hooks/post_gen_project.py` validates incompatible feature combinations.
|
|
28
|
-
- This template is the
|
|
28
|
+
- This template is the baseline generation scaffold for `csrd-utils`.
|
|
29
29
|
|
|
30
30
|
## Example combinations
|
|
31
31
|
|
|
@@ -50,4 +50,4 @@ uvx cookiecutter . --directory packages/utils/src/csrd_utils/templates/cookiecut
|
|
|
50
50
|
## Next phase
|
|
51
51
|
|
|
52
52
|
- Phase 2 introduces standalone feature augmentation via `csrd feature`.
|
|
53
|
-
- See `docs/
|
|
53
|
+
- See `packages/utils/docs/FUTURE_WORK.md` for remaining provider-specific CI future work.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/conftest.fragment.py
RENAMED
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/docker-compose.fragment.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/requirements.fragment
RENAMED
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/caching/settings.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/logging/conftest.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/logging/requirements.fragment
RENAMED
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/logging/settings.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/conftest.fragment.py
RENAMED
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/docker-compose.fragment.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/requirements.fragment
RENAMED
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/metrics/settings.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/tracing/conftest.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/tracing/requirements.fragment
RENAMED
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/tracing/settings.fragment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/conftest.fragment.py
RENAMED
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/docker-compose.fragment.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/requirements.fragment
RENAMED
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/settings.fragment.py
RENAMED
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/src/app/workers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/src/app/workers/tasks.py
RENAMED
|
File without changes
|
{csrd_utils-0.3.24 → csrd_utils-0.3.26}/src/csrd_utils/features/workers/tests/test_workers.py
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
|
|
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
|