Skip to content

Commit e8e382d

Browse files
wphillipmoorewphillipmoore-claude
andauthored
chore: remove legacy generate_commands.py in favor of st-generate-commands (#422)
Delete the per-repo scripts/dev/generate_commands.py and regenerate commands.py using the central st-generate-commands tool from standard-tooling. The 12 formerly hand-written methods are now generated like all others. Documentation updated to reference st-generate-commands. Co-authored-by: wphillipmoore-claude <255925739+wphillipmoore-claude@users.noreply.github.com>
1 parent 6482db2 commit e8e382d

5 files changed

Lines changed: 149 additions & 244 deletions

File tree

docs/site/docs/architecture.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,9 @@ No other runtime dependencies are required.
117117

118118
## Generated command methods
119119

120-
The 144 command methods in `MQRESTCommandMixin` are generated from
121-
`MAPPING_DATA["commands"]` by `scripts/dev/generate_commands.py`. Each
120+
The command methods in `MQRESTCommandMixin` are generated from
121+
`mapping-data.json` by `st-generate-commands` (from
122+
[standard-tooling](https://github.com/wphillipmoore/standard-tooling)). Each
122123
method:
123124

124125
- Accepts `name`, `request_parameters`, `response_parameters`, and

docs/site/docs/development/generation-scripts.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ namespace was bootstrapped.
1616
## Command methods
1717

1818
The MQSC command wrapper methods in `src/pymqrest/commands.py` are
19-
generated from the command definitions in `MAPPING_DATA`:
19+
generated from the command definitions in `mapping-data.json` using the
20+
`st-generate-commands` tool from
21+
[standard-tooling](https://github.com/wphillipmoore/standard-tooling):
2022

2123
```bash
22-
uv run python3 scripts/dev/generate_commands.py
24+
st-generate-commands --language python \
25+
--mapping-data src/pymqrest/mapping-data.json \
26+
--target src/pymqrest/commands.py \
27+
--mapping-pages-dir docs/site/docs/mappings
2328
```
2429

2530
The generated methods live between the `# BEGIN GENERATED MQSC METHODS`
@@ -44,7 +49,10 @@ When the mapping data changes, regenerate all downstream artifacts:
4449

4550
```bash
4651
# 1. Regenerate command methods
47-
uv run python3 scripts/dev/generate_commands.py
52+
st-generate-commands --language python \
53+
--mapping-data src/pymqrest/mapping-data.json \
54+
--target src/pymqrest/commands.py \
55+
--mapping-pages-dir docs/site/docs/mappings
4856

4957
# 2. Regenerate mapping documentation
5058
uv run python3 scripts/dev/generate_mapping_docs.py

docs/site/docs/development/namespace-origin.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ When IBM releases a new MQ version (for example, 9.5):
3636
4. Regenerate downstream artifacts:
3737

3838
```bash
39-
uv run python3 scripts/dev/generate_commands.py
39+
st-generate-commands --language python \
40+
--mapping-data src/pymqrest/mapping-data.json \
41+
--target src/pymqrest/commands.py \
42+
--mapping-pages-dir docs/site/docs/mappings
4043
uv run python3 scripts/dev/generate_mapping_docs.py
4144
uv run python3 scripts/dev/validate_local.py
4245
```

scripts/dev/generate_commands.py

Lines changed: 0 additions & 238 deletions
This file was deleted.

0 commit comments

Comments
 (0)