rdf-construct 0.2.1__tar.gz → 0.4.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.
Files changed (124) hide show
  1. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/PKG-INFO +91 -6
  2. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/README.md +89 -5
  3. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/pyproject.toml +2 -2
  4. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/__init__.py +1 -1
  5. rdf_construct-0.4.0/src/rdf_construct/cli.py +3556 -0
  6. rdf_construct-0.4.0/src/rdf_construct/describe/__init__.py +93 -0
  7. rdf_construct-0.4.0/src/rdf_construct/describe/analyzer.py +176 -0
  8. rdf_construct-0.4.0/src/rdf_construct/describe/documentation.py +146 -0
  9. rdf_construct-0.4.0/src/rdf_construct/describe/formatters/__init__.py +47 -0
  10. rdf_construct-0.4.0/src/rdf_construct/describe/formatters/json.py +65 -0
  11. rdf_construct-0.4.0/src/rdf_construct/describe/formatters/markdown.py +275 -0
  12. rdf_construct-0.4.0/src/rdf_construct/describe/formatters/text.py +315 -0
  13. rdf_construct-0.4.0/src/rdf_construct/describe/hierarchy.py +232 -0
  14. rdf_construct-0.4.0/src/rdf_construct/describe/imports.py +213 -0
  15. rdf_construct-0.4.0/src/rdf_construct/describe/metadata.py +187 -0
  16. rdf_construct-0.4.0/src/rdf_construct/describe/metrics.py +145 -0
  17. rdf_construct-0.4.0/src/rdf_construct/describe/models.py +552 -0
  18. rdf_construct-0.4.0/src/rdf_construct/describe/namespaces.py +180 -0
  19. rdf_construct-0.4.0/src/rdf_construct/describe/profiles.py +415 -0
  20. rdf_construct-0.4.0/src/rdf_construct/localise/__init__.py +114 -0
  21. rdf_construct-0.4.0/src/rdf_construct/localise/config.py +508 -0
  22. rdf_construct-0.4.0/src/rdf_construct/localise/extractor.py +427 -0
  23. rdf_construct-0.4.0/src/rdf_construct/localise/formatters/__init__.py +36 -0
  24. rdf_construct-0.4.0/src/rdf_construct/localise/formatters/markdown.py +229 -0
  25. rdf_construct-0.4.0/src/rdf_construct/localise/formatters/text.py +224 -0
  26. rdf_construct-0.4.0/src/rdf_construct/localise/merger.py +346 -0
  27. rdf_construct-0.4.0/src/rdf_construct/localise/reporter.py +356 -0
  28. rdf_construct-0.4.0/src/rdf_construct/merge/__init__.py +165 -0
  29. rdf_construct-0.4.0/src/rdf_construct/merge/config.py +354 -0
  30. rdf_construct-0.4.0/src/rdf_construct/merge/conflicts.py +281 -0
  31. rdf_construct-0.4.0/src/rdf_construct/merge/formatters.py +426 -0
  32. rdf_construct-0.4.0/src/rdf_construct/merge/merger.py +425 -0
  33. rdf_construct-0.4.0/src/rdf_construct/merge/migrator.py +339 -0
  34. rdf_construct-0.4.0/src/rdf_construct/merge/rules.py +377 -0
  35. rdf_construct-0.4.0/src/rdf_construct/merge/splitter.py +1102 -0
  36. rdf_construct-0.4.0/src/rdf_construct/refactor/__init__.py +72 -0
  37. rdf_construct-0.4.0/src/rdf_construct/refactor/config.py +362 -0
  38. rdf_construct-0.4.0/src/rdf_construct/refactor/deprecator.py +328 -0
  39. rdf_construct-0.4.0/src/rdf_construct/refactor/formatters/__init__.py +8 -0
  40. rdf_construct-0.4.0/src/rdf_construct/refactor/formatters/text.py +311 -0
  41. rdf_construct-0.4.0/src/rdf_construct/refactor/renamer.py +294 -0
  42. rdf_construct-0.2.1/src/rdf_construct/cli.py +0 -1762
  43. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/LICENSE +0 -0
  44. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/__main__.py +0 -0
  45. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/core/__init__.py +0 -0
  46. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/core/config.py +0 -0
  47. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/core/ordering.py +0 -0
  48. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/core/predicate_order.py +0 -0
  49. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/core/profile.py +0 -0
  50. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/core/selector.py +0 -0
  51. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/core/serialiser.py +0 -0
  52. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/core/utils.py +0 -0
  53. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/cq/__init__.py +0 -0
  54. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/cq/expectations.py +0 -0
  55. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/cq/formatters/__init__.py +0 -0
  56. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/cq/formatters/json.py +0 -0
  57. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/cq/formatters/junit.py +0 -0
  58. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/cq/formatters/text.py +0 -0
  59. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/cq/loader.py +0 -0
  60. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/cq/runner.py +0 -0
  61. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/diff/__init__.py +0 -0
  62. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/diff/change_types.py +0 -0
  63. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/diff/comparator.py +0 -0
  64. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/diff/filters.py +0 -0
  65. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/diff/formatters/__init__.py +0 -0
  66. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/diff/formatters/json.py +0 -0
  67. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/diff/formatters/markdown.py +0 -0
  68. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/diff/formatters/text.py +0 -0
  69. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/__init__.py +0 -0
  70. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/config.py +0 -0
  71. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/extractors.py +0 -0
  72. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/generator.py +0 -0
  73. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/renderers/__init__.py +0 -0
  74. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/renderers/html.py +0 -0
  75. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/renderers/json.py +0 -0
  76. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/renderers/markdown.py +0 -0
  77. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/search.py +0 -0
  78. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/templates/html/base.html.jinja +0 -0
  79. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/templates/html/class.html.jinja +0 -0
  80. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/templates/html/hierarchy.html.jinja +0 -0
  81. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/templates/html/index.html.jinja +0 -0
  82. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/templates/html/instance.html.jinja +0 -0
  83. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/templates/html/namespaces.html.jinja +0 -0
  84. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/templates/html/property.html.jinja +0 -0
  85. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/docs/templates/html/single_page.html.jinja +0 -0
  86. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/lint/__init__.py +0 -0
  87. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/lint/config.py +0 -0
  88. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/lint/engine.py +0 -0
  89. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/lint/formatters.py +0 -0
  90. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/lint/rules.py +0 -0
  91. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/main.py +0 -0
  92. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/puml2rdf/__init__.py +0 -0
  93. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/puml2rdf/config.py +0 -0
  94. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/puml2rdf/converter.py +0 -0
  95. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/puml2rdf/merger.py +0 -0
  96. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/puml2rdf/model.py +0 -0
  97. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/puml2rdf/parser.py +0 -0
  98. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/puml2rdf/validators.py +0 -0
  99. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/shacl/__init__.py +0 -0
  100. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/shacl/config.py +0 -0
  101. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/shacl/converters.py +0 -0
  102. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/shacl/generator.py +0 -0
  103. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/shacl/namespaces.py +0 -0
  104. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/__init__.py +0 -0
  105. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/collector.py +0 -0
  106. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/comparator.py +0 -0
  107. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/formatters/__init__.py +0 -0
  108. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/formatters/json.py +0 -0
  109. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/formatters/markdown.py +0 -0
  110. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/formatters/text.py +0 -0
  111. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/metrics/__init__.py +0 -0
  112. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/metrics/basic.py +0 -0
  113. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/metrics/complexity.py +0 -0
  114. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/metrics/connectivity.py +0 -0
  115. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/metrics/documentation.py +0 -0
  116. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/metrics/hierarchy.py +0 -0
  117. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/stats/metrics/properties.py +0 -0
  118. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/uml/__init__.py +0 -0
  119. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/uml/context.py +0 -0
  120. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/uml/mapper.py +0 -0
  121. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/uml/odm_renderer.py +0 -0
  122. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/uml/renderer.py +0 -0
  123. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/uml/uml_layout.py +0 -0
  124. {rdf_construct-0.2.1 → rdf_construct-0.4.0}/src/rdf_construct/uml/uml_style.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rdf-construct
