Commit deb6222
feat!: replace hash-based IDs with semantic versioning for variant ID generation (#163)
* feat!: replace hash-based IDs with semantic versioning for variant ID generation
Add variant-based ID generation and registry management to the
s2dm-publish GitHub Action. The workflow now automatically initializes
or updates the registry based on schema changes detected via GraphQL
Inspector diff.
- Add new `registry` module with variant ID tracking using semantic versions
- Add `variant_ids.py` with VariantEntry and VariantIDFile models
- Add `graphql_inspector_diff.js` for automated schema change detection
- Add `diff_parser.py` to process GraphQL Inspector output
- Variant increments now tied to graphql-inspector detected changes
- Update ID exporter to generate semantic version-based variant IDs
- Update spec history exporter to work with new variant ID system
- Move `skos_search.py` to registry module
- Add variant counter tracking for concept modifications
- Add support for marking concepts as removed in specific versions
- Add 15 comprehensive tests for variant ID generation logic
- Update E2E CLI tests for new registry commands
BREAKING CHANGES:
- Removed `idgen` module and hash-based ID generation
- `registry id` command now requires `--version-tag` parameter
- `registry id` command removed `--strict-mode` option
- `registry init` command now requires `--version-tag` parameter
- `registry update` command now requires `--version-tag` and `--previous-ids`
- Variant IDs use semantic versioning format (Concept/vM.m) instead of hashes
- Integrate variant registry into automated workflow
- Remove dry_run parameter from IDExporter
- Registry operations now require version tags and
previous registry files from release artifacts.
Signed-off-by: Mustafa Kaptan <mustafa.kaptan@motius.de>
* refactor(graphql-inspector): add local dependencies and decorator pattern
- Add package.json for local Node.js dependency management
- Add @requires_graphql_inspector decorator for dependency injection
- Add locate_graphql_inspector() to find node_modules automatically
- Resolve CLI path once during initialization for performance
- Improve dependency checking with runtime verification
- Update CI/Actions to use npm install instead of global install
- Update documentation in CONTRIBUTING.md and tools/README.md
Replaces global npm install with local package.json management.
The decorator pattern auto-injects inspector_path to CLI commands,
eliminating repeated lookups and global state.
Signed-off-by: Mustafa Kaptan <mustafa.kaptan@motius.de>
* fix: Add missing elements in example schema
Tools expect explicit references to all elements
Signed-off-by: JD Alvarez <8550265+jdacoello@users.noreply.github.com>
* fix: Add missing elements to updated example schema
Tools expect now all elements explicitly.
Signed-off-by: JD Alvarez <8550265+jdacoello@users.noreply.github.com>
---------
Signed-off-by: Mustafa Kaptan <mustafa.kaptan@motius.de>
Signed-off-by: JD Alvarez <8550265+jdacoello@users.noreply.github.com>
Co-authored-by: JD Alvarez <8550265+jdacoello@users.noreply.github.com>1 parent e294ed5 commit deb6222
File tree
39 files changed
+6054
-1756
lines changed- .github/workflows
- actions/s2dm-publish
- examples/spec-history-registry
- src/s2dm
- concept
- exporters
- idgen
- registry
- tools
- tests
39 files changed
+6054
-1756
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
| 184 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
28 | 46 | | |
29 | 47 | | |
30 | 48 | | |
| |||
80 | 98 | | |
81 | 99 | | |
82 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
83 | 137 | | |
84 | 138 | | |
85 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
178 | 177 | | |
179 | 178 | | |
180 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
181 | 197 | | |
182 | 198 | | |
183 | 199 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
0 commit comments