Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge main in feature/http_api #12

Merged
merged 16 commits into from
Mar 15, 2024
Merged

merge main in feature/http_api #12

merged 16 commits into from
Mar 15, 2024

Commits on Feb 18, 2024

  1. adapter.aasx: improve AASXWriter docstring

    Replace a block of text by an `attention` admonition to highlight it
    properly. Furthermore, add a missing comma.
    jkhsjdhjs authored and s-heppner committed Feb 18, 2024
    Configuration menu
    Copy the full SHA
    a902a63 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. model.base: move id_short validation to separate function

    ...so that it can be used by the HTTP API.
    jkhsjdhjs authored and s-heppner committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    d7a2283 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2024

  1. adapter.xml: change type of an exception to AssertionError

    The respective exception marks an error in the program, which should
    correctly be an `AssertionError`.
    jkhsjdhjs authored and s-heppner committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    2e7ed24 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aba79b1 View commit details
    Browse the repository at this point in the history
  3. adapter.xml: rename XMLConstructables.GLOBAL_REFERENCE

    `GlobalReference` has been renamed to `ExternalReference` in V3, but
    this enum member has been missed in the rename.
    jkhsjdhjs authored and s-heppner committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    7f9a7a9 View commit details
    Browse the repository at this point in the history
  4. adapter.{json,xml}: make (de-)serialization interfaces coherent

    lxml supports paths already, no modification is necessary there.
    However, the `lxml.etree.ElementTree.write()` function requires
    `BinaryIO`, i.e. files opened with the 'b' mode. While it would be
    possible to access the underlying binary buffer of files opened in text
    mode via `open()`, this isn't possible for `io.StringIO()`, as it
    doesn't have the `buffer` property. Thus, even if we could support files
    opened via `open()` in text mode, we couldn't annotate the XML
    serialization functions with `TextIO`, as `io.StringIO()` remains
    unsupported. Because of that, I decided to not support `TextIO` for the
    XML serialization.
    
    The builtin JSON module only supports file handles, with the
    `json.dump()` method only supporting `TextIO` and `json.load()`
    supporting `TextIO` and `BinaryIO`. Thus, the JSON adapter is modified
    to `open()` given paths, while the JSON serialization is additionally
    modified to wrap `BinaryIO` with `io.TextIOWrapper`.
    
    Fix #42
    jkhsjdhjs authored and s-heppner committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    4ff3db8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c25a32c View commit details
    Browse the repository at this point in the history
  6. test.adater.xml.test_xml_deserialization: simplify

    ... by using `StringIO` instead of `BytesIO`.
    jkhsjdhjs authored and s-heppner committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    670de59 View commit details
    Browse the repository at this point in the history
  7. test.adapter.json: add BytesIO test

    jkhsjdhjs authored and s-heppner committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    4cdcc24 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    51e8c3e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d32349c View commit details
    Browse the repository at this point in the history
  10. model.base: add id_short path resolution

    Resolution of id_short paths is added via
    `UniqueIdShortNamespace.get_referable()`, such that it can be used on
    every object, that spans such a namespace. `ModelReference.resolve()`
    is simplified to make use of this new functionality. Furthermore,
    tests for this are added.
    jkhsjdhjs authored and s-heppner committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    d77ceab View commit details
    Browse the repository at this point in the history
  11. model.base: improve id_short resolution error messages

    Show the object, where the resolution failed, in the error messages.
    jkhsjdhjs authored and s-heppner committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    b008187 View commit details
    Browse the repository at this point in the history
  12. test_base: add test for non-numeric SubmodelElementList Key values

    A duplicate test is replaced by this test.
    jkhsjdhjs authored and s-heppner committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    71a389b View commit details
    Browse the repository at this point in the history
  13. model.base: improve two docstrings

    jkhsjdhjs authored and s-heppner committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    d24e612 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    04e06d6 View commit details
    Browse the repository at this point in the history