From 14ec2b5fc5719eb249dda27daa6d1ee07c8ea132 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 27 May 2025 06:11:37 +0200 Subject: improved description and discussion on testing --- _conclusion.qmd | 24 ++++++++++++++++++++---- _evaluation.qmd | 19 +++++++++++-------- ref.bib | 8 +++++++- 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/_conclusion.qmd b/_conclusion.qmd index 4dd8a8c..1ee0655 100644 --- a/_conclusion.qmd +++ b/_conclusion.qmd @@ -52,9 +52,20 @@ It has been established mainly for the next phases that are expected to rely more heavily on newer libraries where possible (see @sec-rdf). -## Reflections on semantic annotations +### Improved testing -*TODO* +The code as currently implemented +does not allow for unit testing. +It would be helpful to reorganize the codebase +into smaller functions that each could be covered as units. + +The commonmark-spec project includes a large testsuite. +It would certainly be useful +to check the filter against that testsuite, +to ensure no breakage of conventional Markdown markup. +Useful here might be a draft work on rewritng the Semantic Markdown specification +as an extension to the CommonMark specification +[@Smedegaard2022cmark]. ## Future works {#sec-future} @@ -187,10 +198,15 @@ and also to explore possibilities of use with wrapper tools such as Quarto. In other words, try to prove the pessimistic usability analysis in @sec-pandoc-filter-versatile wrong. -It might be helpful to try implement Semantic Markdown +It might be helpful, +both for authors in more widely enabling semantic text annotations +and for testing the language design of the Semantic Markdown specification, +to try implement Semantic Markdown for other extensible Markdown parsers. -Might also be fun to try implement Semantic djot +Might also be fun to try implement Semantic Markdown as a patch for djot, +a language derived from Markdown +with the specific aim of being less ambiguous [@MacFarlane2024djot]. ### Nuanced citations in scholarly papers diff --git a/_evaluation.qmd b/_evaluation.qmd index 08d58fd..86f3b22 100644 --- a/_evaluation.qmd +++ b/_evaluation.qmd @@ -2,16 +2,19 @@ ## End-to-end testing -A testsuite has been collected for the newly introduced Markdown markup. -These tests are all end-to-end tests rather than unit tests, -since the parser logic did not invite for much separation -into multiple functions sensible to check individually. +A testsuite has been set up, +derived from the examples in the draft specification. +The testsuite contains 10 end-to-end tests. + +A build target, `make check`, has been constructed +that renders each test with the `sem-md.lua` filter enabled, +and compares the result against expected output using diff. + -*TODO*: Document test coverage, and reflect on causes. -Additionally, the code has been tested against the large testsuite -part of the commonmark-spec project, -to ensure no breakage of conventional Markdown markup. +collected for the newly introduced Markdown markup. + +*TODO*: Document test coverage, and reflect on causes. ## Validation of output formatting diff --git a/ref.bib b/ref.bib index dbc2b74..93d6152 100644 --- a/ref.bib +++ b/ref.bib @@ -240,11 +240,17 @@ @Online{Smedegaard2022, author = {Jonas Smedegaard and Thomas Francart}, date = {2022-04-09}, - editor = {Jonas Smedegaard}, title = {Semantic Markdown Spec (Alpha Draft)}, url = {https://source.jones.dk/semantic-markdown/about/}, } +@Online{Smedegaard2022cmark, + author = {Jonas Smedegaard}, + date = {2022-04-09}, + title = {CommonMark-RDF}, + url = {https://source.jones.dk/commonmark-rdf-spec/about/}, +} + @Article{Daquino2023, author = {Daquino, Marilena and Massari, Arcangelo and Peroni, Silvio and Shotton, David}, date = {2023}, -- cgit v1.2.3