Coder Social home page Coder Social logo

Comments (5)

s-heppner avatar s-heppner commented on June 23, 2024

The compliance tool checks the compliance to the meta-model, based on our implementation. If the check fails, most likely the .aasx-files you tried are not valid, the output of the compliance tool should point you in the direction of where the issue with the files is. If you think, there is a bug in our implementation, please specify what you encountered.

from basyx-python-sdk.

waleedshabbir1 avatar waleedshabbir1 commented on June 23, 2024

For example, I have a sample JSON file that is valid as json aasx and can be loaded in another aasx server as well.
But when I check with the compliance tool it fails.

Check the file in the attachment
FestoDemoAAS.zip

from basyx-python-sdk.

s-heppner avatar s-heppner commented on June 23, 2024

When I run the compliance tool on your provided AAS, it shows the following:

Validate file against official json schema
Status.FAILED
	<LogRecord: compliance_check, 40, <redacted>\venv\lib\site-packages\basyx\aas\compliance_tool\compliance_check_json.py, 103, "'asset' is a required property

Failed validating 'required' in schema['properties']['assetAdministrationShells']['items']['allOf'][2]:
    {'properties': {'asset': {'$ref': '#/definitions/Reference'},
                    'conceptDictionaries': {'items': {'$ref': '#/definitions/ConceptDictionary'},
                                            'type': 'array'},
                    'derivedFrom': {'$ref': '#/definitions/Reference'},
                    'security': {'$ref': '#/definitions/Security'},
                    'submodels': {'items': {'$ref': '#/definitions/Reference'},
                                  'type': 'array'},
                    'views': {'items': {'$ref': '#/definitions/View'},
                              'type': 'array'}},
     'required': ['asset']}

On instance['assetAdministrationShells'][0]:
    {'assetInformation': {'assetKind': 'Instance',
                          'billOfMaterial': [{'keys': [{'idType': 'Iri',
                                                        'type': 'Submodel',
                                                        'value': 'http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial'}]}],
                          'globalAssetId': {'keys': [{'idType': 'Iri',
                                                      'type': 'Asset',
                                                      'value': 'https://acplt.org/Test_Asset'}]}},
     'idShort': 'FestoDemoAAS',
     'identification': {'id': 'https://example.com/ids/aas/3235_8090_6012_8932',
                        'idType': 'Iri'},
     'modelType': {'name': 'AssetAdministrationShell'},
     'submodels': [{'keys': [{'idType': 'Iri',
                              'type': 'Submodel',
                              'value': 'https://example.com/ids/sm/1145_8090_6012_5097'}]},
                   {'keys': [{'idType': 'Iri',
                              'type': 'Submodel',
                              'value': 'https://example.com/ids/sm/4445_8090_6012_7409'}]},
                   {'keys': [{'idType': 'Iri',
                              'type': 'Submodel',
                              'value': 'https://example.com/ids/sm/2110_9090_6012_8448'}]},
                   {'keys': [{'idType': 'Iri',
                              'type': 'Submodel',
                              'value': 'https://example.com/ids/sm/5410_9090_6012_0950'}]},
                   {'keys': [{'idType': 'Iri',
                              'type': 'Submodel',
                              'value': 'https://example.com/ids/sm/2402_1191_1022_1090'}]}]}">

This tells us, that the attribute asset is missing in the AAS FestoDemoAAS with ID https://example.com/ids/aas/3235_8090_6012_8932.
According to the specification Details of the Asset Administration Shell Part 1 v2.0.1 page 58, this attribute is mandatory:

AAS

Because of that, the compliance check fails.

from basyx-python-sdk.

waleedshabbir1 avatar waleedshabbir1 commented on June 23, 2024

I think the file I provided uses v3
Details of the Asset Administration Shell Part 1 v3

Does this means that compliance tool will only check the compliance with version 2 ?

from basyx-python-sdk.

jkhsjdhjs avatar jkhsjdhjs commented on June 23, 2024

The compliance tool uses the SDK, thus it only checks compliance with the version the SDK implements. The main branch currently implements DotAAS v2.0.1, a version for V3.0RC02 is currently in preparation, see #18.

from basyx-python-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.