Projects#

Get, find and validation functions#

Note

Values are validated against the DRS name of the terms of the projects whereas find functions are based on the id of the terms.

esgvoc.api.projects.find_collections_in_project(expression: str, project_id: str, only_id: bool = False, limit: int | None = None, offset: int | None = None) list[tuple[str, dict]][source]#

Find collections in the given project based on a full text search defined by the given expression. The expression comes from the powerful SQLite FTS extension and corresponds to the expression of the MATCH operator. It can be composed of one or multiple keywords combined with boolean operators (NOT, AND, ^, etc. default is OR). Keywords can define prefixes or postfixes with the wildcard *. The function returns a list of collection ids and contexts, sorted according to the bm25 ranking metric (list index 0 has the highest rank). This function performs an exact match on the project_id, and does not search for similar or related projects. If the provided expression does not hit any collection or the given project_id does not match exactly to an id of a project, the function returns an empty list. The function searches for the expression in the collection specifications. However, if only_id is True (default is False), the search is restricted to the id of the collections. At the moment, `only_id` is set to `True` as the collections haven’t got any description.

Parameters:
  • expression (str) – The full text search expression.

  • project_id (str) – The id of the given project.

  • only_id (bool) – Performs the search only on ids, otherwise on all the specifications.

  • limit (int | None) – Limit the number of returned items found. Returns all items found the if limit is either None, zero or negative.

  • offset (int | None) – Skips offset number of items found. Ignored if offset is either None, zero or negative.

Returns:

A list of collection ids and contexts. Returns an empty list if no matches are found.

Return type:

list[tuple[str, dict]]

Raises:

EsgvocValueError – If the expression cannot be interpreted.

esgvoc.api.projects.find_items_in_project(expression: str, project_id: str, only_id: bool = False, limit: int | None = None, offset: int | None = None) list[Item][source]#

Find items, at the moment terms and collections, in the given project based on a full-text search defined by the given expression. The expression comes from the powerful SQLite FTS extension and corresponds to the expression of the MATCH operator. It can be composed of one or multiple keywords combined with boolean operators (NOT, AND, ^, etc. default is OR). Keywords can define prefixes or postfixes with the wildcard *. The function returns a list of item instances sorted according to the bm25 ranking metric (list index 0 has the highest rank). This function performs an exact match on the project_id, and does not search for similar or related projects. If the provided expression does not hit any item, or the provided project_id is not found, the function returns an empty list. The function searches for the expression in the term and collection specifications. However, if only_id is True (default is False), the search is restricted to the id of the terms and collections. At the moment, `only_id` is set to `True` for the collections because they haven’t got any description.

Parameters:
  • expression (str) – The full text search expression.

  • only_id (bool) – Performs the search only on ids, otherwise on all the specifications.

  • limit (int | None) – Limit the number of returned items found. Returns all items found the if limit is either None, zero or negative.

  • offset (int | None) – Skips offset number of items found. Ignored if offset is either None, zero or negative.

Returns:

A list of item instances. Returns an empty list if no matches are found.

Return type:

list[Item]

Raises:

EsgvocValueError – If the expression cannot be interpreted.

esgvoc.api.projects.find_terms_in_all_projects(expression: str, only_id: bool = False, limit: int | None = None, offset: int | None = None, selected_term_fields: Iterable[str] | None = None) list[tuple[str, list[DataDescriptor]]][source]#

Find terms in the all projects on a full text search defined by the given expression. The expression comes from the powerful SQLite FTS extension and corresponds to the expression of the MATCH operator. It can be composed of one or multiple keywords combined with boolean operators (NOT, AND, ^, etc. default is OR). Keywords can define prefixes or postfixes with the wildcard *. The function returns a list of project ids and term instances, sorted according to the bm25 ranking metric (list index 0 has the highest rank). If the provided expression does not hit any term, the function returns an empty list. The function searches for the expression in the term specifications. However, if only_id is True (default is False), the search is restricted to the id of the terms.

Parameters:
  • expression (str) – The full text search expression.

  • only_id (bool) – Performs the search only on ids, otherwise on all the specifications.

  • limit (int | None) – Limit the number of returned items found. Returns all items found the if limit is either None, zero or negative.

  • offset (int | None) – Skips offset number of items found. Ignored if offset is either None, zero or negative.

  • selected_term_fields (Iterable[str] | None) – A list of term fields to select or None. If None, all the fields of the terms are returned. If empty, selects the id and type fields.

Returns:

A list of project ids and term instances. Returns an empty list if no matches are found.

