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

feat: allow prefixed env vars #310

Closed
wants to merge 1 commit into from
Closed

Conversation

lalewis1
Copy link
Collaborator

@lalewis1 lalewis1 commented Nov 20, 2024

For label_predicates, description_predicates etc. this commit allows you
to set the values as prefixed values. for example

# .env
LABEL_PREDICATES='["schema:headline", "dcterms:title"]'

this should work for any of the default bound prefixes in rdflib

Warning

i had to change the test cases becuase this now considers "1" to be an invalid prefix
this may or may not be a breaking change actually, so please consider carefully.

For label_predicates, description_predicates etc. this commit allows you
to set the values as prefixed values. for example

# .env
LABEL_PREDICATES='["schema:headline", "dcterms:title"]'

this should work for any of the default bound prefixes in rdflib
@recalcitrantsupplant
Copy link
Collaborator

I'd prefer not to do this as it relies on us knowing what namespace the prefix is mapped to, in common cases this may be clear but even for say schema: is that referring to the http or https version of schema, and for anything less common where would the mapping be kept, and how would you guarantee the prefix:namespace mappings are 1:1.

I realise perhaps counter intuitively the prez settings use the RDFLib Namespaces so can be written in the prefixed form

@lalewis1 lalewis1 closed this Nov 20, 2024
@lalewis1 lalewis1 deleted the lawson/prefixed-env-vars branch November 20, 2024 03:38
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.

2 participants