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
  • !24

Merged
Created Apr 10, 2020 by Leon Mauritz Möller@leon.moellerDeveloper

adapter: add xml deserialization

  • Overview 4
  • Commits 32
  • Pipelines 7
  • Changes 4

This MR merges feature/xml_deserilization into master. It comes with deserialization tests and serialize + deserialize tests, just like the json module.

There's just one thing left to discuss, the problem I also mentioned in yesterday's meeting:
I'm using a TypedDict to pass the modeling kind of submodels and submodel elements to the respective constructor only when it's specified in the xml document, see _get_modeling_kind_kwarg(). I'm doing it this way because in my opinion defining the default modeling kind should be a task of the respective model constructors, not of the deserialization, since the default value is also only defined in the model part of Details of the Asset Administration Shell Part 1 (see chapter 4.7.2.3), not in the serialization/deserialization part.

The problem is, that I'm importing TypedDict from mypy_extensions, because it's only available from typing in python 3.8+. mypy is not a runtime dependency, thus I can't use mypy_extensions in code that is not for testing only.
An alternative would be to also just define the default modeling kind in the xml_deserialization, just like the json_deserialization does.

I'd like to hear your opinion on this, maybe you can come up with other alternatives.

The rest of this merge request is ready for code review btw.

Edited Apr 14, 2020 by Leon Mauritz Möller
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: feature/xml_deserialization