Return type:

list[tuple[str, list[DataDescriptor]]]

Raises:

EsgvocValueError – If the expression cannot be interpreted.

esgvoc.api.projects.find_terms_in_collection(expression: str, project_id: str, collection_id: str, only_id: bool = False, limit: int | None = None, offset: int | None = None, selected_term_fields: Iterable[str] | None = None) list[DataDescriptor][source]#

Find terms in the given project and collection based on a full text search defined by the given expression. The expression comes from the powerful SQLite FTS extension and corresponds to the expression of the MATCH operator. It can be composed of one or multiple keywords combined with boolean operators (NOT, AND, ^, etc. default is OR). Keywords can define prefixes or postfixes with the wildcard *. The function returns a list of term instances, sorted according to the bm25 ranking metric (list index 0 has the highest rank). This function performs an exact match on the project_id and collection_id, and does not search for similar or related projects and collections. If the provided expression does not hit any term or if any of the provided ids (project_id or collection_id) is not found, the function returns an empty list. The function searches for the expression in the term specifications. However, if only_id is True (default is False), the search is restricted to the id of the terms.

Parameters:
  • expression (str) – The full text search expression.

  • project_id (str) – The id of the given project.

  • collection_id (str) – The id of the given collection.

  • only_id (bool) – Performs the search only on ids, otherwise on all the specifications.

  • limit (int | None) – Limit the number of returned items found. Returns all items found the if limit is either None, zero or negative.

  • offset (int | None) – Skips offset number of items found. Ignored if offset is either None, zero or negative.

  • selected_term_fields (Iterable[str] | None) – A list of term fields to select or None. If None, all the fields of the terms are returned. If empty, selects the id and type fields.

Returns:

A list of term instances. Returns an empty list if no matches are found.

Return type:

list[DataDescriptor]

Raises:

EsgvocValueError – If the expression cannot be interpreted.

esgvoc.api.projects.find_terms_in_project(expression: str, project_id: str, only_id: bool = False, limit: int | None = None, offset: int | None = None, selected_term_fields: Iterable[str] | None = None) list[DataDescriptor][source]#

Find terms in the given project on a full text search defined by the given expression. The expression comes from the powerful SQLite FTS extension and corresponds to the expression of the MATCH operator. It can be composed of one or multiple keywords combined with boolean operators (NOT, AND, ^, etc. default is OR). Keywords can define prefixes or postfixes with the wildcard *. The function returns a list of term instances, sorted according to the bm25 ranking metric (list index 0 has the highest rank). This function performs an exact match on the project_id, and does not search for similar or related projects. If the provided expression does not hit any term or if any of the provided project_id is not found, the function returns an empty list. The function searches for the expression in the term specifications. However, if only_id is True (default is False), the search is restricted to the id of the terms.

Parameters:
  • expression (str) – The full text search expression.

  • project_id (str) – The id of the given project.

  • only_id (bool) – Performs the search only on ids, otherwise on all the specifications.

  • limit (int | None) – Limit the number of returned items found. Returns all items found the if limit is either None, zero or negative.

  • offset (int | None) – Skips offset number of items found. Ignored if offset is either None, zero or negative.

  • selected_term_fields (Iterable[str] | None) – A list of term fields to select or None. If None, all the fields of the terms are returned. If empty, selects the id and type fields.

Returns:

A list of term instances. Returns an empty list if no matches are found.

Return type:

list[DataDescriptor]

Raises:

EsgvocValueError – If the expression cannot be interpreted.

esgvoc.api.projects.get_all_collections_in_project(project_id: str) list[str][source]#

Gets all collections of the given project. This function performs an exact match on the project_id and does not search for similar or related projects. If the provided project_id is not found, the function returns an empty list.

Parameters:

project_id (str) – A project id

Returns:

A list of collection ids. Returns an empty list if no matches are found.

Return type:

list[str]

esgvoc.api.projects.get_all_projects() list[str][source]#

Gets all projects.

Returns:

A list of project ids.

Return type:

list[str]

esgvoc.api.projects.get_all_terms_in_all_projects(selected_term_fields: Iterable[str] | None = None) list[tuple[str, list[DataDescriptor]]][source]#

Gets all terms of all projects.

Parameters:

selected_term_fields (Iterable[str] | None) – A list of term fields to select or None. If None, all the fields of the terms are returned. If empty, selects the id and type fields.

Returns:

A list of tuple project_id and term instances of that project.

Return type:

list[tuple[str, list[DataDescriptor]]]