3
- Version: 0.2.1
3
+ Version: 0.4.0
4
4
  Summary: Semantic RDF manipulation toolkit - order, serialize, and diff RDF ontologies
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -10,7 +10,7 @@ Author-email: 23141680+aigora-de@users.noreply.github.com
10
10
  Maintainer: Dave Dyke
11
11
  Maintainer-email: 23141680+aigora-de@users.noreply.github.com
12
12
  Requires-Python: >=3.10
13
- Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Development Status :: 4 - Beta
14
14
  Classifier: Intended Audience :: Developers
15
15
  Classifier: Intended Audience :: Science/Research
16
16
  Classifier: Intended Audience :: Information Technology
@@ -50,16 +50,22 @@ Description-Content-Type: text/markdown
50
50
  ## Features
51
51
 
52
52
  - **Semantic Ordering**: Serialise RDF/Turtle with intelligent ordering instead of alphabetical chaos
53
+ - **Ontology Description**: Quick orientation to unfamiliar ontologies with profile detection
53
54
  - **Documentation Generation**: Create navigable HTML, Markdown, or JSON documentation from ontologies
54
55
  - **UML Generation**: Create PlantUML class diagrams from RDF ontologies
55
56
  - **PUML2RDF**: Convert PlantUML diagrams to RDF/OWL ontologies (diagram-first design)
