Skip to content

Commit

Permalink
Minor fixes before opening/moving
Browse files Browse the repository at this point in the history
  • Loading branch information
dalito committed Apr 4, 2024
1 parent 6b1c660 commit f648fd2
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 23 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
13 changes: 3 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ in a pull request.
- [Code of Conduct](#code-of-conduct)
- [Guidelines for Contributions and Requests](#guidelines-for-contributions-and-requests)
- [Reporting problems with the data model](#reporting-problems-with-the-data-model)
- [Requesting new terms](#requesting-new-terms)
- [Adding new terms yourself](#adding-new-terms-yourself)
- [Adding new elements](#adding-new-elements)
- [Best Practices](#best-practices)
- [GitHub Best Practice](#github-best-practice)
- [Understanding LinkML](#understanding-linkml)
Expand All @@ -41,15 +40,9 @@ Please use our [Issue Tracker][issues] to report problems with the data model.

<a id="requesting-terms"></a>

### Requesting new terms
### Adding new elements

Please use our [Issue Tracker][issues] to request changes to the model.

<a id="adding-terms"></a>

### Adding new terms yourself

Please submit a [Pull Request][pulls] to submit a new term for consideration.
Please submit a [Pull Request][pulls] with the proposed changes or create an [Issue][issues].

<a id="best-practices"></a>

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

> Status: alpha - This is in early development and may change.
> We are interested in feedback of potential users.
> Don't hesitate to create an [issue](https://github.com/nfdi4cat/pid4cat-model/issues)!
> Please use [issues](https://github.com/nfdi4cat/pid4cat-model/issues) for your comments, questions or ideas!
A LinkML model for handle-based PIDs for resources in catalysis.

Expand Down Expand Up @@ -40,8 +40,7 @@ Use the `make` command to generate project artefacts:
A big thanks to all [contributors](https://github.com/nfdi4cat/pid4cat-model/graphs/contributors).

Main author:

- David Linke (ORCID: 0000-0002-5898-1820) - Idea and initial setup of repository. Current maintainer.
- David Linke (ORCID: 0000-0002-5898-1820) - Idea, initial setup of repository and current maintainer.

## License

Expand Down
14 changes: 14 additions & 0 deletions example_resource_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from linkml_runtime.dumpers import json_dumper
from pid4cat_model.datamodel import pid4cat_model_pydantic as p4c

pid1_ressource_info = p4c.ResourceInfo(
label="Resource label",
description="Resource description",
resource_category=p4c.ResourceCategory.SAMPLE,
rdf_url="https://example.org/resource",
rdf_type="TURTLE",
schema_url="https://example.org/schema",
schema_type="XSD",
)

print(json_dumper.dumps(pid1_ressource_info, inject_type=False))
17 changes: 9 additions & 8 deletions nfdi4cat_details.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PIDs in NFDI4Cat

*This document is work in progress! (not a reference)*
> *This document is work in progress (and not a reference).*
Persistent identifiers (PIDs) play an important role in achieving FAIR data.
This text is about the different use cases for PIDs in NFDI4Cat and how each case is solved technically.
Expand Down Expand Up @@ -97,7 +97,8 @@ The PID4Cat schema is mapped to the handle record as follows:
| 8 | RELATED | 2024-02-19 13:40:02Z | {json} | *related_identifiers* |
| 9 | CHANGES | 2024-02-19 13:40:02Z | {json} | *change_log* |

In a future version, the non-standard values in Type may be replaced by references to type declarations in a datatype registry (DTR). Such DTRs are still under development and not yet widely used.
In a future version, the non-standard values in **Type**-column may be replaced by references to type declarations in a datatype registry (DTR).
Such DTRs are still under development and not yet widely used.

Since PID4Cat is a linkML-model we have all tools at hand to create records or an API. For example, we can use the pydantic-model created from the PID4cat schema to create the json-objects for the PID record above, for example the *resource_info* json-object:

Expand Down Expand Up @@ -142,11 +143,11 @@ Two handle-suffix schemes are supported:
- **UUID4** (_uuid pid4cat_)
- Can be either supplied or generated by the gateway (both ways should be possible).
If supplied UUID7 should be also accepted.
- **namespace\_of\_agent/local_ID** (_name-spaced pid4cat_)
- **namespace_of_agent/local_ID** (_name-spaced pid4cat_)
- The handle-gateway should only validate the uniqueness of `namespace_of_agent/local_ID`-combinations.
It is suggested to use 3 characters from a human-friendly base32-alphabet as namespaces (e.g. **z-base-32**, see above). This gives 3**32 prefixes and if ever necessary we can switch to 4 chars.
- The uniqueness of the `local_ID` has to be taken care of by the namespace owner.
- The `local_ID` can be freely chosen by the namespace owner but is limited to ASCII letters [a-zA-Z], numbers [0-9] and symbols `.-`. - *OK or too restrictive?*
- The `local_ID` can be freely chosen by the namespace owner but is limited to ASCII letters [a-zA-Z], numbers [0-9] and symbols `.-`. *OK or too restrictive?*
- The request for becoming the owner of a new namespace should be made by email.

Examples for PID4Cat handles (non-resolvable):
Expand All @@ -155,7 +156,7 @@ Examples for PID4Cat handles (non-resolvable):
- **name-spaced pid4cat** in the example-namespace &quot;`k3a`&quot;:
- `https://hdl.handle.net/21.T11978/pid4cat/k3a/123-456`
- The corresponding regex in Python syntax is: 
`re.compile(r"21\.T11978/pid4cat/(?P<namespace>k3a)/(?P<local_ID>\d{3}-\d{3})")` 
`re.compile(r"21\.T11978/pid4cat/(?P<namespace>k3a)/(?P<local_ID>\d{3}-\d{3})")`<BR>
...which extracts "k3a" as group "namespace" and "123-456" as group "local_ID".

> Note, the `pid4cat`-part in the above URLs/suffixes has no functional meaning.
Expand All @@ -176,13 +177,13 @@ Institutions that like to manage a PID4Cat-PID-namespace need to register a PID-

Suggested minimal API of the HSG:

[unedited copy from open project]
*[unedited copy from internal OpenProject]*

Here is a tentative minimal API (to be discussed). API access is limited to special users &quot;namespace-owners&quot; (read-write), and &quot;viewers&quot; (read-only). Anonymous users have no access.

* _Regarding permissions and the minimal API we like to get your feedback. Is this OK? Do you see gaps or need more functionality?_

#### List all PIDs records of owner \[GET\] or create new PID \[PUT\]:
#### List all PIDs records of owner [GET] or create new PID [PUT]:

`https://pid.nfdi4cat.org/<api-version>/<name-space> [GET,PUT]`

Expand All @@ -193,7 +194,7 @@ Here is a tentative minimal API (to be discussed). API access is limited to spec
- HSG should set "record_version" automatically on create
- *...and some more validation & consistency checks*

#### Show PID record \[GET\] or update PID record \[PUT\]
#### Show PID record [GET] or update PID record [PUT]

`https://pid.nfdi4cat.org/<api-version>/<name-space>/<local-ID-of-pid> [GET,PUT]`

Expand Down
6 changes: 5 additions & 1 deletion src/docs/about.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# pid4cat-model

A LinkML model for handle-based PIDs for resources in catalysis (PID4Cat).
For more see GitHub [NFDI4Cat/pid4cat-model](ttps://github.org/nfid4cat/pid4cat-model).

This is work in progress!
**The model is work in progress!** Please don't expect stability before Release 1.0.

- License: MIT
- Author & contributors: https://github.com/nfdi4cat/pid4cat-model?tab=readme-ov-file#contributors
2 changes: 1 addition & 1 deletion src/pid4cat_model/schema/pid4cat_model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >-
A LinkML model for PIDs for resources in catalysis (PID4Cat). PID4Cat is a
handle system based persistent identifier (PID) for digital or physical
resources used in the catalysis research process. The handle record is used
to store metadata about the PID besides the obligatory landing page URL.
to store additional metadata about the PID besides the obligatory landing page URL.
The model describes metadata for the PID itself and how to access the
identified resource. It does not describe the resource itself with the
Expand Down

0 comments on commit f648fd2

Please sign in to comment.