esgvoc.api.projects.get_all_terms_in_collection(project_id: str, collection_id: str, selected_term_fields: Iterable[str] | None = None) list[DataDescriptor][source]#

Gets all terms of the given collection of a project. This function performs an exact match on the project_id and collection_id, and does not search for similar or related projects and collections. If any of the provided ids (project_id or collection_id) is not found, the function returns an empty list.

Parameters:
  • project_id (str) – A project id

  • collection_id (str) – A collection id

  • selected_term_fields (Iterable[str] | None) – A list of term fields to select or None. If None, all the fields of the terms are returned. If empty, selects the id and type fields.

Returns:

a list of term instances. Returns an empty list if no matches are found.

Return type:

list[DataDescriptor]

esgvoc.api.projects.get_all_terms_in_project(project_id: str, selected_term_fields: Iterable[str] | None = None) list[DataDescriptor][source]#

Gets all terms of the given project. This function performs an exact match on the project_id and does not search for similar or related projects. Terms are unique within a collection but may have some synonyms in a project. If the provided project_id is not found, the function returns an empty list.

Parameters:
  • project_id (str) – A project id

  • selected_term_fields (Iterable[str] | None) – A list of term fields to select or None. If None, all the fields of the terms are returned. If empty, selects the id and type fields.

Returns:

A list of term instances. Returns an empty list if no matches are found.

Return type:

list[DataDescriptor]

esgvoc.api.projects.get_collection_from_data_descriptor_in_all_projects(data_descriptor_id: str) list[tuple[str, str, dict]][source]#

Returns the collections, in all projects, that correspond to the given data descriptor in the universe. This function performs an exact match on data_descriptor_id, and does not search for similar or related data descriptors. If the provided data_descriptor_id is not found, or if there is no collection corresponding to the given data descriptor, the function returns an empty list.

Parameters:

data_descriptor_id (str) – The id of the given data descriptor.

Returns:

A list of collection ids, their project_ids and contexts. Returns an empty list if no matches are found.

Return type:

list[tuple[str, str, dict]]

esgvoc.api.projects.get_collection_from_data_descriptor_in_project(project_id: str, data_descriptor_id: str) tuple[str, dict] | None[source]#

Returns the collection, in the given project, that corresponds to the given data descriptor in the universe. This function performs an exact match on the project_id and data_descriptor_id, and does not search for similar or related projects and data descriptors. If any of the provided ids (project_id or data_descriptor_id) is not found, or if there is no collection corresponding to the given data descriptor, the function returns None.

Parameters:
  • project_id (str) – The id of the given project.

  • data_descriptor_id (str) – The id of the given data descriptor.

Returns:

A collection id and context. Returns None if no matches are found.

Return type:

tuple[str, dict] | None

esgvoc.api.projects.get_collection_in_project(project_id: str, collection_id: str) tuple[str, dict] | None[source]#

Returns the collection, in the given project, whose id corresponds exactly to the given collection id. This function performs an exact match on the project_id and collection_id, and does not search for similar or related projects and collections. If any of the provided ids (project_id or collection_id) is not found, the function returns None.

Parameters:
  • project_id (str) – The id of the given project.

  • collection_id (str) – The id of a collection to be found.

Returns:

A collection id and context. Returns None if no match is found.

Return type:

tuple[str, dict] | None

esgvoc.api.projects.get_project(project_id: str) ProjectSpecs | None[source]#

Get a project and returns its specifications. This function performs an exact match on the project_id and does not search for similar or related projects. If the provided project_id is not found, the function returns None.

Parameters:

project_id (str) – A project id to be found

Returns:

The specs of the project found. Returns None if no matches are found.

Return type:

ProjectSpecs | None

esgvoc.api.projects.get_term_from_universe_term_id_in_all_projects(data_descriptor_id: str, universe_term_id: str, selected_term_fields: Iterable[str] | None = None) list[tuple[str, str, DataDescriptor]][source]#

Returns the terms, in all projects, that correspond to the given term in the universe. This function performs an exact match on the data_descriptor_id and universe_term_id, and does not search for similar or related data descriptors and terms. If any of the provided ids (data_descriptor_id or universe_term_id) is not found, or if there is no project term corresponding to the given universe term the function returns an empty list.

Parameters:
  • data_descriptor_id (str) – The id of the data descriptor that contains the given universe term.

  • universe_term_id (str) – The id of the given universe term.

  • selected_term_fields (Iterable[str] | None) – A list of term fields to select or None. If None, all the fields of the terms are returned. If empty, selects the id and type fields.

