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

Add verification step to AAS tutorial #8

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
JAB1305 marked this conversation as resolved.
Show resolved Hide resolved
# for demonstration reasons assert it to be empty.
assert len(list(verification.verify(aas))) == 0
Loading