56
57
  - **SHACL Generation**: Generate SHACL validation shapes from OWL definitions
57
58
  - **Semantic Diff**: Compare ontology versions and identify meaningful changes
59
+ - **Ontology Merging**: Combine multiple ontologies with conflict detection and data migration
60
+ - **Ontology Splitting**: Split monolithic ontologies into modules with dependency tracking
61
+ - **Ontology Refactoring**: Rename URIs and deprecate entities with OWL annotations
62
+ - **Multi-Language Support**: Extract, translate, and merge translations for internationalised ontologies
58
63
  - **Ontology Linting**: Check quality with 11 configurable rules
59
64
  - **Competency Question Testing**: Validate ontologies against SPARQL-based tests
60
65
  - **Ontology Statistics**: Comprehensive metrics with comparison mode
61
66
  - **Flexible Styling**: Configure colours, layouts, and visual themes for diagrams
62
67
  - **Profile-Based**: Define multiple strategies in YAML configuration
68
+ - **Multi-Format Input**: Supports Turtle, RDF/XML, JSON-LD, N-Triples
63
69
  - **Deterministic**: Same input + profile = same output, always
64
70
 
65
71
  ## Why?
@@ -89,6 +95,19 @@ pip install -e .
89
95
  poetry install
90
96
  ```
91
97
 
98
+ ### Describe an Ontology
99
+
100
+ ```bash
101
+ # Quick orientation to an unfamiliar ontology
102
+ rdf-construct describe ontology.ttl
103
+
104
+ # Brief summary (metadata + metrics + profile)
105
+ rdf-construct describe ontology.ttl --brief
106
+
107
+ # JSON output for scripting
108
+ rdf-construct describe ontology.ttl --format json
109
+ ```
110
+
92
111
  ### Compare Ontology Versions
93
112
 
94
113
  ```bash
@@ -177,20 +196,80 @@ rdf-construct stats ontology.ttl
177
196
  rdf-construct stats v1.ttl v2.ttl --compare --format markdown
