Skip to content

Commit

Permalink
#402 add status/notes + improve list_actions
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Jan 6, 2025
1 parent 52b0627 commit 5f1b594
Show file tree
Hide file tree
Showing 18 changed files with 79 additions and 3 deletions.
16 changes: 15 additions & 1 deletion R/geoflow_action.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ geoflow_action <- R6Class("geoflow_action",
options = list(),
#'@field available_options a list of available options for the actions
available_options= list(),
#'@field status status
status = "stable",
#'@field notes notes
notes = "",

#'@description Initialize a \link{geoflow_action}
#'@param yaml a yaml file
Expand All @@ -90,6 +94,8 @@ geoflow_action <- R6Class("geoflow_action",
#'@param script action script
#'@param options action options
#'@param available_options available options for the action
#'@param status status of the action (experimental, stable, deprecated, superseded)
#'@param notes notes
initialize = function(yaml = NULL,
id = NULL,
funders = list(), authors = list(), maintainer = NULL,
Expand All @@ -99,7 +105,8 @@ geoflow_action <- R6Class("geoflow_action",
pid_generator = NULL, pid_types = list(),
generic_uploader = FALSE,
fun = NULL, script = NULL, options = list(),
available_options = list()){
available_options = list(),
status = "stable", notes = ""){

if(!is.null(yaml)){
self$fromYAML(yaml)
Expand All @@ -125,6 +132,8 @@ geoflow_action <- R6Class("geoflow_action",
self$script <- script
self$options <- options
self$available_options <- available_options
self$status = status
self$notes = notes
}
},

Expand Down Expand Up @@ -161,6 +170,8 @@ geoflow_action <- R6Class("geoflow_action",
}
return(opt)
})
self$status = if(!is.null(yml$status)) yml$status else "<unknown>"
self$notes = if(!is.null(yml$notes)) yml$notes else ""
},

#'@description Check that all packages required for the action are available, if yes,
Expand Down Expand Up @@ -341,6 +352,9 @@ list_actions <- function(raw = FALSE){
target_dir = action$target_dir,
pid_generator = action$isPIDGenerator(),
packages = paste(action$packages, collapse=","),
status = action$status,
notes = action$notes,
maintainer = if(!is.null(action$maintainer$name)){action$maintainer$name}else{ if(action$maintainer$orphaned) "<orphaned>" else "<unknown>" },
stringsAsFactors = FALSE
))
}))
Expand Down
1 change: 1 addition & 0 deletions inst/actions/atom4R_dataverse_deposit_record.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ types:
- Metadata publication
- DOI management
def: Deposits/Publish data and/or metetadata on a Dataverse using the Sword API
status: experimental
target: job
target_dir: dataverse
pid_generator: dataverse
Expand Down
1 change: 1 addition & 0 deletions inst/actions/d4storagehub4R_upload_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ maintainer:
types:
- Data upload
def: Upload data/metadata to a D4Science Workspace
status: stable
target: NA
target_dir: NA
generic_uploader: true
Expand Down
1 change: 1 addition & 0 deletions inst/actions/dataone_upload_datapackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ types:
- Metadata publication
- DOI management
def: Uploads a data package to a DataOne metacat node
status: experimental
target: job
target_dir: dataone
pid_generator: dataone
Expand Down
1 change: 1 addition & 0 deletions inst/actions/eml_create_eml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ maintainer:
types:
- Metadata production
def: Produce an EML metadata object
status: experimental
target: entity
target_dir: metadata
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/geometa_create_iso_19110.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ maintainer:
types:
- Metadata production
def: Produce an ISO 19110 metadata object and export it to XML
status: stable
target: entity
target_dir: metadata
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/geometa_create_iso_19115.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ maintainer:
types:
- Metadata production
def: Produce an ISO/OGC 19115 metadata object and export it to XML
status: stable
target: entity
target_dir: metadata
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/geonapi_publish_iso_19139.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ maintainer:
types:
- Metadata publication
def: Publish/Update an ISO/OGC 19139 metadata object with GeoNetwork API
status: stable
target: entity
target_dir: metadata
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/geonode4R_publish_ogc_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ types:
- Data publication
- Metadata publication
def: Publish data to GeoNode OGC web-services (WMS/WFS/WCS)
status: experimental
target: NA
target_dir: NA
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/geosapi_publish_ogc_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ types:
- Data publication
- Metadata publication
def: Publish data to GeoServer OGC web-services (WMS/WFS/WCS)
status: stable
target: NA
target_dir: NA
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/ocs4R_upload_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ maintainer:
types:
- Data upload
def: Upload data to an OCS Cloud (NextCloud/Owncloud) Workspace
status: experimental
target: NA
target_dir: NA
generic_uploader: false
Expand Down
1 change: 1 addition & 0 deletions inst/actions/ows4R_publish_iso_19139.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ maintainer:
types:
- Metadata publication
def: Publish/Update an ISO/OGC XML metadata object using OGC CSW Protocol
status: stable
target: entity
target_dir: metadata
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/rmarkdown_create_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ types:
- Metadata production
- Reporting
def: Generate a Markdown out of a entity
status: experimental
target: entity
target_dir: markdown
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/sf_write_dbi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ types:
- Data writing
- Data upload
def: Import features data into Postgres/Postgis
status: stable
target: entity
target_dir: data
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/sf_write_generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ types:
- Data writing
- Data upload
def: Import features data into several formats
status: stable
target: entity
target_dir: data
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/sf_write_shp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ maintainer:
types:
- Data writing
def: Import features data and zip files
status: stable
target: entity
target_dir: data
packages:
Expand Down
1 change: 1 addition & 0 deletions inst/actions/zen4R_deposit_record.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ types:
- Metadata publication
- DOI management
def: Deposits/Publish data and/or metadata in the Zenodo infrastructure
status: stable
target: job
target_dir: zenodo
pid_generator: zenodo
Expand Down
50 changes: 48 additions & 2 deletions man/geoflow_action.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5f1b594

Please sign in to comment.