Returns:

A project_id, collection id and the project term instance. Returns an empty list if no matches are found.

Return type:

list[tuple[str, str, DataDescriptor]]

esgvoc.api.projects.get_term_from_universe_term_id_in_project(project_id: str, data_descriptor_id: str, universe_term_id: str, selected_term_fields: Iterable[str] | None = None) tuple[str, DataDescriptor] | None[source]#

Returns the term, in the given project, that corresponds to the given term in the universe. This function performs an exact match on the project_id, data_descriptor_id and universe_term_id, and does not search for similar or related projects, data descriptors and terms. If any of the provided ids (project_id, data_descriptor_id or universe_term_id) is not found, or if there is no project term corresponding to the given universe term the function returns None.

Parameters:
  • project_id (str) – The id of the given project.

  • data_descriptor_id (str) – The id of the data descriptor that contains the given universe term.

  • universe_term_id (str) – The id of the given universe term.

  • selected_term_fields (Iterable[str] | None) – A list of term fields to select or None. If None, all the fields of the terms are returned. If empty, selects the id and type fields.

Returns:

A collection id and the project term instance. Returns None if no matches are found.

Return type:

tuple[str, DataDescriptor] | None

esgvoc.api.projects.get_term_in_collection(project_id: str, collection_id: str, term_id: str, selected_term_fields: Iterable[str] | None = None) DataDescriptor | None[source]#

Returns the term, in the given project and collection, whose id corresponds exactly to the given term id. This function performs an exact match on the project_id, collection_id and term_id, and does not search for similar or related projects, collections and terms. If any of the provided ids (project_id, collection_id or term_id) is not found, the function returns None.

Parameters:
  • project_id (str) – The id of the given project.

  • collection_id (str) – The id of the given collection.

  • term_id (str) – The id of a term to be found.

  • selected_term_fields (Iterable[str] | None) – A list of term fields to select or None. If None, all the fields of the terms are returned. If empty, selects the id and type fields.

Returns:

A term instance. Returns None if no match is found.

Return type:

DataDescriptor | None

esgvoc.api.projects.get_term_in_project(project_id: str, term_id: str, selected_term_fields: Iterable[str] | None = None) DataDescriptor | None[source]#

Returns the first occurrence of the terms, in the given project, whose id corresponds exactly to the given term id. Terms are unique within a collection but may have some synonyms in a project. This function performs an exact match on the project_id and term_id, and does not search for similar or related projects and terms. If any of the provided ids (project_id or term_id) is not found, the function returns None.

Parameters:
  • project_id (str) – The id of the given project.

  • term_id (str) – The id of a term to be found.

  • selected_term_fields (Iterable[str] | None) – A list of term fields to select or None. If None, all the fields of the terms are returned. If empty, selects the id and type fields.

Returns:

A term instance. Returns None if no match is found.

Return type:

DataDescriptor | None

esgvoc.api.projects.valid_term(value: str, project_id: str, collection_id: str, term_id: str) ValidationReport[source]#

Check if the given value may or may not represent the given term. The functions returns a report that contains the possible errors.

Behavior based on the nature of the term:
  • plain term: the function try to match the value on the drs_name field.

  • pattern term: the function try to match the value on the pattern field (regex).

  • composite term:
    • if the composite has got a separator, the function splits the value according to the separator of the term then it try to match every part of the composite with every split of the value.

    • if the composite hasn’t got a separator, the function aggregates the parts of the composite so as to compare it as a regex to the value.

If any of the provided ids (project_id, collection_id or term_id) is not found, the function raises a EsgvocNotFoundError.

Parameters:
  • value (str) – A value to be validated

  • project_id (str) – A project id

  • collection_id (str) – A collection id

  • term_id (str) – A term id

Returns:

A validation report that contains the possible errors

Return type:

ValidationReport

Raises:

EsgvocNotFoundError – If any of the provided ids is not found

esgvoc.api.projects.valid_term_in_all_projects(value: str) list[MatchingTerm][source]#

Check if the given value may or may not represent a term in all projects. The function returns the terms that the value matches.

Behavior based on the nature of the term:
  • plain term: the function try to match the value on the drs_name field.

  • pattern term: the function try to match the value on the pattern field (regex).

  • composite term:
    • if the composite has got a separator, the function splits the value according to the separator of the term then it try to match every part of the composite with every split of the value.

    • if the composite hasn’t got a separator, the function aggregates the parts of the composite so as to compare it as a regex to the value.