178
197
  ```
179
198
 
199
+ ### Merge Ontologies
200
+
201
+ ```bash
202
+ # Basic merge
203
+ rdf-construct merge core.ttl extension.ttl -o merged.ttl
204
+
205
+ # With priorities (higher wins conflicts)
206
+ rdf-construct merge core.ttl extension.ttl -o merged.ttl -p 1 -p 2
207
+
208
+ # Generate conflict report
209
+ rdf-construct merge core.ttl extension.ttl -o merged.ttl --report conflicts.md
210
+ ```
211
+
212
+ ### Split Ontologies
213
+ ```bash
214
+ # Split by namespace (auto-detect modules)
215
+ rdf-construct split large.ttl -o modules/ --by-namespace
216
+
217
+ # Split with configuration file
218
+ rdf-construct split large.ttl -o modules/ -c split.yml
219
+
220
+ # Preview what would be created
221
+ rdf-construct split large.ttl -o modules/ --by-namespace --dry-run
222
+ ```
223
+
224
+ ### Refactor Ontologies
225
+ ```bash
226
+ # Fix a typo
227
+ rdf-construct refactor rename ontology.ttl \
228
+ --from "ex:Buiding" --to "ex:Building" -o fixed.ttl
229
+
230
+ # Bulk namespace change
231
+ rdf-construct refactor rename ontology.ttl \
232
+ --from-namespace "http://old/" --to-namespace "http://new/" -o migrated.ttl
233
+
234
+ # Deprecate an entity with replacement
235
+ rdf-construct refactor deprecate ontology.ttl \
236
+ --entity "ex:LegacyClass" --replaced-by "ex:NewClass" \
237
+ --message "Use NewClass instead." -o updated.ttl
238
+
239
+ # Preview changes
240
+ rdf-construct refactor rename ontology.ttl --from "ex:Old" --to "ex:New" --dry-run
241
+ ```
242
+
243
+ ### Multi-Language Translations
244
+ ```bash
245
+ # Extract strings for German translation
246
+ rdf-construct localise extract ontology.ttl --language de -o translations/de.yml
247
+
248
+ # Merge completed translations
249
+ rdf-construct localise merge ontology.ttl translations/de.yml -o localised.ttl
250
+
251
+ # Check translation coverage
252
+ rdf-construct localise report ontology.ttl --languages en,de,fr
253
+ ```
254
+
180
255
  ## Documentation
181
256
 
182
257
  📚 **[Complete Documentation](docs/index.md)** - Start here
183
258
 
184
259
  **For Users**:
185
260
  - [Getting Started](docs/user_guides/GETTING_STARTED.md) - 5-minute quick start
261
+ - [Describe Guide](docs/user_guides/DESCRIBE_GUIDE.md) - Quick ontology orientation
186
262
  - [Docs Guide](docs/user_guides/DOCS_GUIDE.md) - Documentation generation
187
263
  - [UML Guide](docs/user_guides/UML_GUIDE.md) - Complete UML features
188
- - [PlantUML Import Guide](docs/user_guides/PLANTUML_IMPORT_GUIDE.md) - Diagram-first design
264
+ - [PUML2RDF Guide](docs/user_guides/PUML2RDF_GUIDE.md) - Diagram-first design
189
265
  - [SHACL Guide](docs/user_guides/SHACL_GUIDE.md) - SHACL shape generation
190
266
  - [Diff Guide](docs/user_guides/DIFF_GUIDE.md) - Semantic ontology comparison
191
267
  - [Lint Guide](docs/user_guides/LINT_GUIDE.md) - Ontology quality checking
192
268
  - [CQ Testing Guide](docs/user_guides/CQ_TEST_GUIDE.md) - Competency question testing
193
269
  - [Stats Guide](docs/user_guides/STATS_GUIDE.md) - Ontology metrics
270
+ - [Merge & Split Guide](docs/user_guides/MERGE_SPLIT_GUIDE.md) - Combining and modularising ontologies
271
+ - [Refactor Guide](docs/user_guides/REFACTOR_GUIDE.md) - Renaming and deprecation
272
+ - [Localise Guide](docs/user_guides/LOCALISE_GUIDE.md) - Multi-language translations
194
273
  - [CLI Reference](docs/user_guides/CLI_REFERENCE.md) - All commands and options
195
274
 
196
275
  **For Developers**:
@@ -346,7 +425,7 @@ properties:
346
425
 
347
426
  ## Project Status
348
427
 
349
- **Current**: v0.2.0 - Feature complete for core ontology workflows
428
+ **Current**: v0.4.0 - Feature complete for core ontology workflows
350
429
  **License**: MIT
351
430
 
352
431
  ### Implemented
@@ -362,10 +441,15 @@ properties:
362
441
  ✅ Ontology linting (11 rules)
363
442
  ✅ Competency question testing
364
443
  ✅ Ontology statistics
444
+ ✅ Ontology merging and splitting
445
+ ✅ Ontology refactoring (rename, deprecate)
446
+ ✅ Multi-language translation management
447
+ ✅ Ontology description and profile detection
448
+ ✅ Multi-format input support (Turtle, RDF/XML, JSON-LD, N-Triples)
365
449
  ✅ Comprehensive documentation
366
450
 
367
451
  ### (Possible) Roadmap
368
- - [ ] Multi-format input support (JSON-LD, RDF/XML)
452
+ - [ ] OWL 2 named profile detection (EL, RL, QL)
369
453
  - [ ] Streaming mode for very large graphs
370
454
  - [ ] Web UI for diagram configuration
371
455
  - [ ] Additional lint rules
@@ -428,6 +512,7 @@ MIT License - see [LICENSE](LICENSE) file for details.
428
512
 
429
513
  ---
430
514
 
431
- **Status**: v0.2.0
515
+ **Status**: v0.4.0
432
516
  **Python**: 3.10+ required
433
517
  **Maintainer**: See [CONTRIBUTING.md](CONTRIBUTING.md)
518
+
@@ -12,16 +12,22 @@
12
12
  ## Features
13
13
 
14
14
  - **Semantic Ordering**: Serialise RDF/Turtle with intelligent ordering instead of alphabetical chaos
15
+ - **Ontology Description**: Quick orientation to unfamiliar ontologies with profile detection
15
16
  - **Documentation Generation**: Create navigable HTML, Markdown, or JSON documentation from ontologies
16
17
  - **UML Generation**: Create PlantUML class diagrams from RDF ontologies
17
18
  - **PUML2RDF**: Convert PlantUML diagrams to RDF/OWL ontologies (diagram-first design)
18
19
  - **SHACL Generation**: Generate SHACL validation shapes from OWL definitions
19
20
  - **Semantic Diff**: Compare ontology versions and identify meaningful changes
21
+ - **Ontology Merging**: Combine multiple ontologies with conflict detection and data migration
22
+ - **Ontology Splitting**: Split monolithic ontologies into modules with dependency tracking
23
+ - **Ontology Refactoring**: Rename URIs and deprecate entities with OWL annotations
24
+ - **Multi-Language Support**: Extract, translate, and merge translations for internationalised ontologies
20
25
  - **Ontology Linting**: Check quality with 11 configurable rules
21
26
  - **Competency Question Testing**: Validate ontologies against SPARQL-based tests
22
27
  - **Ontology Statistics**: Comprehensive metrics with comparison mode
23
28
  - **Flexible Styling**: Configure colours, layouts, and visual themes for diagrams
24
29
  - **Profile-Based**: Define multiple strategies in YAML configuration
30
+ - **Multi-Format Input**: Supports Turtle, RDF/XML, JSON-LD, N-Triples
25
31
  - **Deterministic**: Same input + profile = same output, always
26
32
 
27
33
  ## Why?
@@ -51,6 +57,19 @@ pip install -e .
51
57
  poetry install
52
58
  ```
