Skip to content
Snippets Groups Projects

aasx: Fix handling of File object with absolute URI values

Merged Michael Thies requested to merge fix/aasx_file_absolute_uri into master
2 unresolved threads

Fixes #81 (closed)

Edited by Michael Thies

Merge request reports

Merge train pipeline #339097 passed

Merge train pipeline passed for 94a6850b

Test coverage 90.00% (0.00%) from 1 job
Approved by

Merged by Torben MinyTorben Miny 4 years ago (Oct 6, 2020 8:40am UTC)

Merge details

  • Changes merged into master with cb3b8903.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #339099 passed

Pipeline passed for cb3b8903 on master

Test coverage 90.00% (0.00%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
232 232 if isinstance(element, model.File):
233 233 if element.value is None:
234 234 continue
235 # Only absolute-path references and relative-path URI references (see RFC 3986, sec. 4.2) are considered
236 # to refer to files within the AASX package. Thus, we must skip all other types of URIs (esp. absolute
237 # URIs and network-path references)
238 if element.value.startswith('//') or ':' in element.value.split('/')[0]:
239 logger.info("Skipping supplementary file %s, since it seems to be an absolute URI or network-path "
240 "URI reference", element.value)
  • Michael Thies marked as a Work In Progress

    marked as a Work In Progress

  • Michael Thies added 2 commits

    added 2 commits

    • 9605c609 - adapter.aasx: Fix fix for absolute URI references in File objects
    • bac86d2d - examples: Add File object with absolute URI reference to example_aas

    Compare with previous version

  • Michael Thies added 1 commit

    added 1 commit

    • 7ab06a8c - examples: Add File object with absolute URI reference to example_aas

    Compare with previous version

  • Michael Thies added 2 commits

    added 2 commits

    • 3d44cd17 - examples.data: Add File object with absolute URI reference (non-local file)
    • 738759cc - adapter.aasx: Skip File objects with absolute URI reference when writing supplementary files

    Compare with previous version

  • Michael Thies added 1 commit

    added 1 commit

    • f52c45e7 - adapter.aasx: Skip File objects with absolute URI reference when writing supplementary files

    Compare with previous version

  • Michael Thies added 1 commit

    added 1 commit

    • 492ab7ef - adapter.aasx: Skip File objects with absolute URI reference when writing supplementary files

    Compare with previous version

  • Michael Thies unmarked as a Work In Progress

    unmarked as a Work In Progress

    • For the XML Deserialization it would be good if the test files weren't minified, because in case of an error it includes the line number the error was encountered on in its error messages, which makes debugging easier. Unfortunately, including the column number is not possible, because the lxml/ElementTree API doesn't support that.

    • Author Contributor

      I agree. We should use the pretty_print=True resp. indent=4 parameter for XML and JSON serialization in the compliance tool. See #92 (closed).

      Edited by Michael Thies
    • Please register or sign in to reply
  • Torben Miny approved this merge request

    approved this merge request

  • Torben Miny started a merge train

    started a merge train

  • Torben Miny mentioned in commit cb3b8903

    mentioned in commit cb3b8903

  • merged

  • Please register or sign in to reply
    Loading