Parameters:

value (str) – A value to be validated

Returns:

The list of terms that the value matches.

Return type:

list[MatchingTerm]

esgvoc.api.projects.valid_term_in_collection(value: str, project_id: str, collection_id: str) list[MatchingTerm][source]#

Check if the given value may or may not represent a term in the given collection. The function returns the terms that the value matches.

Behavior based on the nature of the term:
  • plain term: the function try to match the value on the drs_name field.

  • pattern term: the function try to match the value on the pattern field (regex).

  • composite term:
    • if the composite has got a separator, the function splits the value according to the separator of the term then it try to match every part of the composite with every split of the value.

    • if the composite hasn’t got a separator, the function aggregates the parts of the composite so as to compare it as a regex to the value.

If any of the provided ids (project_id or collection_id) is not found, the function raises a EsgvocNotFoundError.

Parameters:
  • value (str) – A value to be validated

  • project_id (str) – A project id

  • collection_id (str) – A collection id

Returns:

The list of terms that the value matches.

Return type:

list[MatchingTerm]

Raises:

EsgvocNotFoundError – If any of the provided ids is not found

esgvoc.api.projects.valid_term_in_project(value: str, project_id: str) list[MatchingTerm][source]#

Check if the given value may or may not represent a term in the given project. The function returns the terms that the value matches.

Behavior based on the nature of the term:
  • plain term: the function try to match the value on the drs_name field.

  • pattern term: the function try to match the value on the pattern field (regex).

  • composite term:
    • if the composite has got a separator, the function splits the value according to the separator of the term then it try to match every part of the composite with every split of the value.

    • if the composite hasn’t got a separator, the function aggregates the parts of the composite so as to compare it as a regex to the value.

If the project_id is not found, the function raises a EsgvocNotFoundError.

Parameters:
  • value (str) – A value to be validated

  • project_id (str) – A project id

Returns:

The list of terms that the value matches.

Return type:

list[MatchingTerm]

Raises:

EsgvocNotFoundError – If the project_id is not found

Validation reporting#

Pydantic model esgvoc.api.report.ProjectTermError[source]#

Bases: ValidationError

A validation error on a term from a project.

Show JSON schema
{
   "title": "ProjectTermError",
   "description": "A validation error on a term from a project.",
   "type": "object",
   "properties": {
      "value": {
         "title": "Value",
         "type": "string"
      },
      "term": {
         "additionalProperties": true,
         "title": "Term",
         "type": "object"
      },
      "term_kind": {
         "$ref": "#/$defs/TermKind"
      },
      "collection_id": {
         "title": "Collection Id",
         "type": "string"
      }
   },
   "$defs": {
      "TermKind": {
         "description": "The kinds of term.",
         "enum": [
            "plain",
            "pattern",
            "composite",
            "mixed"
         ],
         "title": "TermKind",
         "type": "string"
      }
   },
   "required": [
      "value",
      "term",
      "term_kind",
      "collection_id"
   ]
}

field collection_id: str [Required][source]#

The collection id that the term belongs

field term: dict [Required][source]#

JSON specification of the term.

field term_kind: TermKind [Required][source]#

The kind of term.

field value: str [Required][source]#

The given value that is invalid.

accept(visitor: ValidationErrorVisitor) Any[source]#

Accept a validation error visitor.

Parameters:

visitor (ValidationErrorVisitor) – The validation error visitor.

Returns:

Depending on the visitor.

Return type:

Any

property class_name: str[source]#

The class name of the issue for JSON serialization.

Pydantic model esgvoc.api.report.UniverseTermError[source]#

Bases: ValidationError

A validation error on a term from the universe.

Show JSON schema
{
   "title": "UniverseTermError",
   "description": "A validation error on a term from the universe.",
   "type": "object",
   "properties": {
      "value": {
         "title": "Value",
         "type": "string"
      },
      "term": {
         "additionalProperties": true,
         "title": "Term",
         "type": "object"
      },
      "term_kind": {
         "$ref": "#/$defs/TermKind"
      },
      "data_descriptor_id": {
         "title": "Data Descriptor Id",
         "type": "string"
      }
   },
   "$defs": {
      "TermKind": {
         "description": "The kinds of term.",
         "enum": [
            "plain",
            "pattern",
            "composite",
            "mixed"
         ],
         "title": "TermKind",
         "type": "string"
      }
   },
   "required": [
      "value",
      "term",
      "term_kind",
      "data_descriptor_id"
   ]
}

field data_descriptor_id: str [Required][source]#

