Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
samleeflang committed Jun 25, 2024
1 parent fce6d11 commit 352e3c8
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 35 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
vuln-type: 'os,library'
- name: Trivy - Stop on Severe Vulnerabilities
uses: aquasecurity/trivy-action@master
if: github.event_name == 'pull_request'
with:
image-ref: '${{ github.event.repository.name }}'
format: 'table'
Expand Down
32 changes: 15 additions & 17 deletions app/md/annotation/termlist-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@
: 0.3.0

**Abstract**
: The data model for an Annotation within the DiSSCo infrastructure. This model is inspired by the W3C Web Annotation model.
An annotation can be attached to any digital object in the DiSSCo infrastructure and can contain any of the following motivations:
- adding: The user wants to add new information to the object
- assessing: The user wants to assess the quality of the data in the object
- editing: The user wants to edit an existing value of the object
- commenting: The users wants to make a generic comment on the object
There are several levels on which an annotation can be made:
- The whole object: The annotation is made on the whole object, used when a user wants to create a comment on for example the whole Digital Specimen
- A class: The annotation is made on the whole class, used when a user wants to add for example an additional Identification
- An individual property: The annotation is made on a specific property of the class, used when a user wants to edit a particular fields, for example the collector of a specimen
- A RegionOfInterest: The annotation is made on a specific region of the object. This type of annotation is mainly used when it is attached to a digital entity. For example it can indicate a specific ROI in an image and attach a value to that ROI.

The value of the annotation can be attached in the body.
This can be in the form of an array of strings.
When a full class is replaced the body can contain the full new class in JSON format.
:
The data model for an Annotation within the DiSSCo infrastructure. This model is inspired by the W3C Web Annotation model. An annotation can be attached to any digital object in the DiSSCo infrastructure, and can contain any of the following motivations:

adding: The user wants to add new information to the object
assessing: The user wants to assess the quality of the data in the object
editing: The user wants to edit an existing value of the object
commenting: The user wants to make a generic comment on the object
There are several levels on which an annotation can be made:
The whole object: The annotation is made on the whole object, used when a user wants to create a comment on, for example, the whole Digital Specimen
A class: The annotation is made on the whole class, used when a user wants to add, for example, an additional Identification
An individual property: The annotation is made on a specific property of the class, used when a user wants to edit a particular field, for example, the collector of a specimen
A RegionOfInterest: The annotation is made on a specific region of the object. This type of annotation is mainly used when it is attached to a digital media object. For example, it can indicate a specific ROI in an image and attach a value to that ROI.
The value of the annotation can be attached in the body. This can be in the form of an array of strings. When a full class is replaced, the body can contain the full new class in JSON format.

The AggregateRating has not been implemented yet.

Expand All @@ -56,13 +54,13 @@ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL
### 1.3 Naming Convention <span id="13-categories-of-terms"></span>
This document contains all the terms in use the DiSSCo Digital Objects.
Most objects can be directly related to a openDS class, for example the Machine Annotation Service, or the Source System.
However, the DigitalSpecimen and the Digital Entity are more complex objects.
However, the Digital Specimen and the Digital Media are more complex objects.
They can contain classes as nested object in itself.
In general, class names are capitalized, use the UpperCamelCase naming convention and are singular.
For example, the class that represents a Digital Specimen is called `DigitalSpecimen`.
The properties of a class start with a lowercase and use the lowerCamelCase naming convention.
When a class contains a property which contains a list of another class we use the convention `hasXXX` where XXX is the class name.
For example, the DigitalSpecimen can contain a list of Event objects, so it has a property called `hasEvent`.
For example, the Digital Specimen can contain a list of Event objects, so it has a property called `hasEvent`.
When a class is directly nested (not through a list) we use the class name as property name.
For example, the Location class contains the property `ods:GeoReference` which contains the Geo Reference class.

Expand Down
4 changes: 2 additions & 2 deletions app/md/create-update-tombstone-event/termlist-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL
### 1.3 Naming Convention <span id="13-categories-of-terms"></span>
This document contains all the terms in use the DiSSCo Digital Objects.
Most objects can be directly related to a openDS class, for example the Machine Annotation Service, or the Source System.
However, the DigitalSpecimen and the Digital Entity are more complex objects.
However, the Digital Specimen and the Digital Media are more complex objects.
They can contain classes as nested object in itself.
In general, class names are capitalized, use the UpperCamelCase naming convention and are singular.
For example, the class that represents a Digital Specimen is called `DigitalSpecimen`.
The properties of a class start with a lowercase and use the lowerCamelCase naming convention.
When a class contains a property which contains a list of another class we use the convention `hasXXX` where XXX is the class name.
For example, the DigitalSpecimen can contain a list of Event objects, so it has a property called `hasEvent`.
For example, the Digital Specimen can contain a list of Event objects, so it has a property called `hasEvent`.
When a class is directly nested (not through a list) we use the class name as property name.
For example, the Location class contains the property `ods:GeoReference` which contains the Geo Reference class.

Expand Down
4 changes: 2 additions & 2 deletions app/md/digital-media/termlist-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ appear in all capitals, as shown here.
This document contains all the terms in use the DiSSCo Digital Objects.
Most objects can be directly related to a openDS class, for example the Machine Annotation Service, or the Source
System.
However, the DigitalSpecimen and the Digital Entity are more complex objects.
However, the Digital Specimen and the Digital Media are more complex objects.
They can contain classes as nested object in itself.
In general, class names are capitalized, use the UpperCamelCase naming convention and are singular.
For example, the class that represents a Digital Specimen is called `DigitalSpecimen`.
The properties of a class start with a lowercase and use the lowerCamelCase naming convention.
When a class contains a property which contains a list of another class we use the convention `hasXXX` where XXX is the
class name.
For example, the DigitalSpecimen can contain a list of Event objects, so it has a property called `hasEvent`.
For example, the Digital Specimen can contain a list of Event objects, so it has a property called `hasEvent`.
When a class is directly nested (not through a list) we use the class name as property name.
For example, the Location class contains the property `ods:GeoReference` which contains the Geo Reference class.

Expand Down
4 changes: 2 additions & 2 deletions app/md/digital-specimen/termlist-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL
### 1.3 Naming Convention <span id="13-categories-of-terms"></span>
This document contains all the terms in use the DiSSCo Digital Objects.
Most objects can be directly related to a openDS class, for example the Machine Annotation Service, or the Source System.
However, the DigitalSpecimen and the Digital Entity are more complex objects.
However, the Digital Specimen and the Digital Media are more complex objects.
They can contain classes as nested object in itself.
In general, class names are capitalized, use the UpperCamelCase naming convention and are singular.
For example, the class that represents a Digital Specimen is called `DigitalSpecimen`.
The properties of a class start with a lowercase and use the lowerCamelCase naming convention.
When a class contains a property which contains a list of another class we use the convention `hasXXX` where XXX is the class name.
For example, the DigitalSpecimen can contain a list of Event objects, so it has a property called `hasEvent`.
For example, the Digital Specimen can contain a list of Event objects, so it has a property called `hasEvent`.
When a class is directly nested (not through a list) we use the class name as property name.
For example, the Location class contains the property `ods:GeoReference` which contains the Geo Reference class.

Expand Down
9 changes: 6 additions & 3 deletions app/md/opends/home-content.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
Open Digital Specimen (openDS) is a comprehensive data specification that describes the essence of a "Digital Specimen" as implemented by [DiSSCo](https://www.dissco.eu/), a digital surrogate of a specimen on the internet with its related information.
The openDS data model documented here is based on the draft [GBIF Unified Model](https://www.gbif.org/composition/HjlTr705BctcnaZkcjRJq/gbif-new-data-model) as well as biodiversity information standards like [Darwin Core](https://www.tdwg.org/standards/) and [ABCD](https://www.tdwg.org/standards/abcd/).
openDS is designed to enhance [FAIR aspects](https://www.go-fair.org/fair-principles/) of specimen data including support for provenance data and machine actionability.
openDS is designed to enhance [FAIR aspects](https://www.go-fair.org/fair-principles/) of specimen data including support for provenance data and machine actionability.
For each digital object we created a terms, guide and resources page.
In the top right you will find a navigation bar where there are dropdowns for each type of documentation we provide.

Getting started[](#getting-started)
-----------------------------------
* [Normative Term List](terms)
* [Quick Reference Guide](quick-reference)
* [Normative Term List Digital Specimen](digital-specimen-terms)
* [Quick Reference Guide Digital Specimen](digital-specimen-guide)
* [Json Schema](https://schemas.dissco.tech) provide the original schemas on which this site is generated
* The [OpenDS Github](https://github.com/DiSSCo/openDS) provides any additional information available, including examples.
* For questions and change requests please create a [Github Issue](https://github.com/DiSSCo/openDS/issues)
Expand Down
18 changes: 9 additions & 9 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def digitalSpecimenTerms():
termsByClass=terms_by_class,
pageTitle='Digital Specimen Terms (In Progress)',
title='Digital Specimen Term List',
slug='digitalSpecimenTermList'
slug='digital-specimen-term-list'
)


Expand All @@ -64,7 +64,7 @@ def machineAnnotationServiceTerms():
termsByClass=terms_by_class,
pageTitle='Machine Annotation Service Terms (In Progress)',
title='Machine Annotation Service Term List',
slug='machineAnnotationServiceTermList'
slug='machine-annotation-service-term-list'
)


Expand All @@ -81,9 +81,9 @@ def digitalMediaTerms():
terms=terms,
sssom=sssom_df,
termsByClass=terms_by_class,
pageTitle='Digital Entity Terms (In Progress)',
title='Digital Entity Term List',
slug='digitalEntityTermList'
pageTitle='Digital Media Terms (In Progress)',
title='Digital Media Term List',
slug='digital-media-term-list'
)


Expand All @@ -102,7 +102,7 @@ def annotationTerms():
termsByClass=terms_by_class,
pageTitle='Annotation Terms (In Progress)',
title='Annotation Term List',
slug='annotationTermList'
slug='annotation-term-list'
)


Expand All @@ -121,7 +121,7 @@ def createUpdateTombstoneEventTerms():
termsByClass=terms_by_class,
pageTitle='Create Update Tombstone Event Terms (In Progress)',
title='Create Update Tombstone Event Term List',
slug='createUpdateTombstoneEventTermList'
slug='create-update-tombstone-event-term-list'
)


Expand All @@ -140,7 +140,7 @@ def dataMappingTerms():
termsByClass=terms_by_class,
pageTitle='Data Mapping Terms (In Progress)',
title='Data Mapping Term List',
slug='dataMappingTermList'
slug='data-mapping-term-list'
)


Expand All @@ -159,7 +159,7 @@ def sourceSystemTerms():
termsByClass=terms_by_class,
pageTitle='Source System Terms (In Progress)',
title='Source System Term List',
slug='sourceSystemTermList'
slug='source-system-term-list'
)


Expand Down

0 comments on commit 352e3c8

Please sign in to comment.