-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#390 test feeding metadataeditr from CSW, consolidate CSW entity hand…
…ler, metadataeditr project creator
- Loading branch information
Showing
6 changed files
with
196 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"profile": { | ||
"id": "my-csw-workflow", | ||
"name": "My CSW workflow", | ||
"project": "Test geoflow project", | ||
"organization": "My organization", | ||
"logos": [ | ||
"https://via.placeholder.com/300x150.png/09f/fff?text=geoflow" | ||
], | ||
"mode": "entity" | ||
}, | ||
"metadata": { | ||
"entities": [ | ||
{ | ||
"handler": "ogc_csw", | ||
"source": "dc:title like '%fishery purpose%'" | ||
} | ||
] | ||
}, | ||
"software": [ | ||
{ | ||
"id": "csw", | ||
"type": "input", | ||
"software_type": "csw", | ||
"parameters": { | ||
"url": "https://www.fao.org/fishery/geonetwork/srv/eng/csw", | ||
"serviceVersion": "2.0.2", | ||
"logger": "DEBUG" | ||
} | ||
}, | ||
{ | ||
"id": "wb-metadataeditr", | ||
"type": "output", | ||
"software_type": "metadataeditr", | ||
"parameters": { | ||
"api_url": "{{ WB_METADATAEDITOR_API_URL }}", | ||
"api_key": "{{ WB_METADATAEDITOR_API_KEY }}", | ||
"verbose": true | ||
}, | ||
"properties": { | ||
"collection_names": "geoflow" | ||
} | ||
} | ||
], | ||
"actions": [ | ||
{ | ||
"id": "metadataeditr-create-project", | ||
"run": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
config_file,description | ||
config_metadata_csw.json,Load metadata entities from an OGC Catalogue Service for the Web (CSW) query | ||
config_metadata_dataverse.json,Load metadata entities/contacts from Dataverse records | ||
config_metadata_dbi.json,Load metadata entities from a database | ||
config_metadata_gsheets.json,Load metadata entities/contacts from Google Spreadsheets | ||
config_metadata_gsheets_cloud_upload.json, Load metadata entities/contacts from Google spreadsheets and upload into OCS cloud | ||
config_metadata_gsheets_eml.json, Load metadata entities/contacts from Google Spreadsheets and genrate EML metadata | ||
config_metadata_gsheets_iso19115.json,Load metadata entities/contacts from Google Spreadsheets and generate ISO 19115/19139 metadata | ||
config_metadata_gsheets_iso19115_geonetwork.json,Load metadata entities/contacts from Google Spreadsheet; generate ISO 19115/19139 metadata and publish them in GeoNetwork (using the GeoNetwork API) | ||
config_metadata_gsheets_iso19115_geonetwork_datacite.json,Load metadata entities/contacts from Google Spreadsheet; generate ISO 19115/19139 metadata and publish them in GeoNetwork (using the GeoNetwork API) with DOI publication to DataCite | ||
config_metadata_gsheets_iso19115_inspire.json,Load metadata entities/contacts from Google Spreadsheets and generate ISO 19115/19139 metadata (with INSPIRE validation) | ||
config_metadata_gsheets_iso19115_inspire_geonetwork.json,Load metadata entities/contacts from Google Spreadsheet; generate ISO 19115/19139 metadata (with INSPIRE validation) and publish them in GeoNetwork (using the GeoNetwork API) | ||
config_metadata_gsheets_iso19115_inspire_geonetwork_with_uuid.json,Load metadata entities/contacts from Google Spreadsheet; generate ISO 19115/19139 metadata (with INSPIRE validation) and publish them in GeoNetwork (using the GeoNetwork API). Metadata identification with UUIDs. | ||
config_metadata_gsheets_sdi_geonode_shp.json,Load metadata/contacts from Google spreadsheet and publish in GeoNode | ||
config_metadata_gsheets_sdi_geoserver_geotiff.json,Load metadata entities/contacts from Google Spreadsheets and publish GeoTIFF based layer on GeoServer | ||
config_metadata_gsheets_sdi_geoserver_geotiff_directory.json,Load metadata entities/contacts from Google Spreadsheets and publish multiple GeoTIFF based layers on GeoServer for a single entity | ||
config_metadata_gsheets_sdi_geoserver_geotiff_view.json,Load metadata entities/contacts from Google Spreadsheets and publish GeoTIFF based view layer on GeoServer | ||
config_metadata_gsheets_sdi_geoserver_shp.json,Load metadata entities/contacts from Google Spreadsheets and publish ESRI shapefile based layer on GeoServer | ||
config_metadata_gsheets_sdi_postgis_dbi.json,Load metadata entities/contacts from Google spreadsheets and upload a shapefile into a Postgis database | ||
config_metadata_gsheets_zenodo.json,Load metadata entities/contacts from Google Spreadsheets and deposit records on Zenodo | ||
config_metadata_gsheets_zenodo_clean_options.json,Load metadata entities/contacts from Google Spreadsheets and deposit records on Zenodo, with deposit cleaning options | ||
config_metadata_gsheets_zenodo_full.json,Load metadata entities/contacts from Google Spreadsheets, deposit records on Zenodo and publish them | ||
config_metadata_gsheets_sdi_postgis_dbi.json,Load metadata entities/contacts from Google spreadsheets and upload a shapefile into a Postgis database | ||
config_metadata_gsheets_sdi_geoserver_shp.json,Load metadata entities/contacts from Google Spreadsheets and publish ESRI shapefile based layer on GeoServer | ||
config_metadata_gsheets_sdi_geoserver_geotiff.json,Load metadata entities/contacts from Google Spreadsheets and publish GeoTIFF based layer on GeoServer | ||
config_metadata_gsheets_sdi_geoserver_geotiff_view.json,Load metadata entities/contacts from Google Spreadsheets and publish GeoTIFF based view layer on GeoServer | ||
config_metadata_gsheets_sdi_geoserver_geotiff_directory.json,Load metadata entities/contacts from Google Spreadsheets and publish multiple GeoTIFF based layers on GeoServer for a single entity | ||
config_metadata_ncml.json,Load a metadata entity/contacts from a NCML source | ||
config_metadata_ocs.json,Load metadata entities/contacts/dictionary from CSV files hosted on a cloud supporting OCS API (eg. nextcloud/owncloud) | ||
config_metadata_dataverse.json,Load metadata entities/contacts from Dataverse records | ||
config_metadata_thredds_noaa.json,Load metadata entities/contact from a Thredds data server (NOAA example) | ||
config_metadata_zenodo.json,Load metadata entities/contacts from Zenodo deposits/records | ||
config_metadata_zenodo_with_options.json,Load metadata entities/contacts from Zenodo deposits/records (with options declared to fetch from public records and by DOI) | ||
config_metadata_ncml.json,Load a metadata entity/contacts from a NCML source | ||
config_metadata_thredds_noaa.json,Load metadata entities/contact from a Thredds data server (NOAA example) | ||
config_metadataeditr_from_csw,Load metadata entities from an OGC Catalogue Service for the Web (CSW) query and publish into the World Bank Metadata editor | ||
config_metadataeditr_from_gsheets,Load metadata entities/contacts from a Google spreadsheets and publish into the World Bank Metadata editor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# test_config_metadata_gsheets.R | ||
# Author: Emmanuel Blondel <[email protected]> | ||
# | ||
# Description: Integration tests for config_metadataeditr_from_csw.json workflow | ||
#======================= | ||
require(geoflow, quietly = TRUE) | ||
require(testthat) | ||
|
||
cfg_file = system.file("extdata/workflows/config_metadataeditr_from_csw.json", package = "geoflow") | ||
|
||
#init | ||
test_that("init",{ | ||
CFG <- geoflow::initWorkflow(cfg_file) | ||
expect_is(CFG$metadata$content, "list") | ||
expect_equal(length(CFG$metadata$content), 1L) | ||
expect_equal(names(CFG$metadata$content), c("entities")) | ||
expect_equal(length(CFG$metadata$content$contacts), 0L) | ||
expect_equal(length(CFG$getContacts()), 0L) | ||
expect_equal(length(CFG$metadata$content$entities), 1L) | ||
expect_equal(length(CFG$getEntities()), 1L) | ||
expect_equal(length(CFG$actions), 1L) | ||
expect_equal(length(CFG$software), 2L) | ||
expect_equal(names(CFG$software), c("input", "output")) | ||
expect_equal(length(CFG$software$input), 2L) | ||
expect_equal(length(CFG$software$output), 2L) | ||
}) | ||
|
||
#debug | ||
test_that("debug",{ | ||
DEBUG <- geoflow::debugWorkflow(cfg_file) | ||
expect_equal(names(DEBUG), c("config", "entity")) | ||
expect_is(DEBUG$config, "list") | ||
expect_is(DEBUG$entity, "geoflow_entity") | ||
expect_equal(DEBUG$entity$identifiers[["id"]], "ac02a460-da52-11dc-9d70-0017f293bd28") | ||
|
||
}) | ||
|
||
#execute | ||
test_that("execute",{ | ||
EXEC <- geoflow::executeWorkflow(cfg_file, dir = ".") | ||
expect_true(dir.exists(EXEC)) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# test_config_metadata_gsheets.R | ||
# Author: Emmanuel Blondel <[email protected]> | ||
# | ||
# Description: Integration tests for config_metadata_gsheets.json workflow | ||
# Description: Integration tests for config_metadataeditr_from_gsheets.json workflow | ||
#======================= | ||
require(geoflow, quietly = TRUE) | ||
require(testthat) | ||
|
@@ -12,13 +12,13 @@ cfg_file = system.file("extdata/workflows/config_metadataeditr_from_gsheets.json | |
test_that("init",{ | ||
CFG <- geoflow::initWorkflow(cfg_file) | ||
expect_is(CFG$metadata$content, "list") | ||
expect_equal(length(CFG$metadata$content), 2L) | ||
expect_equal(names(CFG$metadata$content), c("contacts", "entities")) | ||
expect_equal(length(CFG$metadata$content), 3L) | ||
expect_equal(names(CFG$metadata$content), c("dictionary","contacts", "entities")) | ||
expect_equal(length(CFG$metadata$content$contacts), 4L) | ||
expect_equal(length(CFG$getContacts()), 4L) | ||
expect_equal(length(CFG$metadata$content$entities), 1L) | ||
expect_equal(length(CFG$getEntities()), 1L) | ||
expect_equal(length(CFG$actions), 1L) | ||
expect_equal(length(CFG$actions), 3L) | ||
expect_equal(length(CFG$software), 2L) | ||
expect_equal(names(CFG$software), c("input", "output")) | ||
expect_equal(length(CFG$software$input), 0L) | ||
|