53
59
 
60
+ ### Describe an Ontology
61
+
62
+ ```bash
63
+ # Quick orientation to an unfamiliar ontology
64
+ rdf-construct describe ontology.ttl
65
+
66
+ # Brief summary (metadata + metrics + profile)
67
+ rdf-construct describe ontology.ttl --brief
68
+
69
+ # JSON output for scripting
70
+ rdf-construct describe ontology.ttl --format json
71
+ ```
72
+
54
73
  ### Compare Ontology Versions
55
74
 
56
75
  ```bash
@@ -139,20 +158,80 @@ rdf-construct stats ontology.ttl
139
158
  rdf-construct stats v1.ttl v2.ttl --compare --format markdown
140
159
  ```
141
160
 
161
+ ### Merge Ontologies
162
+
163
+ ```bash
164
+ # Basic merge
165
+ rdf-construct merge core.ttl extension.ttl -o merged.ttl
166
+
167
+ # With priorities (higher wins conflicts)
168
+ rdf-construct merge core.ttl extension.ttl -o merged.ttl -p 1 -p 2
169
+
170
+ # Generate conflict report
171
+ rdf-construct merge core.ttl extension.ttl -o merged.ttl --report conflicts.md
172
+ ```
173
+
174
+ ### Split Ontologies
175
+ ```bash
176
+ # Split by namespace (auto-detect modules)
177
+ rdf-construct split large.ttl -o modules/ --by-namespace
178
+
179
+ # Split with configuration file
180
+ rdf-construct split large.ttl -o modules/ -c split.yml
181
+
182
+ # Preview what would be created
183
+ rdf-construct split large.ttl -o modules/ --by-namespace --dry-run
184
+ ```
185
+
186
+ ### Refactor Ontologies
187
+ ```bash
188
+ # Fix a typo
189
+ rdf-construct refactor rename ontology.ttl \
190
+ --from "ex:Buiding" --to "ex:Building" -o fixed.ttl
191
+
192
+ # Bulk namespace change
193
+ rdf-construct refactor rename ontology.ttl \
194
+ --from-namespace "http://old/" --to-namespace "http://new/" -o migrated.ttl
195
+
196
+ # Deprecate an entity with replacement
197
+ rdf-construct refactor deprecate ontology.ttl \
198
+ --entity "ex:LegacyClass" --replaced-by "ex:NewClass" \
199
+ --message "Use NewClass instead." -o updated.ttl
200
+
201
+ # Preview changes
202
+ rdf-construct refactor rename ontology.ttl --from "ex:Old" --to "ex:New" --dry-run
203
+ ```
204
+
205
+ ### Multi-Language Translations
206
+ ```bash
207
+ # Extract strings for German translation
208
+ rdf-construct localise extract ontology.ttl --language de -o translations/de.yml
209
+
210
+ # Merge completed translations
211
+ rdf-construct localise merge ontology.ttl translations/de.yml -o localised.ttl
212
+
213
+ # Check translation coverage
214
+ rdf-construct localise report ontology.ttl --languages en,de,fr
215
+ ```
216
+
142
217
  ## Documentation
