Skip to content

Conversation

@gouttegd
Copy link
Contributor

(This is exactly the same PR as #1147, just without the last commit which enabled SQLite/SemSQL export by default on all repos.)

This PR adds db as a new export format for release artefacts.

A .db file is a SQLite3 file containing a SemSQL representation of the release product.

All tools needed to build SQLite3/SemSQL files (semsql, rdftab, sqlite3, and relation-graph) are moved from ODKFull to ODKLite, so that the standard, ODK-generated workflows still only require ODKLite. This increases the size of ODKLite from ~1.34GB to ~1.5GB (compared to ~3.06GB for ODKFull).

If the project is configured to use a global prefix context (use_context=true), the same context (converted from JSON to CSV) is used when building the SemSQL files. Otherwise, we let semsql use its built-in list of prefixes.

closes #1142

Make sure that

* sqlite3 (Debian package),
* semsql (Python package),
* rdftab (custom-built from source),
* and Relation-Graph (downloaded as is)

are all available in ODKLite, rather than only in ODKFull.

This is so that a standard release pipeline still only requires
ODKLite, even if the project is configured to produce SQLite/SemSQL
files.
Support the production of release artefacts in SQLite/SemSQL format.

This requires a CSV-formatted list of prefixes, so if the project is
configured to use a global context, we derive the CSV from it.
Otherwise, we let `semsql` use its builtin prefix list.
@gouttegd gouttegd self-assigned this Nov 29, 2024
@gouttegd gouttegd requested a review from matentzn November 29, 2024 08:05
Copy link
Contributor

@matentzn matentzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very smart idea.

@gouttegd gouttegd merged commit 120e347 into master Nov 29, 2024
1 check passed
@gouttegd gouttegd deleted the add-semsql-export-format-3 branch November 29, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SQLite/SemSQL as an export format

3 participants