-
Notifications
You must be signed in to change notification settings - Fork 24
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
Update the implementation to V3.0RC02 #18
Merged
s-heppner
merged 339 commits into
eclipse-basyx:improve/V30RC02
from
rwth-iat:improve/V30RC02
Apr 17, 2023
Merged
Update the implementation to V3.0RC02 #18
s-heppner
merged 339 commits into
eclipse-basyx:improve/V30RC02
from
rwth-iat:improve/V30RC02
Apr 17, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…onceptDescription This requires further fixes in test files of the compliance tool.
…s in compliance tool
…ved from idshort namespace
…ay what the user needs
…from aas.backend.__init__) instead
SubmodelElementCollection.submodel_element_collection_factory -> SubmodelElementCollection.create
…modelElementList`" This reverts commit 2362f26. It's better to always serialize the value instead of having multiple places where the default value is specified.
It's better to always serialize optional values instead of specifying their default value in multiple locations. See also: 0a735db
This saves us a 'type: ignore' comment.
Class names: PascalCase Attribute names: snake_case
The following classes were missing from the implementation, because only XML 1.0 datatypes have been implemented so far: `yearMonthDuration` is a restriction of duration, were only years and months are allowed. `dayTimeDuration` is a restriction of duration, were specifying years and months is not allowed. `dateTimeStamp` is a restriction of dateTime, were the timezone is required. yearMonthDuration and dayTimeDuration are implemented as subclasses of Duration. The constraints are only checked on serialization, which makes it a bit hacky. However, since this commit will be reverted with DotAAS 3.0 anyways, it's good enough for now. Close #49 Furthermore, this PR removes an unused definition and fixes a typo. Obviously, these commits shouldn't be reverted with 3.0.
Since a recent version, wheel requires a comma between lower and upper version bound.
'value' is not required in Schema
77e1118
to
e7c5b57
Compare
Since a LangStringSet can't be empty, it must be optional here.
fbba89f
to
6fa4cfe
Compare
…and schema Changes: - fix bugs in XML/JSON schema by copying some sections from the V3.0 schema - remove `ABAC.xsd` and `IEC61360.xsd` (not needed anymore, now unified in a single schema) - adapter.json: fix `HasDataSpecification` (de-)serialization - adapter.xml: add `HasDataSpecification` (de-)serialization - move XML namespace definitions to `adapter._generic` - remove `ConceptDescriptionIEC61360` - remove `example_concept_description.py` (as it only contained `ConceptDescriptionIEC61360`) - fix some minor issues in `AASDataChecker` (type hints, error messages, etc.) - add `HasDataSpecification` support to `AASDataChecker` - add `EmbeddedDataSpecifications` to example data - add `__repr__()` to `EmbeddedDataSpecification`, `DataSpecificationIEC61360` and `DataSpecificationPhysicalUnit` - remove `value_id` attribute from `DataSpecificationIEC61360` - rename attribute accesses of `DataSpecificationPhysicalUnit` that were missed in 6cc19c6 - update tests and compliance tool example files in accordance to the changes
6fa4cfe
to
e30e6d6
Compare
Furthermore, check `Qualifier.kind` with `AASDataChecker` and add examplary values to example files.
The security model wasn't implemented and isn't part of the new V3.0 schemata. The (de-)serialization functions weren't used since the removal of the security attribute from `AssetAdministrationShell` in 1c45c3c. In turn, also remove security (de-)serialization functions from JSON/XML adapters. Remove ABAC XML namespace definition as it isn't used.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the implementation to V3.0RC02 of the DotAAS spec. It is WIP and there's still a lot of work to be done:
AnnotatedRelationshipElement/annotation
: Type changed fromModelReference<DataElement>
toDataElement
.Asset
: Removed, asset referenced viaglobalAssetId
only.AssetAdministrationShell/security
: Removed.Note: Security is still part of the AssetAdministration Shell, but the Asset Administration Shell and its elements are referenced from Security.
AssetAdministrationShell/view
: Removed, Views not langer supported.AssetAdministrationShell/billOfMaterial
: Removed.AssetInformation/defaultThumbnail
: Type changed fromFile
toResource
.AssetInformation/specificAssetId
: Type changed fromIdentifierKeyValuePair
toSpecificAssetId
.BasicEvent
: Renamed toBasicEventElement
.Constraint
: Abstract class removed.Formula
now used in Security part only.DataTypeDef
: Splitted intoDataTypeDefXsd
andDataTypeDefRdf
. Some types excluded and not supported (see noted in corresponding clause).Before: just string allowing all
anySimpleTypes
of xsd andlangString
of rdf.Entity/globalAssetId
: Bugfix: Type change from reference ofReference
toReference
(fromReference*
toReference
).Event
: Renamed toEventElement
.Extension/refersTo
: Type changed fromReference
toModelReference
.File/mimeType
: Renamed tocontentType
+ Type name changed fromMimeType
toContentType
.Formula
: Now abstract class. Formula now used in Security part only.Formula/dependsOn
: Removed since formula language not yet defined.Identifiable/identification
: Removed. Substituted byIdentifiable/id
.IdentifiableElements
: Renamed toAasIdentifiables
.Identifier
: Type changed. Before struct class with two attributed:id
andidType
. Now string data type only.IdentifierKeyValuePair
: Renamed toSpecificAssetId
and change of attributekey
toname
.IdentifierType
: Enumeration removed because noidType
any longer.Key/idType
: removed.KeyElements
: Renamed toKeyTypes
.The elements remain except for new
SubmodelElementList
, and renamed submodel elementsEvent
andBasicEvent
toEventElement
andBasicEventElement
.KeyType
: Enumeration removed because noKey/idType
any longer.LocalKeyType
: Enumeration removed because noKey/idType
any longer.MimeType
: Type name changed toContentType
.Property/valueType
: Type changed fromDataTypeDef
toDataTypeDefXsd
.Qualifiable/qualifier
: Type changed fromConstraint
toQualifier
.Qualifier
: Does not inherit from abstract classConstraint
any longer.Qualifier/valueType
: Type changed fromDataTypeDef
toDataTypeDefXsd
.Range/valueType
: Type changed fromDataTypeDef
toDataTypeDefXsd
.Referable/idShort
: Now optional, was mandatory.ReferableElements
: Substituted with enumerationAasSubmodelElements
andAasIdentifiables
.ReferableElements/AccessPermissionRule
: Removed from Enumeration,AccessPermissionRule
is not referable any longer.Not part of new
AasReferableNonIdentifiables
.ReferableElement/BasicEvent
: Renamed toBasicEventElement
. Now part ofAasSubmodelElements
.ReferablesElements/ConceptDictionary
: Bugfix:ConceptDictionary
removed from enumeration sinceConceptDictionary
not part of specification any longer.Now part of new
KeyTypes
.ReferableElements/Event
: Renamed toEventElement
. Now part ofAasSubmodelElements
.RelationshipElement/first
: Type changes from model referenceReferable
toReference
(global or model reference).RelationshipElement/second
: Type changes from model referenceReferable
toReference
(global or model reference).ValueDataType
: Before as specified viaDataTypeDef
, now any xsd atomatic type as specified viaDataTypeDefXsd
.+ Prefix
xs:
added to every value in list.ValueList/valueReferencePairType
: Bugfix: renamed toValueList/valueReferencePairs
.View
: removed.TODO aside from the V30RC02 changes:
EventElement
andBasicEventElement
SubmodelElementList
ValueReferencePair
default toString
value_type (also adjust json/xml adapters, especially# type: ignore
comments in both deserializationsOnce
SubmodelElementList
is implemented:SubmodelElementList
toKeyTypes
SubmodelElementList
constraints toReference
SubmodelElementList
objects to example data