143
218
 
144
219
  📚 **[Complete Documentation](docs/index.md)** - Start here
145
220
 
146
221
  **For Users**:
147
222
  - [Getting Started](docs/user_guides/GETTING_STARTED.md) - 5-minute quick start
223
+ - [Describe Guide](docs/user_guides/DESCRIBE_GUIDE.md) - Quick ontology orientation
148
224
  - [Docs Guide](docs/user_guides/DOCS_GUIDE.md) - Documentation generation
149
225
  - [UML Guide](docs/user_guides/UML_GUIDE.md) - Complete UML features
150
- - [PlantUML Import Guide](docs/user_guides/PLANTUML_IMPORT_GUIDE.md) - Diagram-first design
226
+ - [PUML2RDF Guide](docs/user_guides/PUML2RDF_GUIDE.md) - Diagram-first design
151
227
  - [SHACL Guide](docs/user_guides/SHACL_GUIDE.md) - SHACL shape generation
152
228
  - [Diff Guide](docs/user_guides/DIFF_GUIDE.md) - Semantic ontology comparison
153
229
  - [Lint Guide](docs/user_guides/LINT_GUIDE.md) - Ontology quality checking
154
230
  - [CQ Testing Guide](docs/user_guides/CQ_TEST_GUIDE.md) - Competency question testing
