Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: "Contributor Code of Conduct"
---

# Contributor Code of Conduct

Contributors to the RO-Crate community, including this tutorial, are expected to comply with our [Code of Conduct](https://github.com/ResearchObject/ro-crate/blob/main/CODE_OF_CONDUCT.md) to ensure an open and inclusive environment. You may email [email protected] to report any Code of Conduct concerns.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Check warning on line 13 in LICENSE.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[needs HTTPS]: [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Expand All @@ -21,7 +21,7 @@
* Adaptation to Galaxy Training Material rendering
* Explicit links to RO-Crate specifications
* Example changed to different organization and license
* Modiied for Carpentries style
* Modified for Carpentries style

# Examples

Expand All @@ -31,6 +31,6 @@
# Trademarks

"Software Carpentry" and "Data Carpentry" and their respective logos
are registered trademarks of [Community Initiatives][CI].

Check warning on line 34 in LICENSE.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[needs HTTPS]: [Community Initiatives](http://communityin.org/)

[ci]: http://communityin.org/
3 changes: 2 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ contact: "[email protected]"
episodes:
- 01-introduction.md
- 02-folder-as-crate-root.md
- 03-metadata-descriptor.md
- 04-root.md
- 05-root-metadata.md
- 03-metadata-descriptor.md
- 06-cross-references.md
- 07-data-entities.md
- 08-contextual-entities.md
Expand All @@ -79,6 +79,7 @@ episodes:
- 11-triples.md
- 12-html-preview.md
- 13-complete.md
- 15-common-pitfalls.md
- 14-next-steps.md

# Information for Learners
Expand Down
23 changes: 14 additions & 9 deletions episodes/01-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@ exercises: 0

::::::::::::::::::::::::::::::::::::::: questions
- How do I package data in a FAIR way?
- How does an RO-Crate identify and describe its contents?
- What is the difference between data entities and context entities?
- What is the role of JSON-LD in RO-Crate?
- How can I list the authors of individual files?
- Can I use multiple licenses in the same data package?
- How can I visualize JSON-LD metadata?
- How can I validate and visualize RO-Crate metadata?
::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: objectives
- Construct an RO-Crate by hand using JSON
- Describe each part of the Research Object
- Learn basic JSON-LD to create FAIR metadata
- Connect different parts of the Research Object using identifiers
- Describe each part of the RO-Crate
- Connect different parts of the RO-Crate using identifiers
::::::::::::::::::::::::::::::::::::::::::::::::::


Expand All @@ -50,16 +52,19 @@ _Video: An overview of the RO-Crate concept and its implementations_ (see also [

## Tutorial walk-through

In this tutorial, meant to be read along with the [RO-Crate specification](https://www.researchobject.org/ro-crate/1.1/),
In this tutorial, meant to be read along with the [RO-Crate specification](https://www.researchobject.org/ro-crate/1.2/),
we'll walk through the initial steps for creating a basic RO-Crate.
You are invited to replicate the below steps on your local computer.

::::::::::::::::::::::::::::::::::::::: callout
## Abbreviations
- FAIR: Findable, Accessible, Interoperable, Reusable; a set of principles for publishing research data and metadata
- JSON: JavaScript Object Notation, a generic structured text-based data format
- JSON-LD: JSON Linked Data, a way to express Linked Data (RDF) using regular JSON
- RO-Crate: Research Object Crate; a way to package research data with structured FAIR metadata
- FAIR: Findable, Accessible, Interoperable, Reusable; a set of principles for publishing research data and metadata.
- FDO: FAIR Digital Object; a set of recommendations to improve findability, accessibility, interoperability, and reproducibility for any digital object.
- JSON: JavaScript Object Notation, a generic structured text-based data format.
- JSON-LD: JSON Linked Data, a way to express Linked Data (RDF) using regular JSON.
- RO-Crate: Research Object Crate; a way to package research data with structured FAIR metadata.
- PID: Persistent Identifier; a long-lasting reference to a digital object.
- URI: Uniform Resource Identifier; a string of characters that identifies a resource.
::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: keypoints
Expand Down
11 changes: 5 additions & 6 deletions episodes/02-folder-as-crate-root.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

```json
{
"@context": "https://w3id.org/ro/crate/1.1/context",
"@context": "https://w3id.org/ro/crate/1.2/context",
"@graph": [

]
Expand All @@ -56,7 +56,7 @@
and can now refer to its content with relative file paths.

We also need to make some declaration within the JSON file to turn it into a valid _RO-Crate Metadata Document_,
explained in the next session.
explained in the next section.


## JSON-LD preamble
Expand All @@ -64,10 +64,10 @@
The preamble of `@context` and `@graph` are JSON-LD structures
that help provide global identifiers to the JSON keys and types
used in the rest of the RO-Crate document.
These will largely map to definitions in the [schema.org](http://schema.org/) vocabulary,

Check warning on line 67 in episodes/02-folder-as-crate-root.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[needs HTTPS]: [schema.org](http://schema.org/)
which can be used by RO-Crate extensions to provide additional metadata beyond the RO-Crate specifications.
It is this feature of JSON-LD that helps make RO-Crate extensible for many different purposes
-- this is explored further in the specification's [appendix on JSON-LD](https://www.researchobject.org/ro-crate/1.1/appendix/jsonld.html).
-- this is explored further in the specification's [appendix on JSON-LD](https://www.researchobject.org/ro-crate/1.2/appendix/jsonld.html).
In short, only JSON keys (_properties_) and types defined this way can be used within the RO-Crate Metadata Document.

However, in the general case it should be sufficient to follow the RO-Crate JSON examples directly without deeper JSON-LD understanding.
Expand All @@ -78,7 +78,7 @@
Almost any property can alternatively be used with an `[]` array to provide multiple values.

The rest of this tutorial,
and indeed most of the [RO-Crate specification](https://www.researchobject.org/ro-crate/1.1/),
and indeed most of the [RO-Crate specification](https://www.researchobject.org/ro-crate/specification/1.2/),
specify which entities can be added to the `@graph` array.


Expand All @@ -88,5 +88,4 @@
- RO-Crate uses schema.org as base vocabulary
- The JSON-LD context enables optional Linked Data processing
- Descriptions are listed flatly as entities in the @graph array
::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::
30 changes: 22 additions & 8 deletions episodes/03-metadata-descriptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,48 @@ exercises: 2

## RO-Crate Metadata descriptor

The first JSON-LD _entity_ to add in the `@graph` array has the `@id` value of `ro-crate-metadata.json` to describe the JSON file itself:
Next, we'll add another _entity_ to the `@graph` array has the `@id` value of `ro-crate-metadata.json` to describe the JSON file itself:


```json
{
"@id": "ro-crate-metadata.json",
"@type": "CreativeWork",
"conformsTo": {"@id": "https://w3id.org/ro/crate/1.1"},
"conformsTo": {"@id": "https://w3id.org/ro/crate/1.2"},
"about": {"@id": "./"}
}
```

This required entity, known as the [RO-Crate Metadata Descriptor](https://www.researchobject.org/ro-crate/1.1/root-data-entity.html#ro-crate-metadata-file-descriptor),
This required entity, known as the [RO-Crate Metadata Descriptor](https://www.researchobject.org/ro-crate/specification/1.2/root-data-entity.html#ro-crate-metadata-file-descriptor),
helps this file self-identify as an RO-Crate Metadata Document,
which is conforming to (`conformsTo`) the RO-Crate specification version 1.1.
which is conforming to (`conformsTo`) the RO-Crate specification version 1.2.
Notice that the `conformsTo` URL corresponds to the `@context` URL version-wise,
but they have two different functions.
The context brings the defined terms into the metadata document,
while the conformance declares which RO-Crate conventions of using those terms are being followed.

:::::::::::::::::::::::::::::::::::::::: callout

## Adding entities to the JSON array

Because we're adding incrementally to the `@graph` array.
It is important to remember the comma `,` between each entity,
**except** for the final entity in the JSON array;
and likewise for the properties within the JSON object for each entity.
This is an artefact of the strict [JSON](https://www.json.org/) file format rules to simplify parsing.
The order of the entities within the `@graph` JSON-LD array
and the order of the keys within a JSON object is _not significant_.
The _graph_ content is given by the `@id` cross-references.

You will add a comma here between the `ro-crate-metadata.json` entity, and the root data entity.
::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: callout
## RO-Crate versions
This tutorial is written for RO-Crate 1.1,
This tutorial is written for RO-Crate 1.2,
the RO-Crate website will list the [current specification version](https://www.researchobject.org/ro-crate/specification.html)
-- RO-Crates can generally be upgraded to newer versions following [semantic versioning](https://semver.org/) conventions,
but check the [change log](https://www.researchobject.org/ro-crate/1.1/appendix/changelog.html) for any important changes.
but check the [change log](https://www.researchobject.org/ro-crate/specification/1.2/appendix/changelog.html) for any important changes.
The next development version of the specification, indicated with a `-DRAFT` status,
may still be subject to changes and should only be used with caution.
::::::::::::::::::::::::::::::::::::::::::::::::::
Expand All @@ -52,5 +68,3 @@ may still be subject to changes and should only be used with caution.
- RO-Crate specifications are versioned
- The version of RO-Crate is indicated using the conformsTo property
::::::::::::::::::::::::::::::::::::::::::::::::::


56 changes: 33 additions & 23 deletions episodes/04-root.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ exercises: 1

## RO-Crate Root

Next we'll add another entity to the `@graph` array,
to describe the [RO-Crate Root](https://www.researchobject.org/ro-crate/1.1/root-data-entity.html#direct-properties-of-the-root-data-entity):
First we'll add an entity to the `@graph` array,
to describe the [RO-Crate Root](https://www.researchobject.org/ro-crate/specification/1.2/root-data-entity.html#direct-properties-of-the-root-data-entity):

```json
{
Expand All @@ -27,23 +27,8 @@ to describe the [RO-Crate Root](https://www.researchobject.org/ro-crate/1.1/root
}
```

:::::::::::::::::::::::::::::::::::::::: callout
Copy link
Contributor

Choose a reason for hiding this comment

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

I missed this first time through, but I think we should move this section to where we add the metadata descriptor.

Copy link
Contributor

Choose a reason for hiding this comment

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

I made a commit for this, hopefully it is not contentious :)

## Adding entities to the JSON array

Because we're adding incrementally to the `@graph` array.
It is important to remember the comma `,` between each entity,
**except** for the final entity in the JSON array;
and likewise for the properties within the JSON object for each entity.
This is an artefact of the strict [JSON](https://www.json.org/) file format rules to simplify parsing.
The order of the entities within the `@graph` JSON-LD array
and the order of the keys within a JSON object is _not significant_.
The _graph_ content is given by the `@id` cross-references.

You will add a comma here between the `ro-crate-metadata.json` entity, and the root data entity.
::::::::::::::::::::::::::::::::::::::::::::::::::

By convention, in RO-Crate the `@id` value of `./` means that this entity describes the folder in which the RO-Crate metadata file is located.
This reference from `ro-crate-metadata.json` is therefore semantically marking the `crate1` folder as being the RO-Crate Root.
By convention, in RO-Crate the `@id` value of `./` means that this entity describes the folder in which the RO-Crate metadata file is located. The root data entity always has the `@type` value of `Dataset`, which is a [schema.org](https://schema.org/Dataset) type.
This will be referenced from `ro-crate-metadata.json`, semantically marking the `crate1` folder as being the RO-Crate Root.


:::::::::::::::::::::::::::::::::::::::: discussion
Expand All @@ -57,11 +42,36 @@ If the crate is being served from a Web service,
such as a data repository or database where files are not organized in folders,
then the `@id` might be an absolute URI instead of `./`
-- this is one reason why we point to the root entity from the metadata descriptor,
see section [Root Data Entity](https://www.researchobject.org/ro-crate/1.1/root-data-entity.html) for details.
as you will see in the next section.
::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::::::::::::::::::: keypoints
- The RO-Crate Root is the top-level object of the RO-Crate
- The root identifier may be a URL, but commonly just ./ for the current folder
:::::::::::::::::::::::::::::::::::::::: challenge
## Add an additional type

1. Navigate the schema.org type list to find a subtype of `CreativeWork` that is suitable for a learning resource.
2. Modify the root entity's `@type` to be an array.
3. Add the type name for learning resource at the end of the array.

::::::::::::::: solution
```json
{
"@id": "./",
"@type": ["Dataset", "LearningResource"],
"hasPart": [
{"@id": "data.csv"}
],
"…": "…"
}
```
:::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::

The root has several metadata properties that describe the RO-Crate as a whole,
considering it as a Research Object of collected resources.
In the next section we will cover the required and recommended properties of the root `./`.

:::::::::::::::::::::::::::::::::::::::: keypoints
- The RO-Crate Root is the top-level object of the RO-Crate
- The root identifier is commonly just ./ for the current folder, but can be a URL
- The root is always typed as a Dataset, but can have additional types
::::::::::::::::::::::::::::::::::::::::::::::::::
11 changes: 4 additions & 7 deletions episodes/05-root-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## Describing the root entity

When describing the [root entity](https://www.researchobject.org/ro-crate/1.1/root-data-entity.html#direct-properties-of-the-root-data-entity),
When describing the [root entity](https://www.researchobject.org/ro-crate/specification/1.2/root-data-entity.html#direct-properties-of-the-root-data-entity),
the properties generally apply to the whole of the crate.
For instance it is a good idea to give a description of why these resources are gathered in a crate,
as well as giving the crate a name and license for FAIR reuse and citation.
Expand All @@ -36,7 +36,7 @@
"hasPart": [ ],
"name": "Example crate",
"description": "I created this example by following the tutorial",
"datePublished": "2023-05-22T12:03:00+0100",
"datePublished": "2023-05-22",
"license": { "@id": "http://spdx.org/licenses/CC0-1.0"}
}
```
Expand All @@ -49,7 +49,7 @@
## License identifiers

In the above solution,
the identifier for CC0-1.0 <http://spdx.org/licenses/CC0-1.0> is slightly

Check warning on line 52 in episodes/05-root-metadata.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[needs HTTPS]: [http://spdx.org/licenses/CC0-1.0](http://spdx.org/licenses/CC0-1.0)
different from their listed web page URI <https://spdx.org/licenses/CC0-1.0.html>
-- the former is chosen to align with [SPDX JSON-LD identifiers](https://github.com/spdx/license-list-data/tree/main/jsonld),
which unfortunately are not shown directly on their website as _permalinks_.
Expand All @@ -68,9 +68,6 @@
::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::::::::::::::::::: keypoints
- Name, description, date published and license are required for the RO-Crate Root"
- Name, description, date published and license are required for the RO-Crate Root
- RO-Crate allows multiple licenses for different parts
::::::::::::::::::::::::::::::::::::::::::::::::::



::::::::::::::::::::::::::::::::::::::::::::::::::
Loading