Added markdown integration for SPARQL and SHACL code blocks:#134
Added markdown integration for SPARQL and SHACL code blocks:#134arne-bdt wants to merge 1 commit intozazuko:mainfrom
Conversation
- Created MarkdownNotebookSerializer to parse markdown files into notebook cells - SPARQL code blocks (```sparql) become executable SPARQL cells - SHACL code blocks (```shacl) become executable SHACL cells - Other code blocks remain as markdown content - Created MarkdownNotebookController for executing cells in markdown notebooks - Refactored cell execution logic into shared NotebookCellExecutor class - Added configuration setting sparqlbook.markdownIntegration.enabled (default: true) - Registered as optional notebook type with priority "option" (use "Open With...") - Added sample markdown file demonstrating the feature - Updated documentation with markdown integration instructions Added tests and updated documentation for markdown integration: - Added comprehensive test suite for MarkdownNotebookSerializer - Tests cover SPARQL/SHACL parsing, mixed content, case-insensitive languages - Tests include execution against file endpoints - Updated README.md with markdown integration feature documentation - Added usage instructions and configuration options Introduced "shx" to be able to build under any platform including windows. Added support for SHACL validation: - In addition to SPARQL, SHACL is now available as a language in the code blocks. - enabling SHACL validation at /rw/shacl?graph=<target-graph> - SHACL must use the text/turtle syntax. - The result is in text/turtle format. - Tested against Apache Jena Fuseki 4.6 SHACL endpoint. - Following the guidelines at https://jena.apache.org/documentation/shacl/, the graph to be validated is encoded in the URL. Therefore, for SHACL, I recommend specifying the endpoint configuration as a comment in each code block. - Added fuseki:serviceShacl "shacl" to the read-write service endpoint, - Enable SHACL validation in test Fuseki configuration - Added tslib as dependency. - Extended file linking to support .shacl and .ttl files for SHACL cells - Updated add-query-from-file command to recognize SHACL files and set the correct language ID - Updated README.md with SHACL features in the feature list - Added comprehensive SHACL documentation section in doc/00_intro.md covering endpoint configuration, Apache Jena Fuseki integration, and file binding Users specify the full endpoint URL including any query parameters directly in [endpoint=...]. This is simpler and more flexible since different SHACL endpoints may use different parameter names.
|
|
This is a fantastic addition to the SPARQL Notebook extension! 🎉 The Markdown integration and SHACL support are exactly the kind of features that take this extension to the next level. Being able to mix documentation with executable SPARQL and SHACL cells directly in Markdown files will significantly improve my daily workflow when working with RDF data. A few things I especially appreciate:
Thank you for the effort that went into this PR! 🙏 |
Summary
This PR introduces Markdown integration and SHACL (Shapes Constraint Language) support to the SPARQL Notebook extension.
Changes
Testing
Notes
vemonet.stardog-rdf-grammarswas referenced but not available in the VS Code Marketplace. Switched back tostardog-union.stardog-rdf-grammars.Details:
Added tests and updated documentation for markdown integration:
Added support for SHACL validation:
Users specify the full endpoint URL including any query parameters directly in [endpoint=...]. This is simpler and more flexible since different SHACL endpoints may use different parameter names.