155
231
  - [Stats Guide](docs/user_guides/STATS_GUIDE.md) - Ontology metrics
232
+ - [Merge & Split Guide](docs/user_guides/MERGE_SPLIT_GUIDE.md) - Combining and modularising ontologies
233
+ - [Refactor Guide](docs/user_guides/REFACTOR_GUIDE.md) - Renaming and deprecation
234
+ - [Localise Guide](docs/user_guides/LOCALISE_GUIDE.md) - Multi-language translations
156
235
  - [CLI Reference](docs/user_guides/CLI_REFERENCE.md) - All commands and options
157
236
 
158
237
  **For Developers**:
@@ -308,7 +387,7 @@ properties:
308
387
 
309
388
  ## Project Status
310
389
 
311
- **Current**: v0.2.0 - Feature complete for core ontology workflows
390
+ **Current**: v0.4.0 - Feature complete for core ontology workflows
312
391
  **License**: MIT
313
392
 
314
393
  ### Implemented
@@ -324,10 +403,15 @@ properties:
324
403
  ✅ Ontology linting (11 rules)
325
404
  ✅ Competency question testing
326
405
  ✅ Ontology statistics
406
+ ✅ Ontology merging and splitting
407
+ ✅ Ontology refactoring (rename, deprecate)
408
+ ✅ Multi-language translation management
409
+ ✅ Ontology description and profile detection
410
+ ✅ Multi-format input support (Turtle, RDF/XML, JSON-LD, N-Triples)
327
411
  ✅ Comprehensive documentation
328
412
 
329
413
  ### (Possible) Roadmap
330
- - [ ] Multi-format input support (JSON-LD, RDF/XML)
414
+ - [ ] OWL 2 named profile detection (EL, RL, QL)
331
415
  - [ ] Streaming mode for very large graphs
332
416
  - [ ] Web UI for diagram configuration
333
417
  - [ ] Additional lint rules
@@ -390,6 +474,6 @@ MIT License - see [LICENSE](LICENSE) file for details.
390
474
 
391
475
  ---
392
476
 
393
- **Status**: v0.2.0
477
+ **Status**: v0.4.0
394
478
  **Python**: 3.10+ required
395
- **Maintainer**: See [CONTRIBUTING.md](CONTRIBUTING.md)
479
+ **Maintainer**: See [CONTRIBUTING.md](CONTRIBUTING.md)
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "rdf-construct"
7
- version = "0.2.1"
7
+ version = "0.4.0"
8
8
  description = "Semantic RDF manipulation toolkit - order, serialize, and diff RDF ontologies"
9
9
  license = "MIT"
10
10
  readme = "README.md"
@@ -29,7 +29,7 @@ keywords = [
29
29
  "sparql",
30
30
  ]
31
31
  classifiers = [
32
- "Development Status :: 3 - Alpha",
32
+ "Development Status :: 4 - Beta",
33
33
  "Intended Audience :: Developers",
34
34
  "Intended Audience :: Science/Research",
35
35
  "Intended Audience :: Information Technology",
@@ -4,7 +4,7 @@ Named after the ROM construct from William Gibson's Neuromancer -
4
4
  preserved, structured knowledge that can be queried and transformed.
5
5
  """
6
6
 
7
- __version__ = "0.2.1"
7
+ __version__ = "0.4.0"
8
8
 
9
9
  from . import core, uml
10
10
  from .cli import cli