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

Fixes coming from the openDS public review #7

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
94 changes: 47 additions & 47 deletions app/data/opends/annotation-termlist.csv

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions app/data/opends/create-update-tombstone-event-termlist.csv

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions app/data/opends/data-mapping-termlist.csv

Large diffs are not rendered by default.

178 changes: 89 additions & 89 deletions app/data/opends/digital-media-termlist.csv

Large diffs are not rendered by default.

630 changes: 319 additions & 311 deletions app/data/opends/digital-specimen-termlist.csv

Large diffs are not rendered by default.

100 changes: 54 additions & 46 deletions app/data/opends/machine-annotation-service-termlist.csv

Large diffs are not rendered by default.

61 changes: 31 additions & 30 deletions app/data/opends/source-system-termlist.csv

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,9 @@ def generate_terms(header_mdfile, term_file):
on=['compound_name'], how='left'
)
terms = terms_skos_df.sort_values(by=['class_name'])
terms['examples'] = terms['examples'].str.replace(r'"', '')
terms['definition'] = terms['definition'].str.replace(r'"', '')
terms['examples'] = terms['examples'].str.replace(r'"', '').replace("'", "").replace("[", "").replace("]", "")
terms['enum'] = terms['enum'].str.replace(r'"', '').replace("'", "").replace("[", "").replace("]", "")
southeo marked this conversation as resolved.
Show resolved Hide resolved
terms['definition'] = terms['definition'].str.replace(r'"', '').replace("'", "").replace("[", "").replace("]", "")

Choose a reason for hiding this comment

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

Maybe make a function out of this as you are repeating the same action three times

Copy link
Author

Choose a reason for hiding this comment

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

👍

Copy link
Author

Choose a reason for hiding this comment

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

Removed the logic for definition as this is never an array


# Unique Class Names
opends_classes = terms_df["class_name"].dropna().unique()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
tombstoneDate : string
tombstoneText : string
TombstonedByAgent : object
hasRelatedPID : array
hasRelatedPID : array<object>
}
class Agent {
name : string
Expand All @@ -39,15 +39,15 @@
roleOrder : integer
email : string
url : string
hasIdentifier : array
hasIdentifier : array<ods:Identifier>
}
class AnnotationTarget {
ID : string
type : string
hasSelector : object
}
class AnnotationBody {
value : array
value : array<string>
references : string
score : number
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
class CreateUpdateTombstoneEvent {
ID : string
type : string
hasProvAgent : array
hasProvAgent : array<ods:Agent>
}
class Activity {
wasAssociatedWith : array
wasAssociatedWith : array<ods:Agent>
endedAtTime : string
used : string
comment : string
changeValue : array
changeValue : array<object>
}
class Entity {
value : object
Expand All @@ -24,7 +24,7 @@
roleOrder : integer
email : string
url : string
hasIdentifier : array
hasIdentifier : array<ods:Identifier>
}
CreateUpdateTombstoneEvent -- Activity
CreateUpdateTombstoneEvent -- Entity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classDiagram
class Mapping {
class DataMapping {
ID : string
type : string
status : None
Expand All @@ -9,16 +9,16 @@
dateCreated : string
dateModified : string
creator : object
DefaultMapping : array
FieldMapping : array
DefaultMapping : array<ods:DefaultMapping>
FieldMapping : array<ods:FieldMapping>
mappingDataStandard : None
TombstoneMetadata : object
}
class TombstoneMetadata {
tombstoneDate : string
tombstoneText : string
TombstonedByAgent : object
hasRelatedPID : array
hasRelatedPID : array<object>
}
class Agent {
name : string
Expand All @@ -28,7 +28,7 @@
roleOrder : integer
email : string
url : string
hasIdentifier : array
hasIdentifier : array<ods:Identifier>
}
Mapping -- TombstoneMetadata
Mapping -- Agent
DataMapping -- TombstoneMetadata
DataMapping -- Agent
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
rightsHolder : string
source : string
creator : string
hasAssertion : array
hasCitation : array
hasIdentifier : array
hasEntityRelationship : array
hasAgent : array
hasAssertion : array<ods:Assertion>
hasCitation : array<ods:Citation>
hasIdentifier : array<ods:Identifier>
hasEntityRelationship : array<ods:EntityRelationship>
hasAgent : array<ods:Agent>
TombstoneMetadata : object
}
class Agent {
Expand All @@ -35,7 +35,7 @@
roleOrder : integer
email : string
url : string
hasIdentifier : array
hasIdentifier : array<ods:Identifier>
}
class Assertion {
measurementID : string
Expand Down Expand Up @@ -92,7 +92,7 @@
tombstoneDate : string
tombstoneText : string
TombstonedByAgent : object
hasRelatedPID : array
hasRelatedPID : array<object>
}
DigitalMedia -- Agent
DigitalMedia -- Assertion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
sourceSystemID : string
sourceSystemName : string
livingOrPreserved : None
language : array
language : array<string>
license : string
basisOfRecord : string
preparations : string
Expand All @@ -45,15 +45,15 @@
associatedOrganisms : string
organismRemarks : string
dynamicProperties : string
hasMaterialEntity : array
hasIdentification : array
hasAssertion : array
hasEvent : array
hasEntityRelationship : array
hasCitation : array
hasIdentifier : array
hasChronometricAge : array
hasAgent : array
hasMaterialEntity : array<ods:MaterialEntity>
hasIdentification : array<ods:Identification>
hasAssertion : array<ods:Assertion>
hasEvent : array<ods:Event>
hasEntityRelationship : array<ods:EntityRelationship>
hasCitation : array<ods:Citation>
hasIdentifier : array<ods:Identifier>
hasChronometricAge : array<ods:ChronometricAge>
hasAgent : array<ods:Agent>
TombstoneMetadata : object
}
class MaterialEntity {
Expand All @@ -70,13 +70,13 @@
recordedBy : string
recordedByID : string
verbatimLabel : string
hasIdentification : array
hasAssertion : array
hasEntityRelationship : array
hasCitation : array
hasIdentifier : array
hasEvent : array
hasAgent : array
hasIdentification : array<ods:Identification>
hasAssertion : array<ods:Assertion>
hasEntityRelationship : array<ods:EntityRelationship>
hasCitation : array<ods:Citation>
hasIdentifier : array<ods:Identifier>
hasEvent : array<ods:Event>
hasAgent : array<ods:Agent>
}
class Identification {
identificationID : string
Expand All @@ -91,8 +91,8 @@
isVerifiedIdentification : boolean
identificationRemarks : string
identificationQualifier : string
hasCitation : array
hasTaxonIdentification : array
hasCitation : array<ods:Citation>
hasTaxonIdentification : array<ods:TaxonIdentification>
}
class TaxonIdentification {
taxonID : string
Expand Down Expand Up @@ -167,7 +167,7 @@
eventRemarks : string
collectorName : string
collectorID : string
hasAssertion : array
hasAssertion : array<ods:Assertion>
Location : object
}
class Location {
Expand Down Expand Up @@ -245,7 +245,7 @@
roleOrder : integer
email : string
url : string
hasIdentifier : array
hasIdentifier : array<ods:Identifier>
}
class Assertion {
measurementID : string
Expand Down Expand Up @@ -322,7 +322,7 @@
tombstoneDate : string
tombstoneText : string
TombstonedByAgent : object
hasRelatedPID : array
hasRelatedPID : array<object>
}

