Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • PyI40AAS PyI40AAS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 47
    • Issues 47
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Lehrstuhl für Prozessleittechnik
  • PyI40AASPyI40AAS
  • Merge requests
  • !65

Merged
Created Nov 13, 2020 by Leon Mauritz Möller@leon.moellerDeveloper

Improve/model

  • Overview 1
  • Commits 9
  • Pipelines 13
  • Changes 23

Improve our implementation of the DotAAS metamodel by making abstract classes really abstract (so they can't be instantiated), removing the _-suffix of function parameters in the model and more. See commits for details.

When removing the underscore suffix from function parameters, I only removed the suffix from parameters that were keyword arguments, because the value of positional parameters is usual given without specifying the parameter name.
Thus a few parameters still have their _-suffix in the model:

$ grep -Pn "\w+_: " --exclude-dir=__pycache__ aas/model/*
aas/model/base.py:221:                 type_: KeyElements,
aas/model/base.py:228:        :param type_: Denote which kind of entity is referenced. In case type = GlobalReference then the element is a
aas/model/base.py:363:                 id_: str,
aas/model/base.py:368:        :param id_: Identifier of the element. Its type is defined in id_type.
aas/model/base.py:669:                 type_: Type[_RT]):
aas/model/base.py:676:        :param: type_: The type of the referenced object (additional parameter, not from the AAS Metamodel)
aas/model/base.py:685:    def resolve(self, provider_: "provider.AbstractObjectProvider") -> _RT:
aas/model/base.py:901:                 type_: QualifierType,
aas/model/base.py:909:        :param type_: The type of the qualifier that is applied to the element.
aas/model/base.py:1195:    def insert(self, index: int, object_: _RT) -> None:
aas/model/datatypes.py:401:def trivial_cast(value, type_: Type[AnyXSDType]) -> AnyXSDType:  # workaround. We should be able to use a TypeVar here
aas/model/datatypes.py:416:    :param type_: Target type to cast into. Must be an XSD type from this module
aas/model/datatypes.py:513:def from_xsd(value: str, type_: Type[AnyXSDType]) -> AnyXSDType:  # workaround. We should be able to use a TypeVar here
aas/model/datatypes.py:517:    :param type_: The expected XSD type (from this module). It is required to chose the correct conversion.

Let's discuss here whether we also want to remove the suffix of the type_ and id_ parameters in base.py. I checked, type() or id() isn't used in the respective scopes (only in datatypes.py).

Edited Nov 14, 2020 by Leon Mauritz Möller
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: improve/model