Valid#
The command valid check if a string input correspond to a term drs_name attribute or not. This feature can be use in CLI and API.
Knowing the term id:#
esgvoc valid IPSL cmip6:institution_id:ipsl

Note
IPSL is the drs_name of the term with id ipsl therefore the valid command return “True”.
import esgvoc.api as ev
ev.valid_term("IPSL","cmip6","institution_id","ipsl")

Note
The API returns a DrsValidationReport Object. The __str__ dunder function reports errors if any. The __bool__ dunder function permits to use result in if statement.
Knowing the only the collection id:#
esgvoc valid IPSL cmip6:institution_id:

Note
This command looks for the drs_name in every term in the specified collection.
import esgvoc.api as ev
ev.valid_term_collection("IPSL","cmip6","institution_id")

Note
The function ev.valid_term_collection returns a list of MatchingTerm.
Knowing the only the project id:#
esgvoc valid IPSL cmip6::

Note
This command looks for the drs_name in every term in the specified project. Therefore, it could be pretty long compared to the above functions.
import esgvoc.api as ev
ev.valid_term_project("IPSL","cmip6")

Note
The function ev.valid_term_project returns a list of MatchingTerm.
Find it in all known projects#
esgvoc valid IPSL ::

Note
This command looks for the drs_name in every project. Therefore, it could be pretty long compared to the above functions.
import esgvoc.api as ev
ev.valid_term_in_all_projects("IPSL")

Note
The function ev.valid_term_in_all_projects returns a list of MatchingTerm.