DigitalSpecimen -- MaterialEntity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
serviceAvailability : string
maintainer : object
license : string
dependency : array
dependency : array<string>
slaDocumentation : string
topicName : string
maxReplicas : integer
batchingPermitted : boolean
timeToLive : integer
TombstoneMetadata : object
hasEnvironmentalVariable : array<ods:EnvironmentalVariable>
hasSecretVariable : array<ods:SecretVariable>
}
class ContactPoint {
description : string
Expand All @@ -36,7 +38,7 @@
tombstoneDate : string
tombstoneText : string
TombstonedByAgent : object
hasRelatedPID : array
hasRelatedPID : array<object>
}
class Agent {
name : string
Expand All @@ -46,8 +48,18 @@
roleOrder : integer
email : string
url : string
hasIdentifier : array
hasIdentifier : array<ods:Identifier>
}
class SecretVariable {
name : string
secretKeyRef : string
}
class EnvironmentalVariable {
name : string
value : ['string', 'integer', 'boolean']
}
MachineAnnotationService -- ContactPoint
MachineAnnotationService -- TombstoneMetadata
MachineAnnotationService -- Agent
MachineAnnotationService -- SecretVariable
MachineAnnotationService -- EnvironmentalVariable
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
url : string
collectionManagementSystem : string
translatorType : None
maximumRecords : integer
dataMappingID : string
TombstoneMetadata : object
}
class TombstoneMetadata {
tombstoneDate : string
tombstoneText : string
TombstonedByAgent : object
hasRelatedPID : array
hasRelatedPID : array<object>
}
class Agent {
name : string
Expand All @@ -29,7 +30,7 @@
roleOrder : integer
email : string
url : string
hasIdentifier : array
hasIdentifier : array<ods:Identifier>
}
SourceSystem -- TombstoneMetadata
SourceSystem -- Agent
20 changes: 18 additions & 2 deletions app/templates/includes/termlist/termlist-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ <h2 id="5-vocabulary">5 Vocabulary</h2>

{% if v['examples'] is number %}
{% else %}
{% set list1 = v['examples'].split('`, `') %}
{% set list1 = v['examples'].split(', ') %}
<tr>
<th scope="row">Examples</th>
<td>
<ul class="td-list">
{% for item in list1 %}
<li><span>{{ item|replace("`","") }}</span></li>
<li><span>{{ item }}</span></li>
{% endfor %}
</ul>

Expand All @@ -64,6 +64,22 @@ <h2 id="5-vocabulary">5 Vocabulary</h2>

{% endif %}

{% if v['enum'] is number %}
{% else %}
{% set list1 = v['enum'].split(', ') %}
<tr>
<th scope="row">Controlled Vocabulary</th>
<td>
<ul class="td-list">
{% for item in list1 %}
<li><span>{{ item }}</span></li>
{% endfor %}
</ul>

</td>
</tr>
Comment on lines +70 to +80

Choose a reason for hiding this comment

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

Don't know how this should look but often and elements are stored in separate (table rows)

Copy link
Author

Choose a reason for hiding this comment

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

Hmm took this over from Latimer Core only made some small changes to it. Would like to keep this for now

Choose a reason for hiding this comment

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

I understand, just a generic HTML thing that is possible, but not recommended

{% endif %}

{% if v['datatype'] is number %}
{% else %}
<tr>
Expand Down
Loading
Loading