Commit c561d264 authored by TorbenD's avatar TorbenD
Browse files

add TestFile.pdf to example data and use for creating example AASX-File

parent 0639027a
Pipeline #338601 failed with stage
in 1 minute and 8 seconds
......@@ -20,6 +20,7 @@ import datetime
import logging
import pyecma376_2
from coverage.annotate import os
from aas import model
from aas.adapter import aasx
......@@ -28,7 +29,7 @@ from aas.compliance_tool import compliance_check_json as compliance_tool_json
from aas.compliance_tool import compliance_check_xml as compliance_tool_xml
from aas.compliance_tool import compliance_check_aasx as compliance_tool_aasx
from aas.adapter.json import write_aas_json_file
from aas.examples.data import create_example
from aas.examples.data import create_example, TEST_PDF_FILE
from aas.compliance_tool.state_manager import ComplianceToolStateManager, Status
......@@ -106,8 +107,10 @@ def main():
manager.set_step_status(Status.SUCCESS)
manager.add_step('Write data to file')
# Todo add Example TestFile.pdf
files = aasx.DictSupplementaryFileContainer()
with open(TEST_PDF_FILE, 'rb') as f:
files.add_file("/TestFile.pdf", f, "application/pdf")
f.seek(0)
# Create OPC/AASX core properties
cp = pyecma376_2.OPCCoreProperties()
......
......@@ -20,10 +20,14 @@ example_submodel_template.py
Module for the creation of an example submodel template containing all kind of submodel elements where the kind is
always TEMPLATE.
"""
import os
from aas import model
from aas.examples.data import example_aas, example_aas_mandatory_attributes, example_aas_missing_attributes, \
example_submodel_template, example_concept_description
TEST_PDF_FILE = os.path.join(os.path.dirname(__file__), 'TestFile.pdf')
def create_example() -> model.DictObjectStore:
"""
......
......@@ -30,6 +30,7 @@ setuptools.setup(
"aas": ["py.typed"],
"aas.adapter.json": ["aasJSONSchema.json"],
"aas.adapter.xml": ["AAS.xsd", "AAS_ABAC.xsd", "IEC61360.xsd"],
"aas.examples.data": ["TestFile.pdf"],
},
classifiers=[
"Programming Language :: Python :: 3",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment