Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TSV writer and update other writers' docs #107

Merged
merged 7 commits into from
Mar 13, 2024
Merged

Add TSV writer and update other writers' docs #107

merged 7 commits into from
Mar 13, 2024

Conversation

cthoyt
Copy link
Member

@cthoyt cthoyt commented Mar 13, 2024

Closes #106

  1. Adds more docs to JSON-LD export, which supports MONDO Robot use case
  2. Adds more docs to SHACL export
  3. Implements simple TSV export, which supports SemanticSQL use case
  4. Adds section "writing a context" into the tutorial that links to the writer functions

cc @joeflack4

@cthoyt cthoyt changed the title Update export functionality Update export functionality for MONDO use cases Mar 13, 2024
@cthoyt cthoyt enabled auto-merge (squash) March 13, 2024 13:48
@cthoyt cthoyt disabled auto-merge March 13, 2024 13:48
@cthoyt cthoyt changed the title Update export functionality for MONDO use cases Add TSV writer and update other writers' docs Mar 13, 2024
@cthoyt cthoyt enabled auto-merge (squash) March 13, 2024 13:48
@cthoyt cthoyt disabled auto-merge March 13, 2024 13:48
@cthoyt cthoyt enabled auto-merge (squash) March 13, 2024 13:48
@cthoyt cthoyt merged commit e36724d into main Mar 13, 2024
8 checks passed
@cthoyt cthoyt deleted the update-exports branch March 13, 2024 13:56
def write_jsonld_context(
converter: Converter,
path: Union[str, Path],
*,
include_synonyms: bool = False,
expand: bool = False,
) -> None:
"""Write the converter's bijective map as a JSON-LD context to a file."""
"""Write the converter's bijective map as a JSON-LD context to a file.

Choose a reason for hiding this comment

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

Didn't even think to check for this. You write great docstrings!

@@ -2207,6 +2280,41 @@ def write_shacl(
path.write_text(text.format(entries=",\n".join(lines)))


def write_tsv(

Choose a reason for hiding this comment

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

Great!

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.

Exporters to support Monarch use cases
2 participants