The data descriptor that the term belongs.

field term: dict [Required][source]#

JSON specification of the term.

field term_kind: TermKind [Required][source]#

The kind of term.

field value: str [Required][source]#

The given value that is invalid.

accept(visitor: ValidationErrorVisitor) Any[source]#

Accept a validation error visitor.

Parameters:

visitor (ValidationErrorVisitor) – The validation error visitor.

Returns:

Depending on the visitor.

Return type:

Any

property class_name: str[source]#

The class name of the issue for JSON serialization.

Pydantic model esgvoc.api.report.ValidationError[source]#

Bases: BaseModel, ABC

Generic class for the term validation error.

Show JSON schema
{
   "title": "ValidationError",
   "description": "Generic class for the term validation error.",
   "type": "object",
   "properties": {
      "value": {
         "title": "Value",
         "type": "string"
      },
      "term": {
         "additionalProperties": true,
         "title": "Term",
         "type": "object"
      },
      "term_kind": {
         "$ref": "#/$defs/TermKind"
      }
   },
   "$defs": {
      "TermKind": {
         "description": "The kinds of term.",
         "enum": [
            "plain",
            "pattern",
            "composite",
            "mixed"
         ],
         "title": "TermKind",
         "type": "string"
      }
   },
   "required": [
      "value",
      "term",
      "term_kind"
   ]
}

field term: dict [Required][source]#

JSON specification of the term.

field term_kind: TermKind [Required][source]#

The kind of term.

field value: str [Required][source]#

The given value that is invalid.

abstractmethod accept(visitor: ValidationErrorVisitor) Any[source]#

Accept a validation error visitor.

Parameters:

visitor (ValidationErrorVisitor) – The validation error visitor.

Returns:

Depending on the visitor.

Return type:

Any

property class_name: str[source]#

The class name of the issue for JSON serialization.

class esgvoc.api.report.ValidationErrorVisitor(*args, **kwargs)[source]#

Bases: Protocol

Specifications for a term validation error visitor.

visit_project_term_error(error: ProjectTermError) Any[source]#

Visit a project term error.

visit_universe_term_error(error: UniverseTermError) Any[source]#

Visit a universe term error.

Pydantic model esgvoc.api.report.ValidationReport[source]#

Bases: BaseModel

Term validation report.

Show JSON schema
{
   "title": "ValidationReport",
   "description": "Term validation report.",
   "type": "object",
   "properties": {
      "expression": {
         "title": "Expression",
         "type": "string"
      },
      "errors": {
         "items": {
            "anyOf": [
               {
                  "$ref": "#/$defs/UniverseTermError"
               },
               {
                  "$ref": "#/$defs/ProjectTermError"
               }
            ]
         },
         "title": "Errors",
         "type": "array"
      }
   },
   "$defs": {
      "ProjectTermError": {
         "description": "A validation error on a term from a project.",
         "properties": {
            "value": {
               "title": "Value",
               "type": "string"
            },
            "term": {
               "additionalProperties": true,
               "title": "Term",
               "type": "object"
            },
            "term_kind": {
               "$ref": "#/$defs/TermKind"
            },
            "collection_id": {
               "title": "Collection Id",
               "type": "string"
            }
         },
         "required": [
            "value",
            "term",
            "term_kind",
            "collection_id"
         ],
         "title": "ProjectTermError",
         "type": "object"
      },
      "TermKind": {
         "description": "The kinds of term.",
         "enum": [
            "plain",
            "pattern",
            "composite",
            "mixed"
         ],
         "title": "TermKind",
         "type": "string"
      },
      "UniverseTermError": {
         "description": "A validation error on a term from the universe.",
         "properties": {
            "value": {
               "title": "Value",
               "type": "string"
            },
            "term": {
               "additionalProperties": true,
               "title": "Term",
               "type": "object"
            },
            "term_kind": {
               "$ref": "#/$defs/TermKind"
            },
            "data_descriptor_id": {
               "title": "Data Descriptor Id",
               "type": "string"
            }
         },
         "required": [
            "value",
            "term",
            "term_kind",
            "data_descriptor_id"
         ],
         "title": "UniverseTermError",
         "type": "object"
      }
   },
   "required": [
      "expression",
      "errors"
   ]
}

field errors: list[UniverseTermError | ProjectTermError] [Required][source]#

The validation errors.

field expression: str [Required][source]#

The given expression.

property nb_errors: int[source]#

The number of validation errors.

property validated: bool[source]#

The expression is validated or not.