Skip to content

Commit

Permalink
Testfix (#224)
Browse files Browse the repository at this point in the history
* fix testrecord

* fix flake8
  • Loading branch information
seolih authored Dec 13, 2021
1 parent 8569fd0 commit e8454a0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions mdingestion/community/bluecloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ def update(self, doc):
doc.discipline = ['Marine Science']
doc.description = self._find('Abstract')
doc.source = self._find('OnlineResourceUrl')
#print(doc.source)
#doc.relatedIdentifier = self.find('linkAskeladden')
# print(doc.source)
# doc.relatedIdentifier = self.find('linkAskeladden')
doc.publication_year = self._find('Last_Update')
doc.contributor = self._find('Organisations')
#doc.language = ['']
# doc.language = ['']
doc.contact = ['blue-cloud-support@maris.nl']
#doc.creator = self.find('properties.opphav')
#doc.rights = ['NLOD (https://data.norge.no/nlod/en/2.0/)']
#doc.version = self.find('properties.versjonId')
# doc.creator = self.find('properties.opphav')
# doc.rights = ['NLOD (https://data.norge.no/nlod/en/2.0/)']
# doc.version = self.find('properties.versjonId')
doc.title = self._find('Title') or self._find('Abstract')
doc.temporal_coverage_begin_date = self._find('Temporal_Extent_Begin')
doc.temporal_coverage_end_date = self._find('Temporal_Extent_End')
Expand Down
2 changes: 1 addition & 1 deletion mdingestion/community/fmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def update(self, doc):
doc.keywords = self.keywords()
doc.language = self.language()
self._identifier(doc)
#doc.funding_reference = self.find('Funder')
# doc.funding_reference = self.find('Funder')

def _identifier(self, doc):
for id in self.find('identifier'):
Expand Down
1 change: 1 addition & 0 deletions mdingestion/sniffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def metadata_access(self, doc):
mdaccess = None
return mdaccess


class BlueCloudSniffer(CatalogSniffer):
def update(self, doc):
doc.metadata_access = self.metadata_access(doc)
Expand Down
4 changes: 2 additions & 2 deletions tests/community/test_bluecloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def test_json_1():
assert ['8979 - 5906739 - Argo SIO'] == doc.title
assert 'https://data.blue-cloud.org/search-details?step=~012004EC2760F11C211B24C3F35CF95E9FE0E9C4F04' == doc.source
assert ['RBR_PRES_A', 'RBR_ARGO3', '8979'] == doc.instrument
assert ['31', 'SIO_IDG', 'ARGO'] == doc.keywords
assert ['Blue-Cloud', 'EuroArgo – Argo'] == doc.publisher
assert ['31', 'SIO_IDG', 'ARGO', 'SUBSURFACE PRESSURE', 'SUBSURFACE SALINITY', 'SUBSURFACE TEMPERATURE'] == doc.keywords
assert ['Blue-Cloud Data Discovery & Access service', 'EuroArgo – Argo'] == doc.publisher
assert ['AOML'] == doc.contributor
assert '2021' == doc.publication_year
assert '(-164.679W, -2.201S, -164.310E, -2.081N)' == doc.spatial_coverage
Expand Down

0 comments on commit e8454a0

Please sign in to comment.