Skip to content

Commit

Permalink
sdk/basyx/tutorial/tutorial_create_simple_aas.py: Add verification step
Browse files Browse the repository at this point in the history
  • Loading branch information
JAB1305 authored and s-heppner committed Oct 25, 2024
1 parent 5e5c5e8 commit d6c565a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sdk/basyx/tutorial/tutorial_create_simple_aas.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# Import all type classes from the aas-core3.0-python SDK
import aas_core3.types as aas_types
from aas_core3 import verification

# In this tutorial, you'll get a step-by-step guide on how to create an Asset Administration Shell (AAS) and all
# required objects within. First, you need an AssetInformation object for which you want to create an AAS. After that,
Expand Down Expand Up @@ -132,3 +133,13 @@
)
]
)

##########################################################################
# Step 4: Verify the Asset Administration Shell (AAS) and its components #
##########################################################################
# This step ensures that the AAS conforms to the rules and constraints defined by the AAS metamodel. The fields
# themselves do not underlie any restriction.

# We can use aas_core3.verification.verify(). This method returns an Iterator that we can collect into a list and
# for demonstration reasons assert it to be empty.
assert len(list(verification.verify(aas))) == 0

0 comments on commit d6c565a

Please sign in to comment.