rohub main module
- rohub.add_custom_license(identifier, title, status, license_url, description=None)
Function that adds a new custom license.
See also
- Parameters
identifier (str) – license’s identifier
title (str) – license’s title
status (str) – license’s status
license_url (str) – license’s url
description (str) – license’s description, optional
- Returns
response content from the API
- Return type
dict
- rohub.annotation_delete(annotation_identifier)
Function that deletes an annotation associated with specific research object.
- Parameters
annotation_identifier (str) – annotation’s identifier
- Returns
None
- Return type
None
- rohub.create_community(name, description=None, email=None, community_url=None)
Function for creating a new community.
See also
- Parameters
name – name of the community
description – description, optional
email – community’s email, optional
community_url (str) – associated url, optional
- Type
name: str
- Type
description: str
- Type
email: str
- Returns
response content from the API
- Return type
dict
- rohub.external_user_add(display_name, email=None, orcid_id=None, affiliation=None)
Function that creates an external user.
Note
Either email or orcid_id has to be provided in order to create new external user!
- Parameters
display_name (str) – displayed name for the user
email (str) – user’s email address, optional
orcid_id (str) – user’s orcid_id, optional
affiliation (str) – user’s affiliation, optional
- Returns
internal identifier for the newly created user
- Return type
str
- rohub.external_user_delete(user_id)
Function that deletes an external user.
- Parameters
user_id (str) – user’s id
- Returns
response content from the API
- Return type
dict
- rohub.folder_delete(folder_identifier)
Function that deletes a folder associated with specific research object.
- Parameters
folder_identifier (str) – folder’s identifier
- Returns
None
- Return type
None
- rohub.is_job_success(job_id)
Function that checks the status of the job and validate if job succeed or not.
- Parameters
job_id (str) – job’s identifier
- Returns
response
- Return type
dict
- rohub.list_available_licenses()
Function that lists all available options for the license identifier.
- Returns
all available license identifiers
- Return type
list
- rohub.list_communities()
Function that lists all existing communities.
- Returns
existing communities
- Return type
list
- rohub.list_custom_licenses()
Function that lists existing custom licenses.
- Returns
existing custom licenses
- Return type
list
- rohub.list_my_ros()
Function that lists research objects that belongs to the current user.
- Returns
table with listed research objects
- Return type
Panda’s DataFrame
- rohub.list_triple_object_classes()
Function that lists all valid triple object classes.
- Returns
valid triple object classes
- Return type
list
- rohub.list_valid_access_modes()
Function for listing all valid access modes.
- Returns
valid access modes
- Return type
list
- rohub.list_valid_creation_modes()
Function that lists all valid creation modes.
- Returns
valid creation modes
- Return type
list
- rohub.list_valid_license_status()
Function that lists all valid statuses for the custom license.
- Returns
valid license statuses
- Return type
list
- rohub.list_valid_publication_services()
Function that lists all valid publication services.
- Returns
valid publication services
- Return type
list
- rohub.list_valid_research_areas()
Function that lists all valid research areas.
- Returns
valid research areas
- Return type
list
- rohub.list_valid_resource_types()
Function for lists all valid resource types.
- Returns
valid resource types
- Return type
list
- rohub.list_valid_ros_types()
Function that lists all valid ros types.
- Returns
valid ros types
- Return type
list
- rohub.list_valid_templates()
Function that lists all valid templates.
- Returns
valid templates
- Return type
list
- rohub.login(username=None, password=None, client_id=None, client_secret=None)
- Function that handles access token generation and results in saving token information throughout the session.There are two ways of authenticating:1) User authentication (username and password required)2) Client authentication (client_id and client_secret required)
- Parameters
username (str) – username for user authentication, optional
password (str) – password for user authentication, optional
client_id (str) – client id for client authentication, optional
client_secret (str) – client secret for client authentication, optional
- Returns
None
- Return type
None
- rohub.organization_add(display_name, email=None, organization_url=None, ror_identifier=None)
Function that creates a new organization.
Note
Either email or ror_identifier has to be provided in order to create new organization!
- Parameters
display_name (str) – displayed name for the organization
email (str) – organization’s email address, optional
organization_url (str) – organization’s url, optional
ror_identifier (str) – organization’s ror identifier, optional
- Returns
internal identifier for the newly created organization
- Return type
str
- rohub.organizations_find(search=None)
Function that finds organization against the provided query.
Warning
if no query provided then all organizations will be retrieved!
- Parameters
search (str) – query, optional
- Returns
table containing selected information about organizations
- Return type
Panda’s DataFrame
- rohub.resource_add_keywords(identifier, keywords)
Function that adds set of keywords to the specific resource.
- Parameters
identifier (str) – resource identifier
keywords (list) – list of keywords
- Returns
response content from the API
- Return type
dict
- rohub.resource_assign_doi(identifier, external_doi=None)
Function that assigns doi to a specific resource.
Note
If external_doi value was provided it will be used as doi, otherwise the system will automatically generate and assign doi!
- Parameters
identifier (str) – resource’s identifier
external_doi (str) – value for the external, existing doi, optional
- Returns
doi
- Return type
str
- rohub.resource_delete(identifier)
Function that deletes a resource associated with a specific research object.
- Parameters
identifier (str) – resource’s identifier
- Returns
None
- Return type
None
- rohub.resource_delete_keywords(identifier)
Function that deletes all keywords associated with specific resource.
- Parameters
identifier (str) – resource identifier
- Returns
None
- Return type
None
- rohub.resource_delete_license(identifier)
Function that deletes association between license and specific resource.
- Parameters
identifier (str) – research object’s identifier
- Returns
None
- Return type
None
- rohub.resource_download(identifier, resource_filename=None, path=None, redirect=False)
Function that acquires a specific resource into local file storage.
- Parameters
identifier (str) – resource’s identifier
resource_filename (str) – resource’s full filename (with extension), required when redirect is False
path (str) – path where file should be downloaded, optional - current working dir is the default!
redirect – if True the direct EGI link will be generated and passed instead of downloading the resource (works only with Jupyter Notebook, Data Cube Collection and Data Cube Product types of resource)
- Returns
full path to the acquired resource
- Return type
str
- rohub.resource_find(source=None, search=None)
Function that finds a specific resource against the provided query.
- Parameters
source – source of the resource, can be either external or internal or empty to search in both sources, optional
search – phrase to search against, optional
- Type
source: str
- Type
str
- Returns
table containing selected information about the research object/objects
- Return type
Panda’s DataFrame
- rohub.resource_list_keywords(identifier)
Function that shows list of keywords for specific Resource
- Parameters
identifier (str) – resource identifier
- Returns
response containing keywords details
- Return type
dict
- rohub.resource_list_license(identifier)
Function that lists license associated with certain research object.
- Parameters
identifier (str) – resource identifier.
- Returns
response containing license details
- Return type
dict
- rohub.resource_load(identifier)
Function that loads an existing resource.
- Parameters
identifier (str) – resource’s identifier
- Returns
loaded resource
- Return type
- rohub.resource_search_using_id(identifier)
Function that displays details acquired from the API for the specific resource.
- Parameters
identifier (str) – resource’s identifier
- Returns
response content from the API
- Return type
dict
- rohub.resource_set_keywords(identifier, keywords)
Function that sets list of keywords for the specific resource.
- Parameters
identifier (str) – research object’s identifier
keywords (list) – list of keywords
- Returns
response content from the API
- Return type
dict
- rohub.resource_set_license(res_id, license_id)
Function that sets license information associated with specific research object.
- Parameters
res_id (str) – resource identifier
license_id (str) – license’s identifier
- Returns
response content from the API
- Return type
dict
- rohub.resource_update_content(identifier, input_url=None, file_path=None)
Function that updates content of specific resource.
Note
input_url is required for updating external resource, and file_path is in case of internal one. At least one of them has to be provided!
Warning
The resource content will be overwritten!
- Parameters
identifier (str) – resource’s identifier
input_url (str) – url to the external resource, optional
file_path (str) – path to the internal resource, optional
- Returns
response content from the API
- Return type
dict
- rohub.resource_update_metadata(identifier, ro_id=None, res_type=None, title=None, folder=None, description=None)
Function that updates metadata for a specific resource.
See also
Note
to move back a resource to the “Home” directory set folder = “/”
- Parameters
identifier (str) – resource’s identifier
ro_id (str) – research object’s identifier, required only if folder was provided!
res_type (str) – resource’s type, optional
title (str) – resource’s title, optional
folder (str) – folder’s path, optional
description (str) – resource’s description, optional
- Returns
response content from the API
- Return type
dict
- rohub.ros_add_annotations(identifier, resources=None, body_specification_json=None)
Function that adds annotations to the specific research object.
- Parameters
identifier (str) – research object’s identifier
resources (list) – resources identifier to which annotations will be applied, optional
body_specification_json (str/dict/list) – path to the JSON file or Python serializable object (dict, list), optional
- Returns
response content from the API
- Return type
dict
- rohub.ros_add_community(identifier, community_identifier)
Function that adds community to the specific research object.
See also
- Parameters
identifier (str) – research object’s identifier
community_identifier (str) – community identifier
- Returns
response content from the API
- Return type
dict
- rohub.ros_add_external_resource(identifier, res_type, input_url, title=None, folder=None, description=None)
Function that adds external resource to the specific research object.
See also
Note
The newly created resource object will return a Python object that has its own set of methods and attributes. You may want to assign it to a variable to make it easy to work with. For example:
my_res = ros_add_external_resource(**your set of params)
- Parameters
identifier (str) – research object’s identifier
res_type (str) – type of resource
input_url (str) – resource’s url
title (str) – resource’s title, optional
folder (str) – folder’s path, optional
description (str) – resource’s description
- Returns
newly created resource object
- Return type
- rohub.ros_add_folders(identifier, name, description=None, parent_folder=None)
Function that adds folders to the specific research object.
- Parameters
identifier (str) – research’s object identifier
name (str) – folder’s name
description (str) – folder’s description, optional
parent_folder (str) – parent folder path, optional
- Returns
response content from the API
- Return type
dict
- rohub.ros_add_funding(identifier, grant_identifier, grant_name, funder_name, grant_title=None, funder_doi=None)
Function that adds funding information to a specific research object.
Note
two auxiliary functions can be used to get some examples for funders and grants from the Zenodo database, respectively:
zenodo_list_funders()
zenodo_list_grants()
check documentation of the above to get usage details- Parameters
identifier (str) – research object’s identifier
grant_identifier (str) – grant’s identifier
grant_name (str) – grant’s name
funder_name (str) – funder’s name
grant_title (str) – grant’s title, optional
funder_doi (str) – funder’s doi, optional
- Returns
service identifier for the newly created funding
- Return type
str
- rohub.ros_add_geolocation(identifier, body_specification_json)
Function that adds geolocation to a specific research object.
- Parameters
identifier (str) – research object’s id
body_specification_json (str/dict/list) – path to the JSON file or Python serializable object (dict, list)
- Returns
response content from the API
- Return type
dict
- rohub.ros_add_internal_resource(identifier, res_type, file_path, title=None, folder=None, description=None)
Function that adds internal resource to the specific research object.
See also
Note
The newly created resource object will return a Python object that has its own set of methods and attributes. You may want to assign it to a variable to make it easy to work with. For example:
my_res = ros_add_internal_resource(**your set of params)
- Parameters
identifier (str) – research object’s identifier
res_type (str) – type of resource
file_path (str) – resource’s file path
title (str) – resource’s title, optional
folder (str) – folder’s path, optional
description (str) – resource’s description
- Returns
newly created resource object
- Return type
- rohub.ros_add_keywords(identifier, keywords)
Function that adds set of keywords to the specific research object.
- Parameters
identifier (str) – research object’s identifier
keywords (list) – list of keywords
- Returns
response content from the API
- Return type
dict
- rohub.ros_add_main_entity(identifier, main_entity)
Function that associates main entity with specific Research Object.
See also
- Parameters
identifier (str) – research object’s identifier
main_entity – main entity
- Type
main_entity: str
- Returns
response content from the API
- Return type
dict
- rohub.ros_add_sketch(identifier, path_to_sketch_file)
Function that adds sketch to a specific Research Object.
- Parameters
identifier (str) – research object’s identifier
path_to_sketch_file – path to the existing file that will be uploaded as sketch
- Type
path_to_sketch_file: str
- Returns
response content from the API
- Return type
dict
- rohub.ros_add_triple(the_subject, the_predicate, the_object, annotation_id, object_class=None)
Function that adds triple to the specific annotation.
See also
- Parameters
the_subject (str) – triple’s subject
the_predicate (str) – triple’s predicate
the_object (str) – triple’s object
annotation_id (str) – annotation’s identifier
object_class (str) – object’s class, optional
- Returns
response content from the API
- Return type
dict
- rohub.ros_aggregate_datacube(identifier, dataset_id, product_id=None, product_media_type=None)
Function that aggregates datacube from adam platform to specific research object.
- Parameters
identifier – research object’s identifier
dataset_id (str) – dataset identifier
product_id (str) – product identifier, optional
product_media_type – media type, has to be one of: image/tiff, image/png or application/xml, optional
- Type
identifier: str
- Returns
response from api
- Return type
dict
- rohub.ros_archive(identifier, title=None, description=None, create_doi=None, external_doi=None, publication_services=None)
Function that creates research object’s archive.
See also
Note
if one chooses to use doi it can be provided in two ways: 1) through setting create_doi to True, then doi will be generated for you 2) through passing your doi using external_doi parameter create_doi = True and external_doi are mutually exclusive, therefore they can’t be used simultaneously!
Note
if on chooses to use publications services the result will be loaded as an RO-crate!
Warning
user needs to make sure that he has service credentials associated with his profile for the publication services that he would like to use! If that is not the case, warning will be shown and the ros will not be published as intended!
- Parameters
identifier (str) – research object’s identifier
title (str) – archive title, optional
description (str) – archive description, optional
create_doi (bool) – doi is created if True, False otherwise, optional, False is the default
external_doi (str) – existing doi value that will be associated with the snapshot, optional
publication_services (list) – services where the archive should be published into
- Returns
archive identifier
- Return type
str
- rohub.ros_completeness(identifier, verbose=False)
Function that shows completeness score and details for a specific research object.
- Parameters
identifier (str) – research object’s identifier
verbose (bool) – if True full details will be displayed, otherwise only score with basic metadata, optional.
- Returns
completeness information
- Return type
dict
- rohub.ros_content(identifier)
Function that retrieves research object’s content based on its identifier.
- Parameters
identifier (str) – research object’s identifier
- Returns
response containing details for research object’s content
- Return type
dict
- rohub.ros_create(title, research_areas, description=None, access_mode=None, ros_type=None, use_template=False, owner=None, editors=None, readers=None, creation_mode=None)
Function that creates new Research Object in the API and instantiates a Python object that can be reused.
See also
Note
The newly created research object will return a Python object that has its own set of methods and attributes. You may want to assign it to a variable to make it easy to work with. For example:
my_ros = ros_create(**your set of params)
- Parameters
title (str) – title of your research object
research_areas (list) – research areas associated with your research object
description (str) – description of your research object, optional
access_mode (str) – research object’s access mode, optional
ros_type (str) – research object’s type, optional
use_template (bool) – if True appropriate template for ro type will be used, optional
owner (str) – research object’s owner, optional
editors (list) – research object’s editors, optional
readers (list) – research object’s readers, optional
creation_mode (str) – research object’s creation mode, optional
- Returns
newly created research object
- Return type
- rohub.ros_delete(identifier)
Function that deletes a specific research object.
- Parameters
identifier (str) – research object’s identifier
- Returns
response content from the API
- Return type
dict
- rohub.ros_delete_communities(identifier)
Function that deletes association between community/communities and research object.
- Parameters
identifier (str) – research object’s identifier
- Returns
None
- Return type
None
- rohub.ros_delete_funding(identifier, funding_identifier)
Function that deletes specific funding associated with specific research object.
See also
- Parameters
identifier (str) – research object’s identifier
funding_identifier (str) – funding’s identifier
- Returns
None
- Return type
None
- rohub.ros_delete_keywords(identifier)
Function that deletes all keywords associated with specific research object.
- Parameters
identifier (str) – research object’s identifier
- Returns
None
- Return type
None
- rohub.ros_delete_license(identifier)
Function that deletes association between license and specific research object.
- Parameters
identifier (str) – research object’s identifier
- Returns
None
- Return type
None
- rohub.ros_delete_main_entity(identifier)
Function that deletes main entity association for a specific Research Object.
- Parameters
identifier (str) – research object’s identifier
- Returns
None
- Return type
None
- rohub.ros_enrich(identifier)
Functions for applying enrichment to the specific research object.
Warning
The enrichment process can take a while. We recommend waiting a few minutes and then checking a job status manually by running a prompted command.
- Parameters
identifier (str) – research object’s identifier
- Returns
API response
- Return type
dict
- rohub.ros_export_to_rocrate(identifier, filename=None, path=None, use_format='jsonld')
Function for downloading research object’s metadata as RO-crate.
- Parameters
identifier (str) – research object’s identifier
filename (str) – plain filename without extension, optional - if not provided username will be used instead
path (str) – folder path to where file should be downloaded, optional - default is current working directory
use_format (str) – format choice for acquired data - either jsonld or zip
- Returns
None
- Return type
None
- rohub.ros_find(search=None)
Function that finds a specific research object against provided query.
- Parameters
search (str) – phrase to search against, optional
- Returns
table containing selected information about the research object/objects
- Return type
Panda’s DataFrame
- rohub.ros_fork(identifier, title=None, description=None)
Function that creates research object’s fork.
- Parameters
identifier (str) – research object’s identifier
title (str) – fork title, optional
description (str) – fork description, optional
- Returns
fork identifier
- Return type
str
- rohub.ros_full_metadata(identifier)
Function that retrieves research object’s full metadata based on identifier.
- Parameters
identifier (str) – research object’s identifier
- Returns
response containing details for research object’s content
- Return type
dict
- rohub.ros_list_annotations(identifier)
Function that lists all annotations associated with specific research object.
- Parameters
identifier (str) – research object’s identifier.
- Returns
set of selected information regarding each annotation
- Return type
list
- rohub.ros_list_authors(identifier)
Function that lists authors associated with certain research object.
- Parameters
identifier (str) – research object’s identifier.
- Returns
response containing authors details
- Return type
dict
- rohub.ros_list_communities(identifier)
Function that shows list of communities for specific Research Object.
- Parameters
identifier (str) – research object’s identifier
- Returns
list containing keywords details
- Return type
list
- rohub.ros_list_contributors(identifier)
Function that lists contributors associated with certain research object.
- Parameters
identifier (str) – research object’s identifier.
- Returns
response containing contributors details
- Return type
dict
- rohub.ros_list_copyright(identifier)
Function that lists copyrights associated with certain research object.
- Parameters
identifier (str) – research object’s identifier.
- Returns
response containing copyright details
- Return type
dict
- rohub.ros_list_folders(identifier)
Function that lists folders associated with specific research object.
- Parameters
identifier (str) – research object’s identifier.
- Returns
table containing selected information about all associated folders
- Return type
Panda’s DataFrame
- rohub.ros_list_fundings(identifier)
Function that lists fundings associated with certain research object.
- Parameters
identifier (str) – research object’s identifier.
- Returns
table containing selected information about funding
- Return type
Panda’s DataFrame
- rohub.ros_list_keywords(identifier)
Function that shows list of keywords for specific Research Object.
- Parameters
identifier (str) – research object’s identifier
- Returns
response containing keywords details
- Return type
dict
- rohub.ros_list_main_entity(identifier)
Function that shows what is the main entity of a specific Research Object.
- Parameters
identifier (str) – research object’s identifier
- Returns
response containing main entity details
- Return type
dict
- rohub.ros_list_publications(identifier)
Function that lists publication details related to specific research object.
- Parameters
identifier (str) – research object’s identifier.
- Returns
set of selected information regarding each publication
- Return type
list
- rohub.ros_list_resources(identifier)
Function that lists resources associated with specific research object.
- Parameters
identifier (str) – research object’s identifier.
- Returns
table containing selected information about all associated resources
- Return type
Panda’s DataFrame
- rohub.ros_list_sketch(identifier)
Function that list details about sketch associated with specific Research Object.
- Parameters
identifier (str) – research object’s identifier
- Returns
response containing main entity details
- Return type
dict
- rohub.ros_list_triples(identifier)
Function that lists all triples related to a specific annotation.
- Parameters
identifier (str) – annotation’s identifier
- Returns
set of selected information regarding each triple
- Return type
list
- rohub.ros_load(identifier)
Function that loads an existing research object.
- Parameters
identifier (str) – research object’s identifier
- Returns
loaded research object
- Return type
- rohub.ros_make_golden(identifier)
Function that makes a specific research object golden.
Warning
Research object’s completeness has to be 100% to make and keep it golden!
See also
- Parameters
identifier (str) – research object’s identifier
- Returns
response containing keywords details
- Return type
dict
- rohub.ros_search_using_id(identifier)
Function that finds research object based on its identifier.
- Parameters
identifier (str) – research object identifier
- Returns
response containing details for the research object
- Return type
dict
- rohub.ros_set_authors(identifier, agents)
Function that sets authors to a specific research object.
Note
The order in which agents are provided as input is preserved in the API!
See also
The template for providing data for non-existing users is as follows: {“agent_type”: “user”, “display_name”: “example_display_name”, “email”:”example_email”, “orcid_id”:”example_orcid_id”, “affiliation”: “example_affiliation”}
- Parameters
identifier (str) – research object’s identifier
agents (list) – usernames representing authors, if one doesn’t exist it will be automatically created
- Returns
response content from the API
- Return type
dict
- rohub.ros_set_community(identifier, community_identifier)
Function that sets community for the specific research object.
See also
- Parameters
identifier (str) – research object’s identifier
community_identifier (str) – community identifier
- Returns
response content from the API
- Return type
dict
- rohub.ros_set_contributors(identifier, agents)
Function that sets contributor to a specific research object.
Note
The order in which agents are provided as input is preserved in the API!
See also
The template for providing data for non-existing users is as follows: {“agent_type”: “user”, “display_name”: “example_display_name”, “email”:”example_email”, “orcid_id”:”example_orcid_id”, “affiliation”: “example_affiliation”}
- Parameters
identifier (str) – research object’s identifier
agents (list) – usernames representing contributors, if one doesn’t exist it will be automatically created
- Returns
response content from the API
- Return type
dict
- rohub.ros_set_copyright_holders(identifier, agents)
Function that sets copyright holders to a specific Research Object.
Note
The order in which agents are provided as input is preserved in the API!
See also
The template for providing data for non-existing users/organizations is as follows: USER: {“agent_type”: “user”, “display_name”: “example_display_name”, “email”:”example_email”, “orcid_id”:”example_orcid_id”, “affiliation”: “example_affiliation”} ORGANIZATION: {“agent_type”: “organization”, “display_name”: “example_display_name”, “email”: “example_email”, “organization_url”: “example_url”, “ror_identifier”: “example_ror”}
- Parameters
identifier (str) – research object’s identifier
agents (list) – usernames/organizations representing holders, if one doesn’t exist it will be automatically created
- Returns
response content from the API
- Return type
dict
- rohub.ros_set_keywords(identifier, keywords)
Function that sets list of keywords for the specific research object.
- Parameters
identifier (str) – research object’s identifier
keywords (list) – list of keywords
- Returns
response content from the API
- Return type
dict
- rohub.ros_set_license(ros_id, license_id)
Function that sets license information associated with specific research object.
- Parameters
ros_id (str) – research object’s identifier
license_id (str) – license’s identifier
- Returns
response content from the API
- Return type
dict
- rohub.ros_set_publishers(identifier, agents)
Function that sets publishers to a specific research object.
Note
The order in which agents are provided as input is preserved in the API!
See also
The template for providing data for non-existing users/organizations is as follows: USER: {“agent_type”: “user”, “display_name”: “example_display_name”, “email”:”example_email”, “orcid_id”:”example_orcid_id”, “affiliation”: “example_affiliation”} ORGANIZATION: {“agent_type”: “organization”, “display_name”: “example_display_name”, “email”: “example_email”, “organization_url”: “example_url”, “ror_identifier”: “example_ror”}
- Parameters
identifier (str) – research object’s identifier
agents (list) – usernames/organizations representing publishers, if one doesn’t exist it will be automatically created
- Returns
response content from the API
- Return type
dict
- rohub.ros_snapshot(identifier, title=None, description=None, create_doi=None, external_doi=None, publication_services=None)
Function that creates research object’s snapshot.
See also
Note
if one chooses to use doi it can be provided in two ways: 1) through setting create_doi to True, then doi will be generated for you 2) through passing your doi using external_doi parameter create_doi = True and external_doi are mutually exclusive, therefore they can’t be used simultaneously!
Note
if on chooses to use publications services the result will be loaded as an RO-crate!
Warning
user needs to make sure that he has service credentials associated with his profile for the publication services that he would like to use! If that is not the case, warning will be shown and the ros will not be published as intended!
- Parameters
identifier (str) – research object’s identifier
title (str) – snapshot title, optional
description (str) – snapshot description, optional
create_doi (bool) – doi is created if True, False otherwise, optional, False is the default
external_doi (str) – existing doi value that will be associated with the snapshot, optional
publication_services (list) – services where the snapshot should be published into
- Returns
snapshot identifier
- Return type
str
- rohub.ros_triple_details(identifier)
Function that shows details for triple based on it’s identifier.
- Parameters
identifier (str) – triple’s identifier
- Returns
response containing triple details
- Return type
dict
- rohub.ros_undo_golden(identifier)
Function that makes specific research object stop being golden.
- Parameters
identifier (str) – research object’s identifier
- Returns
None
- Return type
None
- rohub.ros_update(identifier, title, research_areas, description=None, access_mode=None, ros_type=None, template=None, owner=None, editors=None, readers=None, creation_mode=None)
Function that updates specific research object.
See also
list_valid_research_areas()
list_valid_access_modes()
list_valid_ros_types()
list_valid_templates()
list_valid_creation_modes()
- Parameters
identifier (str) – research object’s identifier
title (str) – title of your research object
research_areas (list) – research areas associated with your research object
description (str) – description of your research object, optional
access_mode (str) – research object’s access mode, optional
ros_type (str) – research object’s type, optional
template (str) – research object’s template, optional
owner (str) – research object’s owner, optional
editors (list) – research object’s editors, optional
readers (list) – research object’s readers, optional
creation_mode – research object’s creation mode, optional
- Returns
response content from the API
- Return type
dict
- rohub.ros_update_funding(identifier, funding_identifier, grant_identifier=None, grant_name=None, grant_title=None, funder_doi=None, funder_name=None)
Function that updates specific funding associated with specific research object.
See also
- Parameters
identifier (str) – research object’s identifier
funding_identifier (str) – funding’s identifier
grant_identifier (str) – grant’s identifier, optional
grant_name (str) – grant’s name, optional
funder_name (str) – funder’s name, optional
grant_title (str) – grant’s title, optional
funder_doi (str) – funder’s doi, optional
- Returns
response content from the API
- Return type
dict
- rohub.ros_upload(path_to_zip)
Function that enables creating a new research object from the zip file.
Note
ZIP can be provided as a Research Object in RO-crate format (recommended) or in the legacy model format. Besides these two, it can also be a simple set of resources!
See also
recommended RO exchange format: https://www.researchobject.org/ro-crate/1.1/legacy model format: https://www.researchobject.org/specs/- Parameters
path_to_zip (str) – path to the existing zip package
- Returns
response content from the API
- Return type
dict
- rohub.ros_upload_resources(identifier, path_to_zip)
Function that enables creating a new resource from the zip file.
- Parameters
identifier (str) – research object’s identifier
path_to_zip (str) – path to the existing zip package
- Returns
response content from the API
- Return type
dict
- rohub.set_retries(number_of_retries)
Function that sets up maximum number of retries for validating a response status.
Note
You may want to increase number of retries or sleep time in case your job status validations ends up with information that there was not enough time to validate the status of the job. This can be dependent on current API traffic.
- Parameters
number_of_retries (int) – maximum number of retries
- Returns
None
- Return type
None
- rohub.set_sleep_time(sleep_time)
Function that sets up sleep time for between requests for validating a response status.
Note
You may want to increase number of retries or sleep time in case your job status validations ends up with information that there was not enough time to validate the status of the job. This can be dependent on current API traffic.
- Parameters
sleep_time (int) – sleep time
- Returns
None
- Return type
None
- rohub.show_my_user_profile_details()
Function that shows profile details for user that is currently logged in.
- Returns
response
- Return type
dict
- rohub.show_user_id(username=None)
Function that displays user’s identifier based on their username.
- Parameters
username (str) – username, optional - if not provided id for currently logged user will be retrieved
- Returns
user’s identifier
- Return type
str
- rohub.show_valid_type_matching_for_ros()
Function that displays valid pairs for ros_type and template.
- Returns
response content from the API
- Return type
dict
- rohub.users_find(search=None)
Function that finds a user against the provided query.
Warning
if no query provided then all users will be retrieved!
- Parameters
search (str) – query, optional
- Returns
table containing selected information about users
- Return type
Panda’s DataFrame
- rohub.version()
Displays the current package version.
- Returns
package version
- Return type
str
- rohub.whoami()
Function that returns service username for user that is currently logged in.
- Returns
username
- Return type
str
- rohub.zenodo_list_funders(query)
Function that displays list of funders from the Zenodo database against user’s query.
Note
Zenodo performs tight matching, so one has to be specific with the query value.
Warning
Zenodo limits number of records to 10 000. Be aware of that! The table will include maximum 10 000 rows no matter how many results there is in the whole Zenodo database! One can try to restrict number of results by making query more specific.
- Parameters
query (str) – query to search against
- Returns
table containing selected information about funders
- Return type
Panda’s DataFrame
- rohub.zenodo_list_grants(query)
Function that displays list of grants from the Zenodo database against user’s query.
Note
Zenodo performs tight matching, so one has to be specific with the query value.
Warning
Zenodo limits number of records to 10 000. Be aware of that! The table will include maximum 10 000 rows no matter how many results there is in the whole Zenodo database! One can try to restrict number of results by making query more specific.
- Parameters
query (str) – query to search against
- Returns
table containing selected information about grants
- Return type
Panda’s DataFrame