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

Expand functionality of data uploader script to upload both Turtle and JSONLD files in directory #185

Closed
alyssadai opened this issue Sep 23, 2023 · 0 comments · Fixed by #196
Assignees
Labels
feat:improve Incremental, user facing improvements of an existing feature. type:feature Effort to deliver new features, feature changes & improvements

Comments

@alyssadai
Copy link
Contributor

alyssadai commented Sep 23, 2023

We are starting to create + think about vocabulary graph files which are much more easily expressed in a .ttl file than .jsonld (e.g., #182), but nonetheless need to have a way to be easily added to a graph.

Currently, add_data_to_graph.sh only uploads .jsonld files in a directory. To make it easy for a deploying user to upload all data that needs to be in the graph in one go, we could add another loop to the script that performs the same POST request on any .ttl files in the specified directory.

api/add_data_to_graph.sh

Lines 146 to 150 in b65a242

for db in ${jsonld_dir}/*.jsonld; do
curl -u "${user}:${password}" -i -X POST http://${graph_url}/${graph_db} \
-H "Content-Type: application/ld+json" \
--data-binary @${db}
done

This script would then work on both directories with just one kind of file (.ttl or .jsonld) or those with a mix of both - allowing us flexibility if we want to recommend storing all vocab-related files separately but still be able to merge them into the graph using the same script.

@alyssadai alyssadai added flag:discuss Flag issue that needs to be discussed before it can be implemented. flag:schedule Flag issue that should go on the roadmap or backlog. feat:improve Incremental, user facing improvements of an existing feature. type:feature Effort to deliver new features, feature changes & improvements labels Sep 23, 2023
@alyssadai alyssadai removed the flag:schedule Flag issue that should go on the roadmap or backlog. label Sep 25, 2023
@alyssadai alyssadai self-assigned this Oct 4, 2023
@alyssadai alyssadai removed the flag:discuss Flag issue that needs to be discussed before it can be implemented. label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat:improve Incremental, user facing improvements of an existing feature. type:feature Effort to deliver new features, feature changes & improvements
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant