| Title: | Functions to Interact with the 'FAIR Data Pipeline' |
| Version: | 0.60.0 |
| Description: | R implementation of the 'FAIR Data Pipeline API'. The 'FAIR Data Pipeline' is intended to enable tracking of provenance of FAIR (findable, accessible and interoperable) data used in epidemiological modelling. |
| License: | GPL (≥ 3) |
| Imports: | assertthat, cli, configr, dplyr, git2r, httr, jsonlite, openssl, R6, rhdf5, semver, stats, usethis, utils, yaml |
| Suggests: | units, testthat |
| biocViews: | rhdf5 |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.2 |
| URL: | https://www.fairdatapipeline.org/rDataPipeline/, https://github.com/FAIRDataPipeline/rDataPipeline |
| BugReports: | https://github.com/FAIRDataPipeline/rDataPipeline/issues |
| NeedsCompilation: | no |
| Packaged: | 2024-10-08 08:59:43 UTC; ryanfield |
| Author: | Sonia Mitchell |
| Maintainer: | Ryan Field <ryan.field@glasgow.ac.uk> |
| Repository: | CRAN |
| Date/Publication: | 2024-10-08 09:20:02 UTC |
rDataPipeline
Description
FAIR Data Pipeline API
Details
For more information see https://www.fairdatapipeline.org/
Author(s)
Maintainer: Ryan Field ryan.field@glasgow.ac.uk (ORCID)
Authors:
Sonia Mitchell (ORCID)
See Also
Useful links:
Report bugs at https://github.com/FAIRDataPipeline/rDataPipeline/issues
add_read
Description
Add data product to read block of user-written config file. Used in
combination with create_config() for unit testing.
Usage
add_read(
path,
data_product,
component,
version,
use_data_product,
use_component,
use_version,
use_namespace
)
Arguments
path |
config file path |
data_product |
data_product field |
component |
component field |
version |
(optional) version field |
use_data_product |
(optional) use_data_product field |
use_component |
(optional) use_component field |
use_version |
(optional) use_version field |
use_namespace |
(optional) use_namespace field |
Examples
## Not run:
path <- "test_config/config.yaml"
# Write run_metadata block
create_config(path = path,
description = "test",
input_namespace = "test_user",
output_namespace = "test_user")
# Write read block
add_read(path = path,
data_product = "test/array",
component = "level/a/s/d/f/s",
version = "0.2.0")
## End(Not run)
add_write
Description
Add data product to read block of user-written config file. Used in
combination with create_config() for unit testing.
Usage
add_write(
path,
data_product,
description,
version,
file_type,
use_data_product,
use_component,
use_version,
use_namespace
)
Arguments
path |
config file path |
data_product |
data_product field |
description |
component field |
version |
(optional) version field |
file_type |
(optional) file type field |
use_data_product |
(optional) use_data_product field |
use_component |
(optional) use_component field |
use_version |
(optional) use_version field |
use_namespace |
(optional) use_namespace field |
Examples
## Not run:
path <- "test_config/config.yaml"
# Write run_metadata block
create_config(path = path,
description = "test",
input_namespace = "test_user",
output_namespace = "test_user")
# Write read block
add_write(path = path,
data_product = "test/array",
description = "data product description",
version = "0.2.0")
## End(Not run)
check_config
Description
check_config
Usage
check_config(handle, data_product, what)
Arguments
handle |
an object of class |
data_product |
data_product |
what |
what |
check_dataproduct_exists
Description
If a data product already exists with the same name, version, and namespace, throw an error
Usage
check_dataproduct_exists(
write_dataproduct,
write_version,
write_namespace_id,
endpoint
)
Arguments
write_dataproduct |
write_dataproduct |
write_version |
write_version |
write_namespace_id |
write_namespace_id |
endpoint |
endpoint |
check_datetime
Description
check_datetime
Usage
check_datetime(table, this_field, query_class, this_query)
Arguments
table |
a |
this_field |
a |
query_class |
a |
this_query |
a |
Check if entry exists in the data registry
Description
Check whether an entry already exists in a table (in the data registry)
Usage
check_exists(table, query)
Arguments
table |
a |
query |
a |
Value
Returns TRUE if the entry exists and FALSE if it
doesn't
check_field
Description
check_field
Usage
check_field(table, this_field, query_class, this_query, method, endpoint)
Arguments
table |
a |
this_field |
a |
query_class |
a |
this_query |
a |
method |
a |
endpoint |
endpoint |
check_fields
Description
check_fields
Usage
check_fields(table, query, method, endpoint)
Arguments
table |
a |
query |
a |
method |
a |
endpoint |
endpoint |
check_handle
Description
check_handle
Usage
check_handle(handle, data_product, what, component)
Arguments
handle |
an object of class |
data_product |
a |
what |
element in handle – one of c("inputs", "outputs") |
component |
a |
check_integer
Description
check_integer
Usage
check_integer(table, this_field, query_class, this_query)
Arguments
table |
a |
this_field |
a |
query_class |
a |
this_query |
a |
check_local_repo
Description
check_local_repo
Usage
check_local_repo(path)
Arguments
path |
Local repository file path |
Value
boolean, if local repository is clean (TRUE, else FALSE)
check_string
Description
check_string
Usage
check_string(table, this_field, this_query)
Arguments
table |
a |
this_field |
a |
this_query |
a |
Check if table exists
Description
Check if table exists in the data registry
Usage
check_table_exists(table)
Arguments
table |
a |
Value
Returns TRUE if a table exists, FALSE if it doesn't
check_yaml_write
Description
check_yaml_write
Usage
check_yaml_write(handle, data_product)
Arguments
handle |
|
data_product |
a |
Clean query
Description
Function to clean a query and return it without an api prefix
Usage
clean_query(data, endpoint)
Arguments
data |
a |
endpoint |
endpoint |
create_config
Description
Generates (user generated) config.yaml files for unit tests. Use
add_read() and add_write() functions to add read and write
blocks.
Usage
create_config(
path,
description,
input_namespace,
output_namespace,
write_data_store = file.path(tempdir(), "datastore", ""),
force = TRUE,
local_repo = "local_repo"
)
Arguments
path |
config file path |
description |
description field |
input_namespace |
input_namespace field |
output_namespace |
output_namespace field |
write_data_store |
write_data_store field |
force |
force |
local_repo |
local_repo |
create_index
Description
create_index
Usage
create_index(self)
Arguments
self |
self |
Create version number
Description
Creates a version number from either a date and a version
or a date and major and patch
or major minor patch.
If no parameters are supplied a default version is returned
0.1.0
This function prioritizes download date and version over all other parameters
Usage
create_version_number(
download_date = NULL,
version = NULL,
major = 0,
minor = "1",
patch = 0
)
Arguments
download_date |
(Optional) download_date
This can either be a date or datetime
but must include the full year
e.g from
|
version |
version number using major.minor.patch numbering
e.g. |
major |
major number if not using |
minor |
minor number if not using |
patch |
patch number if not using |
Value
returns a character vector in the format of major.minor.patch
e.g. 0.20200101.0
Download source file from database
Description
Download source file from database
Usage
download_from_database(
source_root,
source_path,
path,
filename,
overwrite = FALSE
)
Arguments
source_root |
a |
source_path |
a |
path |
a |
filename |
a |
overwrite |
a |
See Also
Other download functions:
download_from_url()
Download source file from URL
Description
This function will download a file from a url
Usage
download_from_url(source_root, source_path, path, filename)
Arguments
source_root |
a |
source_path |
a |
path |
a |
filename |
a |
See Also
Other download functions:
download_from_database()
extract_id
Description
extract_id
Usage
extract_id(url, endpoint)
Arguments
url |
url |
endpoint |
endpoint |
fair_init
Description
fair_init
Usage
fair_init(name, identifier, endpoint = "http://127.0.0.1:8000/api/")
Arguments
name |
a |
identifier |
(optional) a |
endpoint |
a |
fair_run
Description
fair_run
Usage
fair_run(
path = "config.yaml",
endpoint = "http://127.0.0.1:8000/api/",
skip = FALSE
)
Arguments
path |
string |
endpoint |
a |
skip |
don't bother checking whether the repo is clean |
fdp-class
Description
fdp-class
fdp-class
Details
Container for class fdp
Public fields
yamla
listcontaining the contents of the working config.yamlfdp_config_dira
stringspecifying the directory passed fromfair runmodel_configa
stringspecifying the URL of an entry in theobjecttable associated with thestorage_locationof the working config.yamlsubmission_scripta
stringspecifying the URL of an entry in theobjecttable associated with thestorage_locationof the submission scriptcode_repoa
stringspecifying the URL of an entry in theobjecttable associated with the GitHub repositorycode_runa
stringspecifying the URL of an entry in thecode_runtableinputsa
data.framecontaining metadata associated withcode_runinputsoutputsa
data.framecontaining metadata associated withcode_runoutputsissuesa
data.framecontaining metadata associated withcode_runissues
Methods
Public methods
Method new()
Create a new fdp object
Usage
fdp$new( yaml, fdp_config_dir, model_config, submission_script, code_repo, code_run )
Arguments
yamla
listcontaining the contents of the working config.yamlfdp_config_dira
stringspecifying the directory passed fromfair runmodel_configa
stringspecifying the URL of an entry in theobjecttable associated with thestorage_locationof the working config.yamlsubmission_scripta
stringspecifying the URL of an entry in theobjecttable associated with thestorage_locationof the submission scriptcode_repoa
stringspecifying the URL of an entry in theobjecttable associated with the GitHub repositorycode_runa
stringspecifying the URL of an entry in thecode_runtable
Returns
Returns a new fdp object
Method print()
Print method
Usage
fdp$print(...)
Arguments
...additional parameters, currently none are used
Method input()
Record code_run inputs in fdp object
Usage
fdp$input( data_product, use_data_product, use_component, use_version, use_namespace, path, component_url )
Arguments
data_producta
stringspecifying the name of the data product, used as a referenceuse_data_producta
stringspecifying the name of the data product, used as input in thecode_runuse_componenta
stringspecifying the name of the data product component, used as input in thecode_runuse_versiona
stringspecifying the data product version, used as input in thecode_runuse_namespacea
stringspecifying the namespace in which the data product resides, used as input in thecode_runpatha
stringspecifying the location of the data product in the local data storecomponent_urla
stringspecifying the URL of an entry in theobject_componenttable
Returns
Returns an updated fdp object
Method output()
Record code_run outputs in fdp object
Usage
fdp$output( data_product, use_data_product, use_component, use_version, use_namespace, path, data_product_description, component_description, public )
Arguments
data_producta
stringspecifying the name of the data product, used as a referenceuse_data_producta
stringspecifying the name of the data product, used as output in thecode_runuse_componenta
stringspecifying the name of the data product component, used as output in thecode_runuse_versiona
stringspecifying the version of the data product, used as output in thecode_runuse_namespacea
stringspecifying the namespace in which the data product resides, used as output in thecode_runpatha
stringspecifying the location of the data product in the local data storedata_product_descriptiona
stringcontaining a description of the data productcomponent_descriptiona
stringcontaining a description of the data product componentpublic
Returns
Returns an updated fdp object
Method output_index()
Return index of data product recorded in fdp object
so that an issue may be attached
Usage
fdp$output_index(data_product, component, version, namespace)
Arguments
data_producta
stringspecifying the name of the data product, used as output in thecode_runcomponenta
stringspecifying the name of the data product component, used as output in thecode_runversiona
stringspecifying the name of the data product version, used as output in thecode_runnamespacea
stringspecifying the namespace in which the data product resides, used as input in thecode_run
Returns
Returns an index used to identify the data product
Method raise_issue()
Record issue in fdp object
Usage
fdp$raise_issue( index, type, use_data_product, use_component, use_version, use_namespace, issue, severity )
Arguments
indexa
numericindex, used to identify each input and output in thefdpobjecttypea
stringspecifying the type of issue (one of "data", "config", "script", "repo")use_data_producta
stringspecifying the name of the data product, used as output in thecode_runuse_componenta
stringspecifying the name of the data product component, used as output in thecode_runuse_versiona
stringspecifying the name of the data product version, used as output in thecode_runuse_namespacea
stringspecifying the namespace in which the data product resides, used as input in thecode_runissuea
stringcontaining a free text description of theissueseverityan
integerspecifying the severity of theissue
Returns
Returns an updated fdp object
Method finalise_output_hash()
Record file hash and update path name in fdp object
Usage
fdp$finalise_output_hash( use_data_product, use_data_product_runid, use_version, use_namespace, hash, new_path, data_product_url, delete_if_duplicate = FALSE )
Arguments
use_data_producta
stringspecifying the name of the data product, used as output in thecode_runuse_data_product_runida
stringspecifying the name of the data product, the same asuse_data_productexcluding the RUN_ID variableuse_versiona
stringspecifying the name of the data product version, used as output in thecode_runuse_namespacea
stringspecifying the namespace in which the data product resides, used as input in thecode_runhasha
stringspecifying the hash of the filenew_patha
stringspecifying the updated location (filename is now the hash of the file) of the data product in the local data storedata_product_urla
stringspecifying the URL of anobjectassociated with thedata_productdelete_if_duplicate(optional) default is
FALSE
Returns
Returns an updated fdp object
Method finalise_output_url()
Record data_product and component URLs in fdp
object
Usage
fdp$finalise_output_url( use_data_product, use_component, use_version, use_namespace, component_url )
Arguments
use_data_producta
stringspecifying the name of the data product, used as output in thecode_runuse_componenta
stringspecifying the name of the data product component, used as output in thecode_runuse_versiona
stringspecifying the name of the data product version, used as output in thecode_runuse_namespacea
stringspecifying the namespace in which the data product resides, used as input in thecode_runcomponent_urla
stringspecifying the URL of an entry in theobject_componenttable
Returns
Returns an updated fdp object
Method clone()
The objects of this class are cloneable with this method.
Usage
fdp$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
fdp_resolve_read
Description
fdp_resolve_read
Usage
fdp_resolve_read(this_read, yaml)
Arguments
this_read |
this_read |
yaml |
user written config file |
fdp_resolve_write
Description
fdp_resolve_write
Usage
fdp_resolve_write(this_write, yaml)
Arguments
this_write |
this_write |
yaml |
user written config file |
Finalise code run
Description
Finalise Code Run and push associated metadata to the local registry.
Usage
finalise(handle, delete_if_empty = FALSE, delete_if_duplicate = FALSE)
Arguments
handle |
an object of class |
delete_if_empty |
(optional) default is |
delete_if_duplicate |
(optional) default is |
Details
If a Code Run does not read an input, write an output, or attach an issue,
then delete the Code Run entry when delete_if_empty is set to TRUE.
If a data product has the same hash as a previous version, remove it from
the registry when delete_if_duplicate is set to TRUE.
Find matching read aliases in config file
Description
Find read aliases in working config that match wildcard string
Usage
find_read_match(handle, data_product)
Arguments
handle |
an object of class |
data_product |
a |
Find matching write aliases in config file
Description
Find write aliases in working config that match wildcard string
Usage
find_write_match(handle, data_product)
Arguments
handle |
an object of class |
data_product |
a |
findme
Description
Returns metadata associated with the calculated hash of a target file. When multiple entries exist in the data registry all are returned.
Usage
findme(file, endpoint)
Arguments
file |
file path |
endpoint |
endpoint |
get_author_url
Description
get_author_url
Usage
get_author_url(endpoint)
Arguments
endpoint |
a |
Get H5 file components
Description
Returns the names of the items at the root of the file
Usage
get_components(filename)
Arguments
filename |
a |
Value
Returns the names of the items at the root of the file
See Also
Other get functions:
get_entry(),
get_existing(),
get_file_hash(),
get_github_hash()
get_dataproduct
Description
get_dataproduct
Usage
get_dataproduct(
data_product,
version,
namespace,
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
data_product |
data_product |
version |
version |
namespace |
namespace |
endpoint |
endpoint |
Get entity from url
Description
Get entity from url
Usage
get_entity(url)
Arguments
url |
a |
Return all fields associated with a table entry in the data registry
Description
Return all fields associated with a table entry in the data registry
Usage
get_entry(table, query, endpoint = "http://127.0.0.1:8000/api/")
Arguments
table |
a |
query |
a |
endpoint |
a |
Value
Returns a list of fields present in the specified entry
See Also
Other get functions:
get_components(),
get_existing(),
get_file_hash(),
get_github_hash()
Return all entries posted to a table in the data registry
Description
Get entries (from the data registry) in a particular table
Usage
get_existing(
table,
limit_results = TRUE,
detail = "all",
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
table |
a |
limit_results |
a |
detail |
a |
endpoint |
a |
Value
Returns a data.frame of entries in table, default is limited
to 100 entries
See Also
Other get functions:
get_components(),
get_entry(),
get_file_hash(),
get_github_hash()
Get fields from table
Description
Use API endpoint to produce a list of fields for a table. Requires API key.
Usage
get_fields(table, endpoint = "http://127.0.0.1:8000/api/")
Arguments
table |
a |
endpoint |
a |
Value
Returns a data.frame of fields and their attributes set to
"none"
Calculate hash from file
Description
Returns the SHA1 hash of a given file
Usage
get_file_hash(filename)
Arguments
filename |
a |
See Also
Other get functions:
get_components(),
get_entry(),
get_existing(),
get_github_hash()
Get current GitHub hash
Description
Get the hash of the latest commit in the master branch of a particular repository. This function assumes git is installed and located in the System PATH.
Usage
get_github_hash(repo)
Arguments
repo |
a |
See Also
Other get functions:
get_components(),
get_entry(),
get_existing(),
get_file_hash()
Get ID
Description
Retrieve IDs for particular entries or all entries in a table
Usage
get_id(table, query = list(), endpoint = "http://127.0.0.1:8000/api/")
Arguments
table |
a |
query |
a |
endpoint |
a |
Value
Returns a string or list of strings specifying the URL or URLs of entries in a table
get_index
Description
get_index
Usage
get_index(write, data_product)
Arguments
write |
write |
data_product |
data_product |
get_max_version
Description
If entry doesn't exist in the registry, return version 0.0.0
Usage
get_max_version(data_product, namespace_id)
Arguments
data_product |
data_product |
namespace_id |
namespace_id |
Get storage location from url
Description
Get storage location entry
Usage
get_storage_location(location)
Arguments
location |
the url of an entry in the storage_location table |
Value
Returns a list of fields associated with the specified entry
Get optional fields
Description
Get optional fields
Usage
get_table_optional(table, endpoint)
Arguments
table |
a |
endpoint |
a |
Value
Returns a data.frame of optional fields and their properties
Get queryable fields
Description
Get queryable fields
Usage
get_table_queryable(table, endpoint)
Arguments
table |
a |
endpoint |
a |
Value
Returns a character vector of queryable fields
Get readable fields
Description
Get readable fields
Usage
get_table_readable(table, endpoint)
Arguments
table |
name of table |
endpoint |
a |
Value
a dataframe of readable fields and their properties
Get required fields
Description
Get required fields
Usage
get_table_required(table)
Arguments
table |
name of table |
Value
a dataframe of required fields and their properties
Get writable fields
Description
Get writable fields
Usage
get_table_writable(table, endpoint)
Arguments
table |
a |
endpoint |
a |
Value
Returns a character vector of writable fields
Get tables from registry
Description
Use api endpoint to produce a list of tables
Usage
get_tables(endpoint = "http://127.0.0.1:8000/api/")
Arguments
endpoint |
a |
Value
a character vector of tables
get_token
Description
get_token
Usage
get_token()
Get URL
Description
Retrieve URLs for particular entries or all entries in a table
Usage
get_url(table, query = list(), endpoint = "http://127.0.0.1:8000/api/")
Arguments
table |
a |
query |
a |
endpoint |
a |
Value
Returns a string or list of strings specifying the URL or URLs of entries in a table
List files in GitHub repository
Description
List files in GitHub repository
Usage
github_files(repo)
Arguments
repo |
a |
increment_filename
Description
Searches directory for duplicate files and increments filename.
Usage
increment_filename(path)
Arguments
path |
path |
Initialise code run
Description
Reads in a working config file, generates new Code Run entry, and returns a handle containing various metadata.
Usage
initialise(config, script)
Arguments
config |
a |
script |
a |
Value
Returns an object of class fdp, R6 containing metadata
required by the Data Pipeline API
Check whether fields are queryable
Description
Check whether fields are queryable
Usage
is_queryable(table, query, method, endpoint)
Arguments
table |
a |
query |
a |
method |
a |
endpoint |
endpoint |
Value
Returns TRUE if the entry is queryable and FALSE if it
isn't
Link path to external format data
Description
Link path to external format data
Usage
link_read(handle, data_product)
Arguments
handle |
an object of class |
data_product |
a |
Value
Returns a string specifying the location of the data product
to be read
Link path for external format data
Description
Link path for external format data
Usage
link_write(handle, data_product)
Arguments
handle |
an object of class |
data_product |
a |
Value
Returns a string specifying the location in which the data
product should be written
Post entry to author table
Description
Upload information to the author table in the data registry
Usage
new_author(name, identifier, endpoint = "http://127.0.0.1:8000/api/")
Arguments
name |
a |
identifier |
(optional) a |
endpoint |
a |
See Also
Other new functions:
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to code_repo_release table
Description
Upload information to the code_repo_release table in the data registry
Usage
new_code_repo_release(
name,
version,
object_url,
website,
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
name |
a |
version |
a |
object_url |
a |
website |
(optional) a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to code_run table
Description
Upload information to the code_run table in the data registry
Usage
new_code_run(
run_date,
description,
code_repo_url,
model_config_url,
submission_script_url,
inputs_urls = list(),
outputs_urls = list(),
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
run_date |
the date-time of the |
description |
(optional) a |
code_repo_url |
(optional) a |
model_config_url |
(optional) a |
submission_script_url |
(optional) a |
inputs_urls |
a |
outputs_urls |
a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to data_product table
Description
Upload information to the data_product table in the data registry
Usage
new_data_product(
name,
version,
object_url,
namespace_url,
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
name |
a |
version |
a |
object_url |
a |
namespace_url |
a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to external_object table
Description
Upload information to the external_object table in the data registry
Usage
new_external_object(
doi_or_unique_name,
primary_not_supplement = TRUE,
release_date,
title,
description,
data_product_url,
original_store_url,
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
doi_or_unique_name |
a |
primary_not_supplement |
(optional) a boolean flag to indicate
whether the external object is the primary source ( |
release_date |
the date-time that the |
title |
a |
description |
(optional) a |
data_product_url |
a |
original_store_url |
(optional) a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to file_type table
Description
Upload information to the file_type table in the data registry
Usage
new_file_type(name, extension, endpoint = "http://127.0.0.1:8000/api/")
Arguments
name |
a |
extension |
a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to issue table
Description
Upload information to the issue table in the data registry
Usage
new_issue(
severity,
description,
component_issues,
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
severity |
an |
description |
a |
component_issues |
a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to keyword table
Description
Upload information to the keyword table in the data registry
Usage
new_keyword(
object_url,
keyphrase,
identifier,
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
object_url |
a |
keyphrase |
a |
identifier |
(optional) a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to licence table
Description
Upload information to the licence table in the data registry
Usage
new_licence(object_url, licence_info, endpoint = "http://127.0.0.1:8000/api/")
Arguments
object_url |
a |
licence_info |
a free text |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to namespace table
Description
Upload information to the namespace table in the data registry
Usage
new_namespace(
name,
full_name,
website,
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
name |
a |
full_name |
(optional) a |
website |
(optional) a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to object table
Description
Upload information to the object table in the data registry
Usage
new_object(
description,
storage_location_url,
authors_url,
file_type_url,
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
description |
(optional) a |
storage_location_url |
(optional) a |
authors_url |
(optional) a |
file_type_url |
(optional) a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to object_component table
Description
Upload information to the object_component table in the data registry
Usage
new_object_component(
object_url,
name,
description,
whole_object = FALSE,
issues_urls,
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
object_url |
a |
name |
a |
description |
(optional) a |
whole_object |
a |
issues_urls |
(optional) a |
endpoint |
a Note that the |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_quality_controlled(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to quality_controlled table
Description
Upload information to the quality_controlled table in the data
registry
Usage
new_quality_controlled(object_url, endpoint = "http://127.0.0.1:8000/api/")
Arguments
object_url |
a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_storage_location(),
new_storage_root(),
new_user_author()
Post entry to storage_location table
Description
Upload information to the storage_location table in the data registry
Usage
new_storage_location(
path,
hash,
public,
storage_root_url,
endpoint = "http://127.0.0.1:8000/api/"
)
Arguments
path |
a |
hash |
a |
public |
a |
storage_root_url |
a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_root(),
new_user_author()
Post entry to storage_root table
Description
Upload information to the storage_root table in the data registry
Usage
new_storage_root(root, local, endpoint = "http://127.0.0.1:8000/api/")
Arguments
root |
a |
local |
(optional) a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_user_author()
Post entry to user_author table
Description
Upload information to the user_author table in the data registry
Usage
new_user_author(user_url, author_url, endpoint = "http://127.0.0.1:8000/api/")
Arguments
user_url |
a |
author_url |
a |
endpoint |
a |
See Also
Other new functions:
new_author(),
new_code_repo_release(),
new_code_run(),
new_data_product(),
new_external_object(),
new_file_type(),
new_issue(),
new_keyword(),
new_licence(),
new_namespace(),
new_object(),
new_object_component(),
new_quality_controlled(),
new_storage_location(),
new_storage_root()
Check whether paper exists
Description
Check whether paper is in the data registry
Usage
paper_exists(doi)
Arguments
doi |
doi |
Patch entry in data registry
Description
Patch entry in data registry
Usage
patch_data(url, data)
Arguments
url |
url |
data |
data |
Post entry to data registry
Description
Post data to registry
Usage
post_data(table, data, endpoint)
Arguments
table |
table name as a character |
data |
data as a named list |
endpoint |
a |
raise_issue
Description
raise_issue
Usage
raise_issue(
index,
handle,
component = NA,
data_product,
issue,
severity,
whole_object = FALSE
)
Arguments
index |
index returned from |
handle |
an object of class |
component |
a |
data_product |
a |
issue |
a |
severity |
a |
whole_object |
a |
Raise issue with config file
Description
Raise issue with config file
Usage
raise_issue_config(handle, issue, severity)
Arguments
handle |
an object of class |
issue |
a |
severity |
a |
Raise issue with remote repository
Description
Raise issue with remote repository
Usage
raise_issue_repo(handle, issue, severity)
Arguments
handle |
an object of class |
issue |
a |
severity |
a |
Raise issue with submission script
Description
Raise issue with submission script
Usage
raise_issue_script(handle, issue, severity)
Arguments
handle |
an object of class |
issue |
a |
severity |
a |
random_hash
Description
Generates a random hash
Usage
random_hash()
Read array component from HDF5 file
Description
Function to read array type data from hdf5 file.
Usage
read_array(handle, data_product, component)
Arguments
handle |
an object of class |
data_product |
a |
component |
a |
Value
Returns an array with attached Dimension_i_title,
Dimension_i_units, Dimension_i_values, and units
attributes, if available
Read distribution component from TOML file
Description
Function to read distribution type data from toml file.
Usage
read_distribution(handle, data_product, component)
Arguments
handle |
an object of class |
data_product |
a |
component |
a |
Read estimate component from TOML file
Description
Function to read point-estimate type data from toml file.
Usage
read_estimate(handle, data_product, component)
Arguments
handle |
an object of class |
data_product |
a |
component |
a |
Read table component from HDF5 file
Description
Function to read table type data from hdf5 file.
Usage
read_table(handle, data_product, component)
Arguments
handle |
an object of class |
data_product |
a |
component |
a |
Value
Returns a data.frame with attached column_units
attributes, if available
register_issue_dataproduct
Description
register_issue_dataproduct
Usage
register_issue_dataproduct(handle, this_issue)
Arguments
handle |
an object of class |
this_issue |
this_issue |
register_issue_script
Description
register_issue_script
Usage
register_issue_script(handle, this_issue, type)
Arguments
handle |
an object of class |
this_issue |
this_issue |
type |
type |
remove_empty_parents
Description
remove_empty_parents
Usage
remove_empty_parents(path, root)
Arguments
path |
path |
root |
root |
resolve_read
Description
resolve_read
Usage
resolve_read(handle, data_product, component = NA)
Arguments
handle |
an object of class |
data_product |
a |
component |
a |
resolve_version
Description
resolve_version
Usage
resolve_version(version, data_product, namespace_id)
Arguments
version |
version number |
data_product |
data_product |
namespace_id |
namespace_id |
resolve_data_product
Description
resolve_data_product
Usage
resolve_write(handle, data_product, file_type)
Arguments
handle |
an object of class |
data_product |
a |
file_type |
(optional) a |
Validate fields
Description
Function to validate fields in post data
Usage
validate_fields(table, data, endpoint)
Arguments
table |
table name as character |
data |
data as a named list |
endpoint |
endpoint |
Value
Returns
Write array component to HDF5 file
Description
Function to populate hdf5 file with array type data.
Usage
write_array(
array,
handle,
data_product,
component,
description,
dimension_names,
dimension_values,
dimension_units,
units
)
Arguments
array |
an |
handle |
an object of class |
data_product |
a |
component |
a |
description |
a |
dimension_names |
a |
dimension_values |
(optional) a |
dimension_units |
(optional) a |
units |
(optional) a |
Value
Returns a handle index associated with the just written component, which can be used to raise an issue if necessary
See Also
Other write functions:
write_distribution(),
write_estimate(),
write_table()
Write distribution component to TOML file
Description
Write distribution component to TOML file
Usage
write_distribution(
distribution,
parameters,
handle,
data_product,
component,
description
)
Arguments
distribution |
a |
parameters |
a |
handle |
an object of class |
data_product |
a |
component |
a |
description |
a |
Value
Returns a handle index associated with the just written component, which can be used to raise an issue if necessary
See Also
Other write functions:
write_array(),
write_estimate(),
write_table()
Write estimate component to TOML file
Description
Function to populate toml file with point-estimate type data. If a file already exists at the specified location, an additional component will be added.
Usage
write_estimate(value, handle, data_product, component, description)
Arguments
value |
an object of class |
handle |
an object of class |
data_product |
a |
component |
a |
description |
a |
Value
Returns a handle index associated with the just written component, which can be used to raise an issue if necessary
See Also
Other write functions:
write_array(),
write_distribution(),
write_table()
Write table component to HDF5 file
Description
Function to populate hdf5 file with array type data.
Usage
write_table(
df,
handle,
data_product,
component,
description,
row_names,
column_units
)
Arguments
df |
an |
handle |
an object of class |
data_product |
a |
component |
a |
description |
a |
row_names |
(optional) a |
column_units |
(optional) a |
Value
Returns a handle index associated with the just written component, which can be used to raise an issue if necessary
See Also
Other write functions:
write_array(),
write_distribution(),
write_estimate()