Skip to content

Added Support for default prefixes in SPARQL queries (#647)#787

Merged
mmarx merged 20 commits into
mainfrom
feature/647-default-queries
Jul 8, 2026
Merged

Added Support for default prefixes in SPARQL queries (#647)#787
mmarx merged 20 commits into
mainfrom
feature/647-default-queries

Conversation

@Aeternant

Copy link
Copy Markdown
Collaborator

Makes base and prefix IRIs available to Import/Export and closes #647

@Aeternant Aeternant requested a review from mmarx May 12, 2026 11:16
@github-project-automation github-project-automation Bot moved this to Todo in nemo May 12, 2026

@mmarx mmarx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is mostly fine, only a few stylistic issues remain

Comment thread nemo/src/io/formats/dsv.rs Outdated
Comment thread nemo/src/io/formats/sparql.rs Outdated
Comment thread nemo/src/io/formats/sparql.rs Outdated
Comment thread nemo/src/io/formats/sparql.rs Outdated
Comment thread nemo/src/io/formats/sparql.rs Outdated
Comment thread nemo/src/io/formats/sparql.rs
Comment thread nemo/src/io/format_builder.rs
Comment thread nemo/src/rule_model/translation/directive/import_export.rs Outdated
Comment thread nemo/src/rule_model/translation/directive/import_export.rs Outdated
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in nemo May 12, 2026

@mmarx mmarx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few more things, again mostly stylistic in nature. Also a lot of unneeded imports that cargo clippy --fix should be able to get rid of …

Comment thread nemo/src/rule_model/translation/directive.rs Outdated
Comment thread nemo/src/rule_model/translation/directive.rs Outdated
)
}

/// Return the FormatContext

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we should link the FormatContext here: [FormatContext]

)
}

/// Return the FormatContext

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

see above

Comment on lines +149 to +150
/// Wrapper for IRI base and prefixes
/// Automatically attempts to resolve all relative prefixes on the base

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be more generic towards what it actually holds: “Additional context for import/export formats (e.g., base and prefixes)” or something like this, since this might evolve to contain even more in the future. The part about resolving prefixes should probably rather be on the add_prefix method.

&self.prefixes
}

/// adds a base if None was set before

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We generally start comments with an uppercase letter (they should form a complete sentence) – this applies in some other places in the PR as well.

}

/// adds a base if None was set before
/// panics if a base is already set

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this should also mention that it panics if the given base is not a valid (absolute) IRI

Comment thread nemo/src/rule_model/translation/directive.rs Outdated

@mmarx mmarx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few more things, again mostly stylistic in nature. Also a lot of unneeded imports that cargo clippy --fix should be able to get rid of …

mmarx and others added 15 commits June 24, 2026 15:28
Outputs traces for all IDB facts after reasoning.

Fixes #783.
Flake lock file updates:

• Updated input 'crane':
    'github:ipetkov/crane/dc7496d8ea6e526b1254b55d09b966e94673750f' (2026-04-19)
  → 'github:ipetkov/crane/edb38893982a3338972bb4a2ec7ce7c29ba10fd9' (2026-05-18)
• Updated input 'nemo-web':
    'github:knowsys/nemo-web/f45b5648b26baa35ac1b3a6234dd39bc48bbe2cb' (2026-04-22)
  → 'github:knowsys/nemo-web/c8c3b8f55a092d4046ea729b14a29f0b9f033b14' (2026-05-18)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/e07580dae39738e46609eaab8b154de2488133ce' (2026-04-19)
  → 'github:NixOS/nixpkgs/687f05a9184cad4eaf905c48b63649e3a86f5433' (2026-05-18)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/40e6ccc06e1245a4837cbbd6bdda64e21cc67379' (2026-04-22)
  → 'github:oxalica/rust-overlay/8cd592658d4448c57326aaa819e1c2f91086eb40' (2026-05-19)
Signed-off-by: Maximilian Marx <mmarx@wh2.tu-dresden.de>
Flake lock file updates:

• Updated input 'nemo-vscode-extension':
    'github:knowsys/nemo-vscode-extension/1df3577049b0f6f4a86da0e2ae6f289027a6ed01' (2026-06-04)
  → 'github:knowsys/nemo-vscode-extension/0b5d43bff010ea3c614f5d2fd4bfb9995fcbe436' (2026-06-04)
• Updated input 'nemo-web':
    'github:knowsys/nemo-web/8a863710cc1b959c38a1001755424fd118251cdb' (2026-06-04)
  → 'github:knowsys/nemo-web/dec1dea448ad8115901d18e4f7dffc568fe4b5ed' (2026-06-04)
• Updated input 'nemo-web/nemo-vscode-extension':
    'github:knowsys/nemo-vscode-extension/1df3577049b0f6f4a86da0e2ae6f289027a6ed01' (2026-06-04)
  → 'github:knowsys/nemo-vscode-extension/0b5d43bff010ea3c614f5d2fd4bfb9995fcbe436' (2026-06-04)
Signed-off-by: Maximilian Marx <mmarx@wh2.tu-dresden.de>
Work around a bug in cache-nix-action,
cf. nix-community/cache-nix-action#170

@mmarx mmarx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few more style nitpicks, but this is looking very good already!

Comment thread nemo/src/rule_model/error/translation_error.rs Outdated
Comment thread nemo/src/rule_model/error/translation_error.rs Outdated
Comment thread nemo/src/rule_model/translation/directive.rs
Comment thread nemo/src/rule_model/translation/directive.rs Outdated
Comment thread nemo/src/rule_model/translation/directive.rs Outdated
Comment thread nemo/src/rule_model/translation/directive.rs Outdated
Comment thread nemo/src/rule_model/translation/directive.rs Outdated
Comment thread nemo/src/rule_model/translation/directive.rs Outdated
Comment thread nemo/src/io/format_builder.rs
@mmarx mmarx enabled auto-merge July 8, 2026 08:11
@mmarx mmarx merged commit 45ad5a4 into main Jul 8, 2026
8 checks passed
@mmarx mmarx deleted the feature/647-default-queries branch July 8, 2026 08:25
@github-project-automation github-project-automation Bot moved this from In Progress to Done in nemo Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Feature: Support default prefixes in SPARQL queries

2 participants