Skip to content

Commit

Permalink
Fix: update submission yaml file for released, creationDate, uriRegex…
Browse files Browse the repository at this point in the history
…Pattern (#116)

* Fix error btw released and creationDate

* open the uriRegexPattern property to be a string

* fix archived submission notification email to show failure in subject

---------

Co-authored-by: Clement Jonquet <[email protected]>
  • Loading branch information
syphax-bouazzouni and jonquet authored Dec 6, 2023
1 parent 9dd8d03 commit 1cfaf44
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions config/schemes/ontology_submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ publication:
### Dates

#Creation date
creationDate:
released:
display: "dates"
label: "Creation date"
helpText: "Date of original (or first) creation of the resource."
Expand Down Expand Up @@ -466,7 +466,7 @@ curatedOn:
metadataMappings: [ "pav:curatedOn" ]

#Submission date
released:
creationDate:
display: "dates"
label: "Submission date"
helpText: "Date of the submission/release in the portal."
Expand Down
2 changes: 1 addition & 1 deletion lib/ontologies_linked_data/models/ontology_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class OntologySubmission < LinkedData::Models::Base
attribute :translationOfWork, namespace: :schema, type: %i[uri list]

# Content metadata
attribute :uriRegexPattern, namespace: :void, type: :uri
attribute :uriRegexPattern, namespace: :void
attribute :preferredNamespaceUri, namespace: :vann, type: :uri
attribute :preferredNamespacePrefix, namespace: :vann
attribute :exampleIdentifier, namespace: :idot
Expand Down
2 changes: 1 addition & 1 deletion lib/ontologies_linked_data/utils/notifications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def self.submission_processed(submission)
submission.bring_remaining
ontology = submission.ontology
ontology.bring(:name, :acronym)
result = submission.ready? ? 'Success' : 'Failure'
result = submission.ready? || submission.archived? ? 'Success' : 'Failure'
status = LinkedData::Models::SubmissionStatus.readable_statuses(submission.submissionStatus)

subject = "[#{LinkedData.settings.ui_name}] #{ontology.name} Parsing #{result}"
Expand Down
7 changes: 4 additions & 3 deletions test/models/test_ontology_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1149,9 +1149,10 @@ def test_submission_extract_metadata
assert_equal ["http://lexvo.org/id/iso639-3/fra", "http://lexvo.org/id/iso639-3/eng"].sort, sub.naturalLanguage.sort
#assert_equal ["Léontine Dessaiterm", "Anne Toulet", "Benjamine Dessay", "Augustine Doap", "Vincent Emonet"].sort, sub.hasContributor.sort
assert_equal [RDF::URI.new("http://lirmm.fr/2015/ontology/door-relation.owl"), RDF::URI.new("http://lirmm.fr/2015/ontology/dc-relation.owl"),
RDF::URI.new("http://lirmm.fr/2015/ontology/dcterms-relation.owl"), RDF::URI.new("http://lirmm.fr/2015/ontology/voaf-relation.owl")].sort, sub.ontologyRelatedTo.sort


RDF::URI.new("http://lirmm.fr/2015/ontology/dcterms-relation.owl"),
RDF::URI.new("http://lirmm.fr/2015/ontology/voaf-relation.owl"),
RDF::URI.new("http://lirmm.fr/2015/ontology/void-import.owl")
].sort, sub.ontologyRelatedTo.sort
sub.description = "test changed value"
sub.save
end
Expand Down

0 comments on commit 1cfaf44

Please sign in to comment.