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: nanopub client for storing user enrichments #307

Merged
merged 16 commits into from
Nov 2, 2023
Merged

Conversation

sdevalk
Copy link
Contributor

@sdevalk sdevalk commented Oct 31, 2023

This PR introduces a new package, 'enricher'. The package allows us to store and retrieve user enrichments, i.e. information provided by users. Some notes:

  1. The package is in flux. The (internal) data model for expressing user enrichments is not finished - Kinsuk is working on this. The package uses a temporary model.
  2. The package can, at this moment, only store enrichments, not retrieve - this will be a part of a different PR
  3. The package can, at this moment, only store a specific type of user enrichment, a 'text'. In the future we could support other types as well, e.g. a 'term' (for materials or techniques) or a 'date' (for date made).
  4. The frontend should use the class Enricher for storing an enrichment - see enricher.integration.test.ts for an example.

Copy link

vercel bot commented Oct 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
colonial-collections-dataset-browser ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2023 5:05am
colonial-collections-researcher ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 1, 2023 5:05am

Copy link
Contributor

@barbarah barbarah left a comment

Choose a reason for hiding this comment

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

I'm not very familiar with RDF. So this part is hard for me to review. I read the code and looked up the new packages you are using.

As a user of this Enricher, I do have some questions about the schema, and how I should use the Enricher. I am aware the data model for expressing user enrichments is not finished. So we can also wait for the final data model before explaining to me how I should use the Enricher.

description: z.string(),
citation: z.string(), // Required or optional property?
about: z.string().url(),
creator: z.string().url(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Where does this creator url come from? Is this a Clerk organization? They have GUIDs but no URLs. Or will we use a different system to connect the Clerk organization to this Enricher?

And do we need to save both the user and the community? Or only the community?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question! We will probably have to add a new field to the 'Communities' UI. Users can then provide their IRI. This IRI comes from some world-wide user identification system such as ORCID. It could also be that only community administrators need to provide this IRI; the IRI will then identify the community, not an individual user.

const addTextOptionsSchema = z.object({
description: z.string(),
citation: z.string(), // Required or optional property?
about: z.string().url(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm trying to understand what values should be placed in about. Looking at the integration tests, this is a URI to the object. Or maybe a subpart of an object (for example, the description of an object)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is the 'big unknown' in the design of the user enrichments at this moment. An enrichment is about a specific bit of information, such as the title or the date made of an object - it's not about the object as a whole. This means that the properties of an object need to have identifiers (= IRIs). But the props currently don't have these (not in the API, not in the underlying data). Kinsuk is looking into this. For the time being - while developing and testing - we can invent some identifiers (I'll discuss this with Kinsuk and make a proposal).

@sdevalk sdevalk merged commit 9fd6afa into main Nov 2, 2023
4 checks passed
@sdevalk sdevalk deleted the feat-nanopub-client branch November 2, 2023 05:28
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