From ca11e90b2fc8da8b2e426f684c96164b0469451f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20M=C3=B6ller?= Date: Thu, 21 Dec 2023 14:27:27 +0100 Subject: [PATCH] temp --- basyx/aas/adapter/aasx.py | 12 +- basyx/aas/compliance_tool/state_manager.py | 2 +- basyx/aas/examples/tutorial_aasx.py | 2 +- basyx/aas/model/__init__.py | 23 +-- basyx/aas/model/_string_constraints.py | 41 ++--- basyx/aas/model/aas.py | 4 +- basyx/aas/model/base.py | 141 +++++++++--------- basyx/aas/model/concept.py | 8 +- basyx/aas/model/datatypes.py | 8 +- basyx/aas/model/submodel.py | 11 +- basyx/aas/util/__init__.py | 4 +- basyx/aas/util/identification.py | 2 +- docs/source/_static/custom.css | 9 ++ docs/source/adapter/aasx.rst | 4 +- docs/source/adapter/index.rst | 6 +- docs/source/adapter/json.rst | 14 +- docs/source/adapter/xml.rst | 31 ++-- docs/source/backend/backends.rst | 4 +- docs/source/backend/couchdb.rst | 5 +- docs/source/backend/index.rst | 7 +- docs/source/backend/local_file.rst | 5 + .../compliance_tool/compliance_check_aasx.rst | 4 +- .../compliance_tool/compliance_check_json.rst | 4 +- .../compliance_tool/compliance_check_xml.rst | 4 +- docs/source/compliance_tool/index.rst | 4 +- docs/source/compliance_tool/state_manager.rst | 4 +- docs/source/conf.py | 27 +++- docs/source/constraints.rst | 7 +- docs/source/examples/example_aas.rst | 4 +- .../example_aas_mandatory_attributes.rst | 4 +- .../example_aas_missing_attributes.rst | 4 +- .../examples/example_concept_description.rst | 5 - .../examples/example_submodel_template.rst | 4 +- docs/source/examples/index.rst | 4 +- docs/source/index.rst | 1 - docs/source/model/aas.rst | 4 +- docs/source/model/base.rst | 37 +++-- docs/source/model/concept.rst | 4 +- docs/source/model/datatypes.rst | 5 +- docs/source/model/index.rst | 8 +- docs/source/model/provider.rst | 6 +- docs/source/model/submodel.rst | 6 +- docs/source/util/identification.rst | 4 +- docs/source/util/index.rst | 6 +- docs/source/util/traversal.rst | 4 +- 45 files changed, 270 insertions(+), 237 deletions(-) create mode 100644 docs/source/_static/custom.css create mode 100644 docs/source/backend/local_file.rst delete mode 100644 docs/source/examples/example_concept_description.rst diff --git a/basyx/aas/adapter/aasx.py b/basyx/aas/adapter/aasx.py index 7b17bc090..210a10787 100644 --- a/basyx/aas/adapter/aasx.py +++ b/basyx/aas/adapter/aasx.py @@ -10,7 +10,7 @@ Functionality for reading and writing AASX files according to "Details of the Asset Administration Shell Part 1 V2.0", section 7. -The AASX file format is built upon the Open Packaging Conventions (OPC; ECMA 376-2). We use the `pyecma376_2` library +The AASX file format is built upon the Open Packaging Conventions (OPC; ECMA 376-2). We use the ``pyecma376_2`` library for low level OPC reading and writing. It currently supports all required features except for embedded digital signatures. @@ -92,7 +92,7 @@ def get_thumbnail(self) -> Optional[bytes]: Retrieve the packages thumbnail image The thumbnail image file is read into memory and returned as bytes object. You may use some python image library - for further processing or conversion, e.g. `pillow`: + for further processing or conversion, e.g. ``pillow``: .. code-block:: python @@ -119,18 +119,18 @@ def read_into(self, object_store: model.AbstractObjectStore, This function does the main job of reading the AASX file's contents. It traverses the relationships within the package to find AAS JSON or XML parts, parses them and adds the contained AAS objects into the provided - `object_store`. While doing so, it searches all parsed :class:`Submodels ` for + ``object_store``. While doing so, it searches all parsed :class:`Submodels ` for :class:`~basyx.aas.model.submodel.File` objects to extract the supplementary - files. The referenced supplementary files are added to the given `file_store` and the + files. The referenced supplementary files are added to the given ``file_store`` and the :class:`~basyx.aas.model.submodel.File` objects' values are updated with the absolute name of the supplementary file to allow for robust resolution the file within the - `file_store` later. + ``file_store`` later. :param object_store: An :class:`ObjectStore ` to add the AAS objects from the AASX file to :param file_store: A :class:`SupplementaryFileContainer <.AbstractSupplementaryFileContainer>` to add the embedded supplementary files to - :param override_existing: If `True`, existing objects in the object store are overridden with objects from the + :param override_existing: If ``True``, existing objects in the object store are overridden with objects from the AASX that have the same :class:`~basyx.aas.model.base.Identifier`. Default behavior is to skip those objects from the AASX. :return: A set of the :class:`Identifiers ` of all diff --git a/basyx/aas/compliance_tool/state_manager.py b/basyx/aas/compliance_tool/state_manager.py index a8093a4b3..808e316a4 100644 --- a/basyx/aas/compliance_tool/state_manager.py +++ b/basyx/aas/compliance_tool/state_manager.py @@ -36,7 +36,7 @@ class Step: A step represents a single test stage in a test protocol of a :class:`~.ComplianceToolStateManager` :ivar name: Name of the step - :ivar ~.status: Status of the step from type Status + :ivar status: Status of the step from type Status :ivar log_list: List of `logging.LogRecords` which belong to this step """ def __init__(self, name: str, status: Status, log_list: List[logging.LogRecord]): diff --git a/basyx/aas/examples/tutorial_aasx.py b/basyx/aas/examples/tutorial_aasx.py index 1125b56ab..dba56bf6f 100755 --- a/basyx/aas/examples/tutorial_aasx.py +++ b/basyx/aas/examples/tutorial_aasx.py @@ -5,7 +5,7 @@ Tutorial for exporting Asset Administration Shells with related objects and auxiliary files to AASX package files, using the aas.adapter.aasx module from the Eclipse BaSyx Python SDK. -.. warning: +.. warning:: This tutorial is only valid for the current main branch of the Eclipse BaSyx Python SDK. With version 3.0 of *Details of the Asset Administration Shell* some specifications of AASX files will change, resulting in changes of the `AASXWriter` interface. diff --git a/basyx/aas/model/__init__.py b/basyx/aas/model/__init__.py index db91d8802..fed5a7097 100644 --- a/basyx/aas/model/__init__.py +++ b/basyx/aas/model/__init__.py @@ -5,28 +5,7 @@ .. code-block:: python - from aas.model import AssetAdministrationShell, Submodel, Property - -The different modules are: - -aas.py - The main module, implementing high-level structures, such as AssetAdministrationShell and ConceptDictionary. - -base.py - Basic structures of the model, including all abstract classes and enumerations. This provides inheritance for the - higher level structures. - -concept.py - :class:`~basyx.aas.model.concept.ConceptDescription` from the AAS meta model - as well as specialized :class:`ConceptDescriptions ` like - :class:`~aas.model.concept.IEC61360ConceptDescription` - -provider.py - Providers for AAS objects, in order to store and retrieve :class:`~basyx.aas.model.base.Identifiable` objects by their - :class:`~basyx.aas.model.base.Identifier`. - -submodel.py - Meta-model of the submodels and events. + from basyx.aas.model import AssetAdministrationShell, Submodel, Property """ from .aas import * diff --git a/basyx/aas/model/_string_constraints.py b/basyx/aas/model/_string_constraints.py index d471201f4..104ac71ef 100644 --- a/basyx/aas/model/_string_constraints.py +++ b/basyx/aas/model/_string_constraints.py @@ -5,19 +5,26 @@ # # SPDX-License-Identifier: MIT """ -This module implements constraint functions for the listed constrained string types and is meant for internal use only. +.. warning:: + This module is meant for internal use only. + +This module implements constraint functions for the listed constrained string types. All types are constrained in length (min and max), RevisionType and VersionType are additionally constrained -by a regular expression. The following types aliased in the base module are constrained: -- ContentType -- Identifier -- LabelType -- MessageTopicType -- NameType -- PathType -- RevisionType -- ShortNameType -- QualifierType -- VersionType +by a regular expression. + +The following types aliased in the :mod:`~basyx.aas.model.base` module are constrained: + +- :class:`~basyx.aas.model.base.ContentType` +- :class:`~basyx.aas.model.base.Identifier` +- :class:`~basyx.aas.model.base.LabelType` +- :class:`~basyx.aas.model.base.MessageTopicType` +- :class:`~basyx.aas.model.base.NameType` +- :class:`~basyx.aas.model.base.PathType` +- :class:`~basyx.aas.model.base.RevisionType` +- :class:`~basyx.aas.model.base.ShortNameType` +- :class:`~basyx.aas.model.base.QualifierType` +- :class:`~basyx.aas.model.base.VersionType` +- :class:`~basyx.aas.model.base.ValueTypeIEC61360` """ import re @@ -103,14 +110,14 @@ def check_version_type(value: str, type_name: str = "VersionType") -> None: def create_check_function(min_length: int = 0, max_length: Optional[int] = None, pattern: Optional[re.Pattern] = None) \ -> Callable[[str, str], None]: """ - Returns a new `check_type` function with mandatory `type_name` for the given min_length, max_length and pattern + Returns a new ``check_type`` function with mandatory ``type_name`` for the given min_length, max_length and pattern constraints. This is the type-independent alternative to :func:`~.check_content_type`, :func:`~.check_identifier`, etc. - It is used for the definition of the :class:`ConstrainedLangStringSets `, - as a "Basic" constrained string type only exists for :class:`~aas.model.base.MultiLanguageNameType`, where all - values are :class:`ShortNames `. All other - :class:`:class:`ConstrainedLangStringSets ` use custom constraints. + It is used for the definition of the :class:`ConstrainedLangStringSets `, + as a "Basic" constrained string type only exists for :class:`~basyx.aas.model.base.MultiLanguageNameType`, where all + values are :class:`ShortNames `. All other + :class:`:class:`ConstrainedLangStringSets ` use custom constraints. """ def check_fn(value: str, type_name: str) -> None: return check(value, type_name, min_length, max_length, pattern) diff --git a/basyx/aas/model/aas.py b/basyx/aas/model/aas.py index 3075e2af4..09c94ef81 100644 --- a/basyx/aas/model/aas.py +++ b/basyx/aas/model/aas.py @@ -125,7 +125,7 @@ class AssetAdministrationShell(base.Identifiable, base.UniqueIdShortNamespace, b An Asset Administration Shell :ivar asset_information: :class:`~.AssetInformation` of the asset this AssetAdministrationShell is representing - :ivar ~.id: The globally unique id (:class:`~basyx.aas.model.base.Identifier`) of the element. + :ivar id: The globally unique id (:class:`~basyx.aas.model.base.Identifier`) of the element. (inherited from :class:`~basyx.aas.model.base.Identifiable`) :ivar id_short: Identifying string of the element within its name space. (inherited from :class:`~basyx.aas.model.base.Referable`) @@ -139,7 +139,7 @@ class AssetAdministrationShell(base.Identifiable, base.UniqueIdShortNamespace, b :ivar administration: :class:`~basyx.aas.model.base.AdministrativeInformation` of an :class:`~.basyx.aas.model.base.Identifiable` element. (inherited from :class:`~basyx.aas.model.base.Identifiable`) - :ivar ~.submodel: Unordered list of :class:`submodels ` to describe typically the asset + :ivar submodel: Unordered list of :class:`submodels ` to describe typically the asset of an AAS. (Initialization-parameter: `submodel_`) :ivar derived_from: The :class:`reference ` to the AAS the AAs was derived from :ivar embedded_data_specifications: List of Embedded data specification. diff --git a/basyx/aas/model/base.py b/basyx/aas/model/base.py index af12183ed..090642d6d 100644 --- a/basyx/aas/model/base.py +++ b/basyx/aas/model/base.py @@ -343,7 +343,7 @@ def __setitem__(self, key: str, value: str) -> None: class MultiLanguageNameType(ConstrainedLangStringSet): """ A :class:`~.ConstrainedLangStringSet` where each value is a :class:`~.ShortNameType`. - See also: :func:`~aas.model._string_constraints.check_short_name_type` + See also: ``_string_constraints.check_short_name_type`` """ def __init__(self, dict_: Dict[str, str]): super().__init__(dict_, _string_constraints.check_short_name_type) @@ -385,9 +385,9 @@ class Key: """ A key is a reference to an element by its id. - :ivar type_: Denote which kind of entity is referenced. In case type = :attr:`~.KeyTypes.GLOBAL_REFERENCE` then - the element is a global unique id. In all other cases the key references a model element of the same or - of another AAS. The name of the model element is explicitly listed. + :ivar type: Denote which kind of entity is referenced. In case type = :attr:`~.KeyTypes.GLOBAL_REFERENCE` then + the element is a global unique id. In all other cases the key references a model element of the same or + of another AAS. The name of the model element is explicitly listed. :ivar value: The key value, for example an IRDI or IRI """ @@ -422,7 +422,7 @@ def __eq__(self, other: object) -> bool: def __hash__(self): return hash((self.value, self.type)) - def get_identifier(self) -> Optional["Identifier"]: + def get_identifier(self) -> Optional[Identifier]: """ Get an :class:`~.Identifier` object corresponding to this key, if it is an identifiable key. @@ -463,6 +463,7 @@ def from_referable(referable: "Referable") -> "Key": return Key(key_type, referable.id_short) +# test comment _NSO = TypeVar('_NSO', bound=Union["Referable", "Qualifier", "HasSemantics", "Extension"]) @@ -578,15 +579,18 @@ class Referable(HasExtension, metaclass=abc.ABCMeta): <> - *Constraint AASd-001:* In case of a referable element not being an identifiable element the - idShort is mandatory and used for referring to the element in its name space. - *Constraint AASd-002:* idShort shall only feature letters, digits, underscore ("_"); starting - mandatory with a letter. - *Constraint AASd-004:* Add parent in case of non identifiable elements. - *Constraint AASd-022:* idShort of non-identifiable referables shall be unique in its namespace (case-sensitive) + **Constraint AASd-001:** In case of a referable element not being an identifiable element the + idShort is mandatory and used for referring to the element in its name space. + + **Constraint AASd-002:** idShort shall only feature letters, digits, underscore ("_"); starting + mandatory with a letter. + + **Constraint AASd-004:** Add parent in case of non identifiable elements. + + **Constraint AASd-022:** idShort of non-identifiable referables shall be unique in its namespace (case-sensitive) :ivar _id_short: Identifying string of the element within its name space - :ivar ~.category: The category is a value that gives further meta information w.r.t. to the class of the element. + :ivar category: The category is a value that gives further meta information w.r.t. to the class of the element. It affects the expected existence of attributes and the applicability of constraints. :ivar description: Description or comments on the element. :ivar parent: Reference (in form of a :class:`~.UniqueIdShortNamespace`) to the next referable parent element @@ -859,8 +863,8 @@ class Reference(metaclass=abc.ABCMeta): <> - *Constraint AASd-121:* For References the value of Key/type of the first key of Reference/keys shall be one of - GloballyIdentifiables. + **Constraint AASd-121:** For References the value of Key/type of the first key of Reference/keys shall be one of + GloballyIdentifiables. :ivar key: Ordered list of unique reference in its name space, each key referencing an element. The complete list of keys may for example be concatenated to a path that then gives unique access to an element @@ -903,11 +907,12 @@ class ExternalReference(Reference): A reference is an ordered list of keys, each key referencing an element. The complete list of keys may for example be concatenated to a path that then gives unique access to an element or entity. - *Constraint AASd-122:* For external references, i.e. References with Reference/type = ExternalReference, - the value of Key/type of the first key of Reference/keys shall be one of GenericGloballyIdentifiables. - *Constraint AASd-124:* For external references, i.e. References with Reference/type = ExternalReference, - the last key of Reference/keys shall be either one of GenericGloballyIdentifiables - or one of GenericFragmentKeys. + **Constraint AASd-122:** For external references, i.e. References with Reference/type = ExternalReference, + the value of Key/type of the first key of Reference/keys shall be one of GenericGloballyIdentifiables. + + **Constraint AASd-124:** For external references, i.e. References with Reference/type = ExternalReference, + the last key of Reference/keys shall be either one of GenericGloballyIdentifiables + or one of GenericFragmentKeys. :ivar key: Ordered list of unique reference in its name space, each key referencing an element. The complete list of keys may for example be concatenated to a path that then gives unique access to an element @@ -936,26 +941,30 @@ class ModelReference(Reference, Generic[_RT]): This is a special construct of the implementation to allow typed references and de-referencing. - *Constraint AASd-123:* For model references, i.e. References with Reference/type = ModelReference, - the value of Key/type of the first key of Reference/keys shall be one of AasIdentifiables. - *Constraint AASd-125:* For model references, i.e. References with Reference/type = ModelReference with more than - one key in Reference/keys, the value of Key/type of each of the keys following the first key of Reference/keys - shall be one of FragmentKeys. - *Constraint AASd-126:* For model references, i.e. References with Reference/type = ModelReference with more than - one key in Reference/keys, the value of Key/type of the last Key in the reference key chain may be one of - GenericFragmentKeys, or no key at all shall have a value out of GenericFragmentKeys. - *Constraint AASd-127:* For model references, i.e. References with Reference/type = ModelReference with more than - one key in Reference/keys, a key with Key/type FragmentReference shall be preceded by a key with Key/type - File or Blob. All other AAS fragments, i.e. Key/type values out of AasSubmodelElements, - do not support fragments. - *Constraint AASd-128:* For model references the Key/value of a Key preceded by a Key with - Key/type=SubmodelElementList is an integer number denoting the position in the array of the - submodel element list. + **Constraint AASd-123:** For model references, i.e. References with Reference/type = ModelReference, + the value of Key/type of the first key of Reference/keys shall be one of AasIdentifiables. + + **Constraint AASd-125:** For model references, i.e. References with Reference/type = ModelReference with more than + one key in Reference/keys, the value of Key/type of each of the keys following the first key of Reference/keys + shall be one of FragmentKeys. + + **Constraint AASd-126:** For model references, i.e. References with Reference/type = ModelReference with more than + one key in Reference/keys, the value of Key/type of the last Key in the reference key chain may be one of + GenericFragmentKeys, or no key at all shall have a value out of GenericFragmentKeys. + + **Constraint AASd-127:** For model references, i.e. References with Reference/type = ModelReference with more than + one key in Reference/keys, a key with Key/type FragmentReference shall be preceded by a key with Key/type + File or Blob. All other AAS fragments, i.e. Key/type values out of AasSubmodelElements, + do not support fragments. + + **Constraint AASd-128:** For model references the Key/value of a Key preceded by a Key with + Key/type=SubmodelElementList is an integer number denoting the position in the array of the + submodel element list. :ivar key: Ordered list of unique :class:`Keys <.Key>` in its name space, each key referencing an element. The complete list of keys may for example be concatenated to a path that then gives unique access to an element or entity. - :ivar ~.type: The type of the referenced object (additional parameter, not from the AAS Metamodel) + :ivar type: The type of the referenced object (additional parameter, not from the AAS Metamodel) *Initialization parameter:* `type_` :ivar referred_semantic_id: SemanticId of the referenced model element. For external references there typically is no semantic id. @@ -1121,12 +1130,10 @@ class DataSpecificationContent: which additional attributes shall be added to the element instance that references the data specification template and meta information about the template itself. - *Constraint AASc-3a-050:* If the `Data_specification_IEC_61360` is used - for an element, the value of `Has_data_specification.embedded_data_specifications` - shall contain the external reference to the IRI of the corresponding data specification - template - https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0 - + **Constraint AASc-3a-050:** If the `Data_specification_IEC_61360` is used + for an element, the value of ``HasDataSpecification.embedded_data_specifications`` + shall contain the external reference to the IRI of the corresponding data specification + template ``https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0`` """ @abc.abstractmethod def __init__(self): @@ -1178,26 +1185,25 @@ class AdministrativeInformation(HasDataSpecification): """ Administrative meta-information for an element like version information. - *Constraint AASd-005:* If AdministrativeInformation/version is not specified then also - AdministrativeInformation/revision shall be unspecified. This means, a revision - requires a version. if there is no version there is no revision neither. Revision is - optional. + **Constraint AASd-005:** If AdministrativeInformation/version is not specified then also + AdministrativeInformation/revision shall be unspecified. This means, a revision + requires a version. if there is no version there is no revision neither. Revision is + optional. :ivar version: Version of the element. :ivar revision: Revision of the element. :ivar creator: The subject ID of the subject responsible for making the element :ivar template_id: Identifier of the template that guided the creation of the element + :ivar embedded_data_specifications: List of Embedded data specification. + used by the element. - *Note:* In case of a submodel, the template ID is the identifier of the submodel template that guided the - creation of the submodel. - - *Note:* The submodel template ID is not relevant for validation. Here, the Submodel/semanticId shall be used + **Note:** In case of a submodel, the template ID is the identifier of the submodel template that guided the + creation of the submodel. - *Note:* Usage of the template ID is not restricted to submodel instances. - The creation of submodel templates can also be guided by another submodel template. + **Note:** The submodel template ID is not relevant for validation. Here, the Submodel/semanticId shall be used - :ivar embedded_data_specifications: List of Embedded data specification. - used by the element. + **Note:** Usage of the template ID is not restricted to submodel instances. + The creation of submodel templates can also be guided by another submodel template. """ def __init__(self, @@ -1250,12 +1256,12 @@ def __repr__(self) -> str: @_string_constraints.constrain_identifier("id") class Identifiable(Referable, metaclass=abc.ABCMeta): """ - An element that has a globally unique :class:`~.Identifier`. + An element that has a globally unique :class:`Identifier`. <> :ivar administration: :class:`~.AdministrativeInformation` of an identifiable element. - :ivar ~.id: The globally unique id of the element. + :ivar id: The globally unique id of the element. """ @abc.abstractmethod def __init__(self) -> None: @@ -1274,19 +1280,19 @@ def __repr__(self) -> str: class ConstrainedList(MutableSequence[_T], Generic[_T]): """ A type of list that can be constrained by hooks, useful when implementing AASd constraints. This list can be - initialized with an `item_add_hook`, `item_set_hook` and an `item_del_hook`. + initialized with an ``item_add_hook``, ``item_set_hook`` and an ``item_del_hook``. The item_add_hook is called every time an item is added to the list. It is passed the item that is added and all items currently contained in the list. - The `item_set_hook` is called every time one or multiple items are overwritten with one or multiple new items, à la - `list[i] = new_item` or `list[i:j] = new_items`. It is passed the item(s) about to replaced, the new item(s) and all + The ``item_set_hook`` is called every time one or multiple items are overwritten with one or multiple new items, à la + ``list[i] = new_item`` or ``list[i:j] = new_items``. It is passed the item(s) about to replaced, the new item(s) and all items currently contained in the list. - Note that this can also be used to clear the list, e.g. `list[:] = []`. Thus, to ensure that a list is never empty, - `item_set_hook` must be used in addition to `item_del_hook`. + Note that this can also be used to clear the list, e.g. ``list[:] = []``. Thus, to ensure that a list is never empty, + ``item_set_hook`` must be used in addition to ``item_del_hook``. - Finally, `item_del_hook` is called whenever an item is removed from the list, (e.g. via `.remove()`, `.pop()` or - `del list[i]`. It is passed the item about to be deleted and the current list elements. + Finally, ``item_del_hook`` is called whenever an item is removed from the list, (e.g. via ``.remove()``, ``.pop()`` or + ``del list[i]``. It is passed the item about to be deleted and the current list elements. """ def __init__(self, items: Iterable[_T], item_add_hook: Optional[Callable[[_T, List[_T]], None]] = None, @@ -1577,10 +1583,11 @@ class Qualifier(HasSemantics): """ A qualifier is a type-value pair that makes additional statements w.r.t. the value of the element. - *Constraint AASd-006:* If both, the value and the valueId of a Qualifier are present, the value needs - to be identical to the value of the referenced coded value in Qualifier/valueId. - *Constraint AASd-020:* The value of Qualifier/value shall be consistent with the - data type as defined in Qualifier/valueType. + **Constraint AASd-006:** If both, the value and the valueId of a Qualifier are present, the value needs + to be identical to the value of the referenced coded value in Qualifier/valueId. + + **Constraint AASd-020:** The value of Qualifier/value shall be consistent with the + data type as defined in Qualifier/valueType. :ivar type: The type (:class:`~.QualifierType`) of the qualifier that is applied to the element. :ivar value_type: Data type (:class:`~.DataTypeDefXsd`) of the qualifier value @@ -1683,7 +1690,7 @@ class UniqueIdShortNamespace(Namespace, metaclass=abc.ABCMeta): Abstract baseclass for all objects which form a Namespace to hold :class:`~.Referable` objects and resolve them by their id_short. - A Namespace can contain multiple :class:`NamespaceSets <~.NamespaceSet>`, which contain :class:`~.Referable` objects + A Namespace can contain multiple :class:`NamespaceSets `, which contain :class:`~.Referable` objects of different types. However, the id_short of each object must be unique across all NamespaceSets of one Namespace. diff --git a/basyx/aas/model/concept.py b/basyx/aas/model/concept.py index 8f1a20730..d3b14a237 100644 --- a/basyx/aas/model/concept.py +++ b/basyx/aas/model/concept.py @@ -5,8 +5,7 @@ # # SPDX-License-Identifier: MIT """ -This module contains the class :class:`~.ConceptDescription` from the AAS meta model -as well as specialized :class:`ConceptDescriptions <.ConceptDescription>` like :class:`~.IEC61360ConceptDescription`. +This module contains the class :class:`~.ConceptDescription` from the AAS meta model. """ from typing import Optional, Set, Iterable, List @@ -35,10 +34,9 @@ class ConceptDescription(base.Identifiable, base.HasDataSpecification): The description of the concept should follow a standardized schema (realized as data specification template). - *Note:* Compare :attr:`~.ConceptDescription.is_case_of` to is-case-of relationship in ISO 13584-32 & IEC EN 61360 + *Note:* Compare ``is_case_of`` to is-case-of relationship in ISO 13584-32 & IEC EN 61360 - :ivar ~.id: The globally unique id of the element. (inherited from - :class:`~basyx.aas.model.base.Identifiable`) + :ivar id: The globally unique id of the element. (inherited from :class:`~basyx.aas.model.base.Identifiable`) :ivar is_case_of: Unordered list of global :class:`References ` to external definitions the concept is compatible to or was derived from. :ivar id_short: Identifying string of the element within its name space. (inherited from diff --git a/basyx/aas/model/datatypes.py b/basyx/aas/model/datatypes.py index aac5b1a6d..24c0a0ab5 100644 --- a/basyx/aas/model/datatypes.py +++ b/basyx/aas/model/datatypes.py @@ -15,7 +15,7 @@ There are three conversion functions for usage in BaSyx Python SDK's model and adapters: -* :meth:`~aas.model.datatypes.xsd_repr` serializes any XSD type from this module into it's lexical representation +* :meth:`~basyx.aas.model.datatypes.xsd_repr` serializes any XSD type from this module into it's lexical representation * :meth:`~basyx.aas.model.datatypes.from_xsd` parses an XSD type from its lexical representation (its required to name the type for unambiguous conversion) * :meth:`~basyx.aas.model.datatypes.trivial_cast` type-cast a python value into an XSD type, if this is trivially possible. @@ -403,9 +403,9 @@ def trivial_cast(value, type_: Type[AnyXSDType]) -> AnyXSDType: # workaround. W However, we want to stay strongly typed, so we only allow this type-cast if it is trivial to do, i.e. does not change the value's semantics. Examples, where this holds true: - * int → :class:`basyx.aas.model.datatypes.Int` (if the value is in the expected range) - * bytes → :class:`basyx.aas.model.datatypes.Base64Binary` - * datetime.date → :class:`aas.model.datatypes.Date` + * int → :class:`~basyx.aas.model.datatypes.Int` (if the value is in the expected range) + * bytes → :class:`~basyx.aas.model.datatypes.Base64Binary` + * datetime.date → :class:`~basyx.aas.model.datatypes.Date` Yet, it is not allowed to cast float → :class:`basyx.aas.model.datatypes.Int`. diff --git a/basyx/aas/model/submodel.py b/basyx/aas/model/submodel.py index 656370735..290f35617 100644 --- a/basyx/aas/model/submodel.py +++ b/basyx/aas/model/submodel.py @@ -89,8 +89,7 @@ class Submodel(base.Identifiable, base.HasSemantics, base.HasKind, base.Qualifia into distinguishable parts. Each submodel refers to a well-defined domain or subject matter. Submodels can become standardized and thus become submodel types. Submodels can have different life-cycles. - :ivar ~.id: The globally unique id of the element. - (inherited from :class:`~basyx.aas.model.base.Identifiable`) + :ivar id: The globally unique id of the element. (inherited from :class:`~basyx.aas.model.base.Identifiable`) :ivar submodel_element: Unordered list of :class:`SubmodelElements <.SubmodelElement>` :ivar id_short: Identifying string of the element within its name space. (inherited from :class:`~basyx.aas.model.base.Referable`) @@ -110,7 +109,7 @@ class Submodel(base.Identifiable, base.HasSemantics, base.HasKind, base.Qualifia :ivar qualifier: Unordered list of Qualifiers that gives additional qualification of a qualifiable element. (from :class:`~basyx.aas.model.base.Qualifiable`) :ivar kind: Kind of the element: Either `TYPE` or `INSTANCE`. Default is `INSTANCE`. (inherited from - :class:`aas.model.base.HasKind`) + :class:`~basyx.aas.model.base.HasKind`) :ivar extension: An extension of the element. (inherited from :class:`basyx.aas.model.base.HasExtension`) :ivar supplemental_semantic_id: Identifier of a supplemental semantic definition of the element. It is called @@ -937,7 +936,7 @@ class Operation(SubmodelElement, base.UniqueIdShortNamespace): In- and output variables are implemented as :class:`SubmodelElements <.SubmodelElement>` directly without the wrapping `OperationVariable`. This makes implementing *Constraint AASd-134* much easier since we can just use normal - :class:`NamespaceSets <~basyx.aas.model.base.NamespaceSet>`. Furthermore, an `OperationVariable` contains nothing besides + :class:`NamespaceSets `. Furthermore, an `OperationVariable` contains nothing besides a single :class:`~.SubmodelElement` anyway, so implementing it would just make using `Operations` more tedious for no reason. @@ -1046,8 +1045,8 @@ class Entity(SubmodelElement, base.UniqueIdShortNamespace): """ An entity is a :class:`~.SubmodelElement` that is used to model entities - *Constraint AASd-014:* global_asset_id or specific_asset_id must be set if :attr:`~.entity_type` is set to - :attr:`~.EntityType.SELF_MANAGED_ENTITY`. They must be empty otherwise. + *Constraint AASd-014:* global_asset_id or specific_asset_id must be set if ``entity_type`` is set to + :class:`SELF_MANAGED_ENTITY `. They must be empty otherwise. :ivar id_short: Identifying string of the element within its name space. (inherited from :class:`~basyx.aas.model.base.Referable`) diff --git a/basyx/aas/util/__init__.py b/basyx/aas/util/__init__.py index 834214561..1b85151c2 100644 --- a/basyx/aas/util/__init__.py +++ b/basyx/aas/util/__init__.py @@ -1,9 +1,9 @@ """ This package provides helpful utilities for working with a python based AAS model. -`identification.py`: +:mod:`.identification`: Generate :class:`Identifiers ` -`traversal.py`: +:mod:`.traversal`: A module with helper functions for traversing AAS object structures. """ diff --git a/basyx/aas/util/identification.py b/basyx/aas/util/identification.py index 858b0f4bf..5d4ffb45d 100644 --- a/basyx/aas/util/identification.py +++ b/basyx/aas/util/identification.py @@ -69,7 +69,7 @@ class NamespaceIRIGenerator(AbstractIdentifierGenerator): :ivar namespace: The IRI Namespace to generate Identifiers in. It must be a valid IRI (starting with a scheme) and end on either #, /, or = to form a reasonable namespace. - :ivar ~.provider: An :class:`~basyx.aas.model.provider.AbstractObjectProvider` to check existence of + :ivar provider: An :class:`~basyx.aas.model.provider.AbstractObjectProvider` to check existence of :class:`Identifiers ` """ def __init__(self, namespace: str, provider: model.AbstractObjectProvider): diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css new file mode 100644 index 000000000..8952b3e62 --- /dev/null +++ b/docs/source/_static/custom.css @@ -0,0 +1,9 @@ +@import 'css/theme.css'; + +/* Fix white-space wrapping in tables. + * See https://github.com/readthedocs/sphinx_rtd_theme/issues/1505 + * This is included via html_static_path and html_style in conf.py + */ +.wy-table-responsive table td { + white-space: normal; +} diff --git a/docs/source/adapter/aasx.rst b/docs/source/adapter/aasx.rst index 3062c603b..c520a48b3 100644 --- a/docs/source/adapter/aasx.rst +++ b/docs/source/adapter/aasx.rst @@ -1,5 +1,5 @@ -adapter.aasx - Read and write AASX-files -======================================== +aasx - Read and write AASX-files +================================ .. automodule:: basyx.aas.adapter.aasx :members: diff --git a/docs/source/adapter/index.rst b/docs/source/adapter/index.rst index f24ad4960..ca07aeb57 100644 --- a/docs/source/adapter/index.rst +++ b/docs/source/adapter/index.rst @@ -1,7 +1,7 @@ -adapter: Adapter of AAS-objects from and to different file-formats -================================================================== +basyx.aas.adapter: Adapter of AAS-objects from and to different file-formats +============================================================================ -.. automodule:: basyx.aas.adapter.__init__ +.. automodule:: basyx.aas.adapter :members: .. toctree:: diff --git a/docs/source/adapter/json.rst b/docs/source/adapter/json.rst index 737b6e2a0..162ed88ae 100644 --- a/docs/source/adapter/json.rst +++ b/docs/source/adapter/json.rst @@ -1,19 +1,19 @@ -adapter.json - JSON serialization and deserialization -===================================================== +json - JSON serialization and deserialization +============================================= -.. automodule:: basyx.aas.adapter.json.__init__ +.. automodule:: basyx.aas.adapter.json :members: -adapter.json.json_serialization: JSON serialization of AAS objects -################################################################## +json.json_serialization: JSON serialization of AAS objects +########################################################## .. automodule:: basyx.aas.adapter.json.json_serialization :members: -adapter.json.json_deserialization: JSON deserialization into AAS objects -######################################################################## +json.json_deserialization: JSON deserialization into AAS objects +################################################################ .. automodule:: basyx.aas.adapter.json.json_deserialization :members: diff --git a/docs/source/adapter/xml.rst b/docs/source/adapter/xml.rst index 0fb3f9f0d..f4d5dc72d 100644 --- a/docs/source/adapter/xml.rst +++ b/docs/source/adapter/xml.rst @@ -1,31 +1,20 @@ -adapter.xml - XML serialization and deserialization -=================================================== +xml - XML serialization and deserialization +=========================================== -.. automodule:: basyx.aas.adapter.xml.__init__ +.. automodule:: basyx.aas.adapter.xml :members: -adapter.xml.xml_serialization - Serialization from AAS-objects to XML -##################################################################### + +xml.xml_serialization - Serialization from AAS-objects to XML +############################################################# .. automodule:: basyx.aas.adapter.xml.xml_serialization .. autofunction:: basyx.aas.adapter.xml.xml_serialization.write_aas_xml_file -adapter.xml.xml_deserialization - Deserialization from XML to AAS-objects -######################################################################### - -.. automodule:: basyx.aas.adapter.xml.xml_deserialization - -.. autoclass:: basyx.aas.adapter.xml.xml_deserialization.AASFromXmlDecoder - -.. autoclass:: basyx.aas.adapter.xml.xml_deserialization.StrictAASFromXmlDecoder -.. autoclass:: basyx.aas.adapter.xml.xml_deserialization.StrippedAASFromXmlDecoder +xml.xml_deserialization - Deserialization from XML to AAS-objects +################################################################# -.. autoclass:: basyx.aas.adapter.xml.xml_deserialization.StrictStrippedAASFromXmlDecoder - -.. autofunction:: basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file - -.. autofunction:: basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_file_into - -.. autofunction:: basyx.aas.adapter.xml.xml_deserialization.read_aas_xml_element +.. automodule:: basyx.aas.adapter.xml.xml_deserialization + :members: diff --git a/docs/source/backend/backends.rst b/docs/source/backend/backends.rst index 58c5323bb..2a5160033 100644 --- a/docs/source/backend/backends.rst +++ b/docs/source/backend/backends.rst @@ -1,5 +1,5 @@ -aas.backend.backends - Base class and functionality for Backends -================================================================ +backends - Base class and functionality for Backends +==================================================== .. automodule:: basyx.aas.backend.backends :members: diff --git a/docs/source/backend/couchdb.rst b/docs/source/backend/couchdb.rst index e46e085d7..2cc0be3f9 100644 --- a/docs/source/backend/couchdb.rst +++ b/docs/source/backend/couchdb.rst @@ -1,6 +1,5 @@ -aas.backend.couchdb - Store and Retrieve AAS-objects in an CouchDB Backend -========================================================================== - +couchdb - Store and Retrieve AAS-objects in a CouchDB +===================================================== .. automodule:: basyx.aas.backend.couchdb :members: diff --git a/docs/source/backend/index.rst b/docs/source/backend/index.rst index 1b9591eda..232867818 100644 --- a/docs/source/backend/index.rst +++ b/docs/source/backend/index.rst @@ -1,7 +1,7 @@ -aas.backend - Storing and Retrieving of AAS-objects in Backends -=============================================================== +basyx.aas.backend - Storing and Retrieving of AAS-objects in Backends +===================================================================== -.. automodule:: basyx.aas.backend.__init__ +.. automodule:: basyx.aas.backend .. toctree:: :maxdepth: 2 @@ -9,3 +9,4 @@ aas.backend - Storing and Retrieving of AAS-objects in Backends backends couchdb + local_file diff --git a/docs/source/backend/local_file.rst b/docs/source/backend/local_file.rst new file mode 100644 index 000000000..9765b893a --- /dev/null +++ b/docs/source/backend/local_file.rst @@ -0,0 +1,5 @@ +local_file - Store and Retrieve AAS-objects as JSON Files +========================================================= + +.. automodule:: basyx.aas.backend.local_file + :members: diff --git a/docs/source/compliance_tool/compliance_check_aasx.rst b/docs/source/compliance_tool/compliance_check_aasx.rst index fd1858d62..8de033299 100644 --- a/docs/source/compliance_tool/compliance_check_aasx.rst +++ b/docs/source/compliance_tool/compliance_check_aasx.rst @@ -1,5 +1,5 @@ -aas.compliance_tool.compliance_check_aasx - Check AASX-File compliance -====================================================================== +compliance_check_aasx - Check AASX-File compliance +================================================== .. automodule:: basyx.aas.compliance_tool.compliance_check_aasx :members: diff --git a/docs/source/compliance_tool/compliance_check_json.rst b/docs/source/compliance_tool/compliance_check_json.rst index 404d3f5f6..b52673daa 100644 --- a/docs/source/compliance_tool/compliance_check_json.rst +++ b/docs/source/compliance_tool/compliance_check_json.rst @@ -1,5 +1,5 @@ -aas.compliance_tool.compliance_check_json - Check JSON-File compliance -====================================================================== +compliance_check_json - Check JSON-File compliance +================================================== .. automodule:: basyx.aas.compliance_tool.compliance_check_json :members: diff --git a/docs/source/compliance_tool/compliance_check_xml.rst b/docs/source/compliance_tool/compliance_check_xml.rst index a403a43e1..99f741f89 100644 --- a/docs/source/compliance_tool/compliance_check_xml.rst +++ b/docs/source/compliance_tool/compliance_check_xml.rst @@ -1,5 +1,5 @@ -aas.compliance_tool.compliance_check_xml - Check XML-File compliance -==================================================================== +compliance_check_xml - Check XML-File compliance +================================================ .. automodule:: basyx.aas.compliance_tool.compliance_check_xml :members: diff --git a/docs/source/compliance_tool/index.rst b/docs/source/compliance_tool/index.rst index e5d28ea5c..6f8fb1b3a 100644 --- a/docs/source/compliance_tool/index.rst +++ b/docs/source/compliance_tool/index.rst @@ -1,5 +1,5 @@ -aas.compliance_tool - Tool for Creating and Checking JSON, XML and AASX Files' compliance -========================================================================================= +basyx.aas.compliance_tool - Tool for Creating and Checking JSON, XML and AASX Files' compliance +=============================================================================================== .. argparse:: :module: basyx.aas.compliance_tool.cli diff --git a/docs/source/compliance_tool/state_manager.rst b/docs/source/compliance_tool/state_manager.rst index 3399294ff..9538b5762 100644 --- a/docs/source/compliance_tool/state_manager.rst +++ b/docs/source/compliance_tool/state_manager.rst @@ -1,5 +1,5 @@ -aas.compliance_tool.state_manager - Store LogRecords in a Compliance Check of the Compliance Tool -================================================================================================= +state_manager - Store LogRecords in a Compliance Check of the Compliance Tool +============================================================================= .. automodule:: basyx.aas.compliance_tool.state_manager :members: diff --git a/docs/source/conf.py b/docs/source/conf.py index b2db97a58..5d47a6701 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,7 +14,6 @@ import sys import datetime - sys.path.insert(0, os.path.abspath('../..')) @@ -37,6 +36,7 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.coverage', + 'sphinx.ext.intersphinx', 'sphinx_rtd_theme', 'sphinxarg.ext' ] @@ -49,6 +49,15 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] +# Mapping for correctly linking other module documentations. +intersphinx_mapping = { + 'python': ('https://docs.python.org/3', None), + 'dateutil': ('https://dateutil.readthedocs.io/en/stable/', None) +} + +# Don't prepend the name of the current module to all classes. +add_module_names = False + # -- Options for HTML output ------------------------------------------------- @@ -60,4 +69,18 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = [] +html_static_path = ['_static'] + +# Fix white-space wrapping in tables. +# See https://github.com/readthedocs/sphinx_rtd_theme/issues/1505 +# Once fixed, this can be removed and '_static' can be removed from html_static_path. +html_style = 'custom.css' + +# Configuration of the 'Edit on GitHub' button at the top right. +html_context = { + 'display_github': True, + 'github_user': 'eclipse-basyx', + 'github_repo': 'basyx-python-sdk', + 'github_version': release, + 'conf_py_path': '/docs/source/' +} diff --git a/docs/source/constraints.rst b/docs/source/constraints.rst index 25680ab32..fcd5916ee 100644 --- a/docs/source/constraints.rst +++ b/docs/source/constraints.rst @@ -12,7 +12,7 @@ The status information means the following: * WIP: The Constraint enforcement will be implemented in the future In most cases, if a constraint violation is detected, -an :class:`~aas.model.base.AASConstraintViolation` will be raised +an :class:`~basyx.aas.model.base.AASConstraintViolation` will be raised .. |aasd002| replace:: ``idShort`` of ``Referable`` s shall only feature letters, digits, underscore ("_"); starting mandatory with a letter, i.e. [a-zA-Z][a-zA-Z0-9_]* . .. |aasd005| replace:: If ``AdministrativeInformation/version`` is not specified, ``AdministrativeInformation/revision`` shall also be unspecified. This means that a revision requires a version. If there is no version, there is no revision. Revision is optional. @@ -32,7 +32,7 @@ an :class:`~aas.model.base.AASConstraintViolation` will be raised .. |aasd109| replace:: If ``SubmodelElementList/typeValueListElement`` is equal to ``Property`` or ``Range,`` ``SubmodelElementList/valueTypeListElement`` shall be set and all first level child elements in the ``SubmodelElementList`` shall have the value type as specified in ``SubmodelElementList/valueTypeListElement``. .. |aasd114| replace:: If two first level child elements in a ``SubmodelElementList`` have a ``semanticId``, they shall be identical. .. |aasd115| replace:: If a first level child element in a ``SubmodelElementList`` does not specify a ``semanticId``, the value is assumed to be identical to ``SubmodelElementList/semanticIdListElement``. -.. |aasd116| replace:: "``globalAssetId``" (case-insensitive) is a reserved key. If used as value for ``SpecificAssetId/name,`` ``SpecificAssetId/value`` shall be identical to ``AssetInformation/globalAssetId``. +.. |aasd116| replace:: ``globalAssetId`` (case-insensitive) is a reserved key. If used as value for ``SpecificAssetId/name,`` ``SpecificAssetId/value`` shall be identical to ``AssetInformation/globalAssetId``. .. |aasd117| replace:: ``idShort`` of non-identifiable ``Referable``s not being a direct child of a ``SubmodelElementList`` shall be specified. .. |aasd118| replace:: If a supplemental semantic ID (``HasSemantics/supplementalSemanticId``) is defined, there shall also be a main semantic ID (``HasSemantics/semanticId``). .. |aasd119| replace:: If any ``Qualifier/kind`` value of a ``Qualifiable/qualifier`` is equal to ``TemplateQualifier`` and the qualified element inherits from "``hasKind"``, the qualified element shall be of kind ``Template`` (``HasKind/kind = "Template"``). @@ -96,11 +96,10 @@ an :class:`~aas.model.base.AASConstraintViolation` will be raised AASd-127, |aasd127|, ✅, AASd-128, |aasd128|, ✅, AASd-129, |aasd129|, ❌, See `#119 `_ - AASd-130, |aasd130|, ✅, Here a :class:`ValueError` instead of :class:`~aas.model.base.AASConstraintViolation` will be raised. + AASd-130, |aasd130|, ✅, Here a :class:`ValueError` instead of :class:`~basyx.aas.model.base.AASConstraintViolation` will be raised. AASd-131, |aasd131|, ✅, AASd-133, |aasd133|, ✅, Enforced by the typechecker. See `#119 `_ AASd-134, |aasd134|, ✅, - AASc-003, |aasc003|, tbd AASc-004, |aasc004|, tbd AASc-005, |aasc005|, tbd diff --git a/docs/source/examples/example_aas.rst b/docs/source/examples/example_aas.rst index bb4d5bec2..19da99239 100644 --- a/docs/source/examples/example_aas.rst +++ b/docs/source/examples/example_aas.rst @@ -1,5 +1,5 @@ -aas.examples.data.example_aas - Create an example model.AssetAdministrationShell object -======================================================================================= +data.example_aas - Create an example model.AssetAdministrationShell object +========================================================================== .. automodule:: basyx.aas.examples.data.example_aas :members: diff --git a/docs/source/examples/example_aas_mandatory_attributes.rst b/docs/source/examples/example_aas_mandatory_attributes.rst index ada6644c4..28af4f05f 100644 --- a/docs/source/examples/example_aas_mandatory_attributes.rst +++ b/docs/source/examples/example_aas_mandatory_attributes.rst @@ -1,5 +1,5 @@ -aas.examples.data.example_aas_mandatory_attributes - AAS-objects that only contain mandatory attributes -======================================================================================================= +data.example_aas_mandatory_attributes - AAS-objects that only contain mandatory attributes +========================================================================================== .. automodule:: basyx.aas.examples.data.example_aas_mandatory_attributes :members: diff --git a/docs/source/examples/example_aas_missing_attributes.rst b/docs/source/examples/example_aas_missing_attributes.rst index e90da0cff..4bb537c6a 100644 --- a/docs/source/examples/example_aas_missing_attributes.rst +++ b/docs/source/examples/example_aas_missing_attributes.rst @@ -1,5 +1,5 @@ -aas.examples.data.example_aas_missing_attributes - AAS-objects containing non-mandatory attributes -================================================================================================== +data.example_aas_missing_attributes - AAS-objects containing non-mandatory attributes +===================================================================================== .. automodule:: basyx.aas.examples.data.example_aas_missing_attributes :members: diff --git a/docs/source/examples/example_concept_description.rst b/docs/source/examples/example_concept_description.rst deleted file mode 100644 index bf8c4e8fc..000000000 --- a/docs/source/examples/example_concept_description.rst +++ /dev/null @@ -1,5 +0,0 @@ -aas.examples.data.example_concept_description - Create an example ConceptDescription -==================================================================================== - -.. automodule:: basyx.aas.examples.data.example_concept_description - :members: diff --git a/docs/source/examples/example_submodel_template.rst b/docs/source/examples/example_submodel_template.rst index 5fc947bad..5e4fe6280 100644 --- a/docs/source/examples/example_submodel_template.rst +++ b/docs/source/examples/example_submodel_template.rst @@ -1,5 +1,5 @@ -aas.examples.data.example_submodel_template - Create an Example Submodel Template -================================================================================= +data.example_submodel_template - Create an Example Submodel Template +==================================================================== .. automodule:: basyx.aas.examples.data.example_submodel_template :members: diff --git a/docs/source/examples/index.rst b/docs/source/examples/index.rst index bf6c7f497..1f3dc202c 100644 --- a/docs/source/examples/index.rst +++ b/docs/source/examples/index.rst @@ -1,5 +1,5 @@ -aas.examples - Example classes -============================== +basyx.aas.examples - Example classes +==================================== .. toctree:: :maxdepth: 2 diff --git a/docs/source/index.rst b/docs/source/index.rst index 065c778ed..dd841abd1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -26,4 +26,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` -* :ref:`search` diff --git a/docs/source/model/aas.rst b/docs/source/model/aas.rst index 5160c5006..5b07a7ac2 100644 --- a/docs/source/model/aas.rst +++ b/docs/source/model/aas.rst @@ -1,5 +1,5 @@ -aas.model.aas - High-level structures -===================================== +aas - High-level structures +=========================== .. automodule:: basyx.aas.model.aas :members: diff --git a/docs/source/model/base.rst b/docs/source/model/base.rst index 7f2c3053d..7a1b563fd 100644 --- a/docs/source/model/base.rst +++ b/docs/source/model/base.rst @@ -1,19 +1,38 @@ -aas.model.base - Abstract Classes and Basic Structures -====================================================== +base - Abstract Classes and Basic Structures +============================================ .. automodule:: basyx.aas.model.base :members: -.. class:: LangStringSet - A dict of language-Identifier (according to ISO 639-1 and ISO 3166-1) and string in this language. - The meaning of the string in each language is the same. +Constrained String Datatypes +---------------------------- - <> +These types are aliases of :class:`str` and constrained by a setter where used. - Example: ["en-US", "germany"] +.. autoclass:: ContentType +.. autoclass:: Identifier +.. autoclass:: LabelType +.. autoclass:: MessageTopicType +.. autoclass:: NameType +.. autoclass:: PathType +.. autoclass:: QualifierType +.. autoclass:: RevisionType +.. autoclass:: ShortNameType +.. autoclass:: VersionType +.. autoclass:: ValueTypeIEC61360 -.. class:: ValueList +Type Aliases +------------ +.. autoclass:: DataTypeDefXsd +.. autoclass:: ValueDataType +.. autoclass:: ValueList +.. autoclass:: BlobType - A Set of :class:`ValueReferencePairs ` + +Type Variables +-------------- +.. autoclass:: _NSO +.. autoclass:: _T +.. autoclass:: _RT \ No newline at end of file diff --git a/docs/source/model/concept.rst b/docs/source/model/concept.rst index 25f34df20..e893eddd2 100644 --- a/docs/source/model/concept.rst +++ b/docs/source/model/concept.rst @@ -1,5 +1,5 @@ -aas.model.concept - ConceptDescription and Dictionary -===================================================== +concept - ConceptDescription and Dictionary +=========================================== .. automodule:: basyx.aas.model.concept :members: diff --git a/docs/source/model/datatypes.rst b/docs/source/model/datatypes.rst index 5a88c0b14..6a3729f74 100644 --- a/docs/source/model/datatypes.rst +++ b/docs/source/model/datatypes.rst @@ -1,5 +1,6 @@ -aas.model.datatypes - Native Python Datatypes for Simple XSD-types -================================================================== +datatypes - Native Python Datatypes for Simple XSD-types +======================================================== .. automodule:: basyx.aas.model.datatypes :members: + :undoc-members: diff --git a/docs/source/model/index.rst b/docs/source/model/index.rst index ba8bc8c4d..663926569 100644 --- a/docs/source/model/index.rst +++ b/docs/source/model/index.rst @@ -1,10 +1,10 @@ -aas.model - Python Model of the AssetAdministrationShell Metamodel -================================================================== +basyx.aas.model - Python Model of the AssetAdministrationShell Metamodel +======================================================================== -.. automodule:: basyx.aas.model.__init__ +.. automodule:: basyx.aas.model :members: -*Note:* Since the Class-Attributes usually have the same names as the `__init__`-constructor +*Note:* Since the Class-Attributes usually have the same names as the ``__init__``-constructor parameters, you can assume that you can use the attribute names listed in the documentation for initiating the class. If there is discrepancy between the two, it should be stated so. diff --git a/docs/source/model/provider.rst b/docs/source/model/provider.rst index 1e7002d15..8441673bc 100644 --- a/docs/source/model/provider.rst +++ b/docs/source/model/provider.rst @@ -1,5 +1,7 @@ -aas.model.provider - Providers for storing and retrieving AAS-objects -===================================================================== +provider - Providers for storing and retrieving AAS-objects +=========================================================== .. automodule:: basyx.aas.model.provider :members: + +.. autoclass:: _IT \ No newline at end of file diff --git a/docs/source/model/submodel.rst b/docs/source/model/submodel.rst index ba59d215d..6e4f6ae7c 100644 --- a/docs/source/model/submodel.rst +++ b/docs/source/model/submodel.rst @@ -1,5 +1,7 @@ -aas.model.submodel - Meta-model of the submodels and events -=========================================================== +submodel - Meta-model of the submodels and events +================================================= .. automodule:: basyx.aas.model.submodel :members: + +.. autoclass:: _SE \ No newline at end of file diff --git a/docs/source/util/identification.rst b/docs/source/util/identification.rst index 27c3eae98..18bad9a72 100644 --- a/docs/source/util/identification.rst +++ b/docs/source/util/identification.rst @@ -1,5 +1,5 @@ -aas.util.identification - Generate Identifiers -============================================== +identification - Generate Identifiers +===================================== .. automodule:: basyx.aas.util.identification :members: diff --git a/docs/source/util/index.rst b/docs/source/util/index.rst index 6004e4e61..f15a0755c 100644 --- a/docs/source/util/index.rst +++ b/docs/source/util/index.rst @@ -1,7 +1,7 @@ -aas.util - Provide helpful utilities -==================================== +basyx.aas.util - Provide helpful utilities +========================================== -.. automodule:: basyx.aas.util.__init__ +.. automodule:: basyx.aas.util :members: .. toctree:: diff --git a/docs/source/util/traversal.rst b/docs/source/util/traversal.rst index f0ade547b..5022cdcb1 100644 --- a/docs/source/util/traversal.rst +++ b/docs/source/util/traversal.rst @@ -1,5 +1,5 @@ -aas.util.traversal - Functions for Traversing AAS Object structures -=================================================================== +traversal - Functions for Traversing AAS Object structures +========================================================== .. automodule:: basyx.aas.util.traversal