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

Implement v3.0 of the metamodel specification #174

Merged
merged 456 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
456 commits
Select commit Hold shift + click to select a range
0f7de1b
aas.backend.local_file: Fix LocalFileBackend.get_identifiable()
s-heppner Jul 14, 2022
c85280d
change type of Identifiable/id to str
jkhsjdhjs Jul 18, 2022
7df87a0
readme: update DotAAS link to V3.0RC02
jkhsjdhjs Jul 18, 2022
357a520
rename IdentifierKeyValuePair to SpecificAssetId
jkhsjdhjs Jul 20, 2022
ebd3e1f
change type of Entity/globalAssetId from Reference to GlobalReference
jkhsjdhjs Jul 20, 2022
e01c598
change type of Extension/refersTo from Reference to ModelReference
jkhsjdhjs Jul 20, 2022
50308da
restructure KeyTypes
jkhsjdhjs Jul 20, 2022
1434cd3
change type of RelationshipElement/{first,second} from ModelReference…
jkhsjdhjs Jul 20, 2022
7e90e2c
Merge branch 'main' into improve/V30RC02
jkhsjdhjs Jul 21, 2022
8b385dd
remove ACCESS_PERMISSION_RULE from KeyTypes
jkhsjdhjs Aug 13, 2022
7b33f75
model: rename DataTypeDef to DataTypeDefXsd
jkhsjdhjs Aug 14, 2022
2e30030
Merge branch 'main' into improve/V30RC02
jkhsjdhjs Aug 16, 2022
c4e1b14
test.adapter.aasx: add whitespace after assert
jkhsjdhjs Aug 16, 2022
93d758b
model: simplify NamespaceSet implementation
jkhsjdhjs Oct 1, 2022
b3ae31b
fix mypy errors
jkhsjdhjs Oct 1, 2022
2206b6d
Adding Int Coverage
supreetshm947 Oct 17, 2022
4f7d4da
Adding Int Coverage
supreetshm947 Oct 17, 2022
639b4b9
model: update SubmodelElementCollection
jkhsjdhjs Oct 17, 2022
e44a762
model.base: extend NamespaceSet by item_add_hook
jkhsjdhjs Oct 17, 2022
fba36db
add SubmodelElementList
jkhsjdhjs Oct 20, 2022
e757f46
Merge branch 'main' into improve/V30RC02
jkhsjdhjs Oct 27, 2022
8b8276a
Removing ValueError import
supreetshm947 Oct 28, 2022
5f21845
Merge pull request #2 from acplt/improve/coverage/model.datatypes
supreetshm947 Oct 28, 2022
906605e
add missing attributes to BasicEventElement
jkhsjdhjs Jan 6, 2023
b940ddd
implement ConstrainedList, work on HasSemantics, Unittest
Feb 24, 2023
af5dc74
work on unittest: HasSemanticsTest
dxvidnrt Feb 24, 2023
585e18f
work on generic
dxvidnrt Feb 25, 2023
803c2b3
work on mypy
dxvidnrt Feb 27, 2023
eda6d06
passed mypy except for "note" and merge with main
dxvidnrt Feb 27, 2023
a0dc451
work on unittest for ConstrainedList
dxvidnrt Feb 28, 2023
02fd7bf
work on unittest for ConstrainedList
Mar 1, 2023
c1b11a6
add semantic_id cant be set None when there is supp_sem_id
dxvidnrt Mar 2, 2023
df12092
Merge remote-tracking branch 'refs/remotes/origin/improve/V30RC02' in…
dxvidnrt Mar 2, 2023
141f870
work on unittest
Mar 2, 2023
82d1286
start working on adding supp_sem_id to everything
Mar 3, 2023
543e79c
sem_id not deletable if there is a supp_sem_id
Mar 3, 2023
2464ff9
add supplementary_semantic_id to all subclasses
Mar 3, 2023
4f23b7a
delete unnecessary test
Mar 3, 2023
5b4e5c2
add_line
Mar 3, 2023
8e94d4a
Merge branch 'main' into improve/V30RC02
jkhsjdhjs Mar 17, 2023
dc62bdc
model.base: prevent Reference instantiation by making __init__ abstract
jkhsjdhjs Mar 18, 2023
30217fa
model: fix inheritance by adding missing calls to super().__init__()
jkhsjdhjs Mar 18, 2023
76dc0e0
model: cleanup ConstrainedList and supplemental_semantic_id
jkhsjdhjs Mar 18, 2023
29aee42
requirements: add comma to urllib3 dependency specification
jkhsjdhjs Mar 18, 2023
a1aaec3
begin integration of new XML and JSON schemata
jkhsjdhjs Mar 20, 2023
193a580
Refactor AASToJsonEncoder.default()
zrgt Mar 20, 2023
e3e52fc
Refactor AnnotatedRelationshipElement for JSON
zrgt Mar 20, 2023
0a3fc40
Refactor Operation for JSON
zrgt Mar 20, 2023
490079e
Refactor AssetInformation for JSON
zrgt Mar 20, 2023
0c3aa9f
Refactor Entity for JSON
zrgt Mar 20, 2023
74d44bd
Refactor SpecificAssetId for JSON
zrgt Mar 20, 2023
b6d17af
Save names in "modelType", not in dict
zrgt Mar 21, 2023
b01574c
Remove AAS, Submodels and CS lists, as not required in Schema
zrgt Mar 21, 2023
53f84cd
Remove Req, that AAS, Submodels and CS lists must be in JSON
zrgt Mar 21, 2023
4e7edfd
Fix json serialisation for File
zrgt Mar 21, 2023
e84cc83
Remove unused imports
zrgt Mar 21, 2023
32116c0
Fix json serialisation for Property
zrgt Mar 21, 2023
db25697
Add Qualifier.kind and remove "modelType" for Qualifier
zrgt Mar 21, 2023
7d26fd8
Set 'min' and 'max' as optional in json serialisation of `Range`
zrgt Mar 21, 2023
2362f26
Set 'orderRelevant' as optional in json serialisation of `SubmodelEle…
zrgt Mar 21, 2023
e12a3a9
Remove Constraint AASd-008
zrgt Mar 21, 2023
5861f9c
Add json de-/serial. of 'supplementalSemanticIds'
zrgt Mar 27, 2023
80faec3
Fix json deserial. of AnnotatedRelationshipElement
zrgt Mar 27, 2023
8c43d4d
Fix json deserialization of Entity
zrgt Mar 27, 2023
4d59536
Add missing attrs to repr of SpecificAssetId
zrgt Mar 27, 2023
2554338
Fix deserialization of SpecificAssetId
zrgt Mar 27, 2023
f816a42
Add `HasDataSpecification` + IEC61360 Classes
zrgt Mar 27, 2023
9d0ff24
Remove test_concept.py as false implemented
zrgt Mar 27, 2023
9a7ed53
Add data_specification equal methods
zrgt Mar 27, 2023
7309f82
Refactor "valueReferencePairTypes" to json schema
zrgt Mar 27, 2023
7fee59c
Make `ValueReferencePair.value_type` optional
zrgt Mar 27, 2023
98f7719
adapter.json: remove meaningless modelType check
jkhsjdhjs Mar 27, 2023
0a735db
Revert "Set 'orderRelevant' as optional in json serialisation of `Sub…
jkhsjdhjs Mar 27, 2023
cbe67a5
adapter.json: always serialize values with non-None default values
jkhsjdhjs Mar 28, 2023
34ee83d
adapter.json: add objects with a for loop
jkhsjdhjs Mar 28, 2023
6cc19c6
model: refactor class and attribute names
jkhsjdhjs Mar 28, 2023
e7c5b57
Merge branch 'main' into improve/V30RC02
jkhsjdhjs Mar 31, 2023
bf5ad92
fix some mypy errors
jkhsjdhjs Apr 1, 2023
e229208
fix codestyle
jkhsjdhjs Apr 1, 2023
3c20c6d
model.submodel: make MultiLanguageProperty.value optional
jkhsjdhjs Apr 1, 2023
e30e6d6
update implementation and adapters for new DataSpecification classes …
jkhsjdhjs Apr 7, 2023
1b17c7a
model.base: add `__repr__()` to `Resource`
jkhsjdhjs Apr 7, 2023
7bd0026
util.traversal: support traversing `SubmodelElementList`
jkhsjdhjs Apr 7, 2023
80b2760
adapter.xml: support deserialization of `Qualifier.kind`
jkhsjdhjs Apr 7, 2023
dfdb08e
model.base: protect internal `LangStringSet` dict
jkhsjdhjs Apr 7, 2023
583159c
model.base: move `ValueList` type alias to the top
jkhsjdhjs Apr 7, 2023
e7b5083
model.base: add `SubmodelElementList` to `KeyTypes` docstring
jkhsjdhjs Apr 7, 2023
2373167
model.base: make `String` the default `value_type` of `ValueReference…
jkhsjdhjs Apr 7, 2023
9da564c
model.base: make `String` the default `value_format` of `DataSpecific…
jkhsjdhjs Apr 7, 2023
f3b3b4f
adapter: adjust for `DataSpecificationIEC61360.value_format` defaulti…
jkhsjdhjs Apr 7, 2023
9a4d9e3
model: remove security.py
jkhsjdhjs Apr 7, 2023
ab298a7
Merge pull request #18 from acplt/improve/V30RC02
s-heppner Apr 17, 2023
8304c2a
Rename `base.AASReference` to `ModelReference` (#66)
dxvidnrt Apr 21, 2023
651a148
`test.model:` Fix initialization of model.Key
Apr 21, 2023
4f9eac0
`test.model`: Change Indices of `model.ModelReference` in `test_base.…
Apr 24, 2023
d8293c1
Revert "model.datatypes: add yearMonthDuration, dayTimeDuration, date…
jkhsjdhjs May 4, 2023
58b23bb
Merge branch 'main' into merge/main_in_v30
jkhsjdhjs May 12, 2023
5aed20a
test.model.test_base: adjust merged commits for V3.0
jkhsjdhjs May 12, 2023
8dcbb13
Merge branch 'main' into merge/main_in_v30
jkhsjdhjs May 15, 2023
e1d0d78
test.compliance_tool: enable another disabled assertion
jkhsjdhjs May 15, 2023
b6993a1
Merge pull request #78 from acplt/merge/main_in_v30
s-heppner May 27, 2023
4129c02
`base.AssetKind`: Add new enum `NOTAPPLICABLE` and update description
Apr 29, 2023
94331a5
Revert unrelated change in `aasJSONSchema`
May 23, 2023
49743d0
Seperate value `NOT_APPLICABLE` by `_`
May 23, 2023
e4bf363
adapter._generic: rename NOTAPPLICABLE to NOT_APPLICABLE
jkhsjdhjs May 31, 2023
d0d423a
adapter: add `NOT_APPLICABLE` AssetKind to schemata
jkhsjdhjs May 31, 2023
1445bdd
Add SubmodelElementList to KEY_TYPES dict
zrgt Jun 12, 2023
0136081
model: Adapt constructor of class `Key`
dxvidnrt Jun 20, 2023
edf5f27
adapter.xml.xml_deserialization: except `AASConstraintViolation` in `…
jkhsjdhjs Jun 27, 2023
fa929b8
examples, test: adjust AdministrativeInformation version and revision…
jkhsjdhjs Jun 27, 2023
69c9718
model: add type aliases for constrained strings
jkhsjdhjs Jun 27, 2023
5ff2fd8
model: implement constraints for constrained string type aliases
jkhsjdhjs Jun 27, 2023
c81adf0
model.base: raise `AASConstraintViolation` in `AdministrativeInformat…
jkhsjdhjs Jun 27, 2023
834b0aa
Reformulate Constraints for V3.0 (#85)
dxvidnrt Jun 29, 2023
77c33e7
Remove attribute `kind` from `SubmodelElement`
dxvidnrt Jul 1, 2023
3621036
Merge pull request #92 from rwth-iat/feature/constrained_string_datat…
s-heppner Jul 18, 2023
d4280b6
Partially revert "Remove attribute `kind` from `SubmodelElement`"
jkhsjdhjs Jul 19, 2023
ba2000b
Merge branch 'main' into merge/main_in_v30
jkhsjdhjs Jul 26, 2023
6cb4add
test.model.test_base: remove duplicate test in `test_reolve()`
jkhsjdhjs Jul 26, 2023
f6a91aa
Revert "Change all occurrences of value in `model.Key()` from `abc` t…
jkhsjdhjs Jul 19, 2023
eddfc18
model.base: add missing `Identifier` constraint to `Key`
jkhsjdhjs Jul 19, 2023
196c98a
Merge pull request #97 from rwth-iat/merge/main_in_v30
s-heppner Jul 26, 2023
f1e7278
`model.aas:` Add new attribute `asset_type` to `AssetInformation`
Apr 24, 2023
ef25fdc
Change type of all occurrences of `AssetInformation.global_asset_id` …
Apr 25, 2023
042b9aa
model.aas: add `asset_type` attribute to `__repr__()` of `AssetInform…
jkhsjdhjs May 15, 2023
e1a4dec
examples.data: adjust data checker for changed `AssetInformation`
jkhsjdhjs May 15, 2023
091d5be
examples.data: add `asset_type` attribute example
jkhsjdhjs May 15, 2023
afa361b
update XML/JSON schemata, adapter and test files for updated `AssetIn…
jkhsjdhjs May 15, 2023
95b917f
remove wrapping `Identifier()` around strings
jkhsjdhjs Jul 19, 2023
e3a1711
model.aas: add constraints to `AssetInformation` attributes
jkhsjdhjs Jul 20, 2023
8aaa2b3
change type of `Entity.global_asset_id` to `Identifier`
jkhsjdhjs Jul 20, 2023
ebd2600
Merge branch 'main' into merge/main_in_v30
jkhsjdhjs Aug 8, 2023
e19ab55
Merge pull request #102 from rwth-iat/merge/main_in_v30
s-heppner Aug 10, 2023
ee5d699
adapter.xml.xml_deserialization: fix pycodestyle warnings
jkhsjdhjs Aug 9, 2023
af15b0f
examples: fix pycodestyle warning
jkhsjdhjs Aug 9, 2023
493d5d3
model.KeyTypes: Ignore mypy errors for abstract classes to be compliant
s-heppner Aug 11, 2023
4b9dc86
model.base: Add new attributes to class AdministrativeInformation
s-heppner Aug 11, 2023
5050299
model.base: adapt `__eq__()` and `__repr__()` of `AdministrativeInfor…
jkhsjdhjs Aug 20, 2023
db77f66
adapter: add new `AdministrativeInformation` attributes
jkhsjdhjs Aug 20, 2023
3108a22
examples, test: add exemplary usages of new `AdministrativeInformatio…
jkhsjdhjs Aug 20, 2023
db1f5ff
model.base: Rename GlobalReference to ExternalReference
s-heppner Aug 11, 2023
0cdca73
Fix PyCodeStyle
s-heppner Aug 11, 2023
f800e99
Update JSON and XSD schemata
s-heppner Aug 11, 2023
e706605
test.compliance_tool.files: replace `GlobalReference` with `ExternalR…
jkhsjdhjs Aug 20, 2023
e766c54
replace remaining occurances of `GlobalReference` with `ExternalRefer…
jkhsjdhjs Aug 20, 2023
65142e4
Merge branch 'improve/V30' into Rename/GlobalReference
jkhsjdhjs Aug 23, 2023
5be0392
examples, test: rename `AdministrativeInformation.creator` references…
jkhsjdhjs Aug 23, 2023
d1dbfce
test.model.test_base: rename `GlobalReferenceTest` to `ExternalRefere…
jkhsjdhjs Aug 23, 2023
d360723
Merge pull request #106 from rwth-iat/Rename/GlobalReference
s-heppner Aug 24, 2023
12156ca
model.base: Rename ModelingKind to ModellingKind (#104)
s-heppner Aug 24, 2023
539d438
examples.data._helper: add missing `display_name` comparison to `AASD…
jkhsjdhjs Aug 22, 2023
e0e724b
adapter.json: improve `LangStringSet` json serialization
jkhsjdhjs Aug 22, 2023
07ca8d7
model.base: change type of `SpecificAssetId.value` to `Identifier` (#…
jkhsjdhjs Aug 24, 2023
2f17cb9
model: add `ShortNameType` constrained string alias
jkhsjdhjs Aug 22, 2023
268f9bf
model._string_constraints: add `create_check_function()`
jkhsjdhjs Aug 22, 2023
ba533d2
model.base: add `ConstrainedLangStringSet` and subclasses
jkhsjdhjs Aug 22, 2023
1f50e8f
test.model.test_base: add `LangStringSet` test-cases
jkhsjdhjs Aug 22, 2023
b70ea4d
replace all usages of `LangStringSet` with a `ConstrainedLangStringSet`
jkhsjdhjs Aug 24, 2023
18b561d
adapter: adjust for the new `ConstrainedLangStringSet`s
jkhsjdhjs Aug 22, 2023
2d68291
test: update compliance tool files for new `LangStringSet` serialization
jkhsjdhjs Aug 24, 2023
505694d
model.base: make extending a `ConstrainedList` atomic (#116)
jkhsjdhjs Aug 31, 2023
31a82a9
model.AdministrativeInformation: Update formulation of AASd-005 to v3…
s-heppner Sep 1, 2023
18fde95
model.base: Remove occurrences of deprecated constraint AASd-100
s-heppner Sep 1, 2023
e8e664d
Remove constraint AASd-003
zrgt Sep 8, 2023
598f05b
model.base: fix `Referable.__repr__()` for `SubmodelElementList`-chil…
jkhsjdhjs Sep 29, 2023
6b4fd27
model.submodel: add elements to `SubmodelElementList` after the `_val…
jkhsjdhjs Sep 29, 2023
d96c605
model.base: replace `continue` with `break` in `NamespaceSet.remove()`
jkhsjdhjs Sep 29, 2023
9e8d46c
adapter.json.json_deserialization: handle `AASConstraintViolation`
jkhsjdhjs Sep 29, 2023
8cdfcb7
model.base: add missing `item_add_hook` doc to `OrderedNamespaceSet`
jkhsjdhjs Oct 2, 2023
09b68a4
model.base: fix `ModelReference.resolve()` error messages for element…
jkhsjdhjs Sep 29, 2023
bffb075
make `id_shorts` optional
jkhsjdhjs Oct 2, 2023
894403d
model.base: implement AASd-022 correctly
jkhsjdhjs Oct 2, 2023
d5f4919
model.base: implement constraint `AASd-117`
jkhsjdhjs Oct 2, 2023
105a0e6
model._string_constraints: add AASd-130 to `check()`
jkhsjdhjs Oct 5, 2023
3c299d4
model._string_constraints: escape unicode characters in errors
jkhsjdhjs Oct 5, 2023
8ebe456
test: check constraint AASd-130 implementation
jkhsjdhjs Oct 5, 2023
ef66f3e
model._string_constraints: Add documentation what AASd-130 is
s-heppner Oct 6, 2023
25adeca
Remove the www. subdomain in AASX namespace (#122)
zrgt Oct 10, 2023
cb596a9
model.base: add `item_id_{set,del}_hook` to `NamespaceSet`
jkhsjdhjs Oct 2, 2023
35bc834
Remove DataSpecificationPhysicalUnit (#137)
zrgt Oct 12, 2023
927f125
generate unique id_shorts for `SubmodelElementList`-children
jkhsjdhjs Oct 4, 2023
cc11346
examples.data._helper: disable comparison of unordered `SubmodelEleme…
jkhsjdhjs Oct 4, 2023
a0a2416
test: update compliance tool test-files
jkhsjdhjs Oct 4, 2023
1545e47
Set `id_short` of `Identifiables` to optional
zrgt Oct 16, 2023
250517d
Merge remote-tracking branch 'acplt/feature/SubmodelElementList_gener…
zrgt Oct 16, 2023
c44bbc9
Update compliance tool test files
zrgt Oct 17, 2023
9e6f80b
generate unique id_shorts for `SubmodelElementList`-children
jkhsjdhjs Oct 4, 2023
1dc894b
examples.data._helper: disable comparison of unordered `SubmodelEleme…
jkhsjdhjs Oct 4, 2023
0fb4fb1
test: update compliance tool test-files
jkhsjdhjs Oct 4, 2023
a91ee0a
Set `SpecificAssetId.external_subject_id` as optional
zrgt Oct 18, 2023
9dbea12
test.compliance_tool: Manually update test aasx files
s-heppner Oct 18, 2023
7c21edf
Merge pull request #139 from rwth-iat/fix/id_short
s-heppner Oct 19, 2023
fefb27b
Use correct modelName 'DataSpecificationIec61360'
zrgt Oct 16, 2023
99cfc76
Set typehint of EmbeddedDataSpecification.data_specification
zrgt Oct 16, 2023
483a0e6
Fix capitalization of "DataSpecificationIec61360"
zrgt Oct 16, 2023
dad03a6
Update compliance tool test files
zrgt Oct 17, 2023
84bc0f6
Update IEC61360_DATA_TYPES
zrgt Oct 17, 2023
b1d0c3f
Fix the implementation of DataSpecificationIEC61360
zrgt Oct 17, 2023
f72b99f
Fix pycodestyle issue
zrgt Oct 18, 2023
8fbaa64
Fix ValueReferencePairTest
zrgt Oct 18, 2023
9d01620
Remove binary files from test files for compliance tool (#143)
zrgt Oct 20, 2023
5eb895e
Add Constraint AASd-133 in SpecificAssetId documentation (#147)
zrgt Nov 3, 2023
886313e
model.base: fix `ConstrainedList.clear()` atomicity
jkhsjdhjs Nov 4, 2023
347c2a0
Fix Entity.specificAssetIds in schemas
zrgt Oct 27, 2023
dc8d119
- Set `Entity.specific_asset_id` as `Iterable[SpecificAssetId]`, beca…
zrgt Oct 27, 2023
9dc68f0
Refactor `check_entity_equal()`&`check_asset_information_equal()`
zrgt Oct 27, 2023
931c669
Update test files
zrgt Oct 27, 2023
cb7ad32
Update tutorial_serialization_deserialization.py
zrgt Oct 27, 2023
5bdd4f7
Use getter/setter decorators for global_asset_id
zrgt Oct 29, 2023
9e42551
Fix errors from MyPy
zrgt Oct 29, 2023
85285c8
Fix pycodestyle errors
zrgt Oct 29, 2023
a7ee225
Fix typehint of specific_asset_id
zrgt Nov 3, 2023
bdb5cc2
Fix wrong example value
zrgt Nov 3, 2023
5408c46
model.submodel: remove `_string_constraints` decorator from `Entity`
jkhsjdhjs Nov 4, 2023
114053d
model.submodel: move `Entity.global_asset_id` string constraint check…
jkhsjdhjs Nov 4, 2023
62932e8
model.submodel: remove duplicate code in `Entity`
jkhsjdhjs Nov 4, 2023
015ed62
model.ass: add `_validate_asset_ids()` function to `AssetInformation`
jkhsjdhjs Nov 4, 2023
f82dd58
model.{aas, submodel}: add set hook to `{AssetInformation, Entity}.sp…
jkhsjdhjs Nov 4, 2023
07c8012
model.submodel: assign values correctly in `Entity.__init__`
jkhsjdhjs Nov 4, 2023
7a073ad
model.{aas, submodel}: add getter/setter for `{AssetInformation, Enti…
jkhsjdhjs Nov 4, 2023
7fdb952
model.submodel: verify constraints when `SpecificAssetIds` are added …
jkhsjdhjs Nov 4, 2023
e39f16e
model.{aas, submodel}: improve `{AssetInformation, Entity}.global_ass…
jkhsjdhjs Nov 4, 2023
73dc4ea
test.model: add `AssetInformation` tests and improve `Entity` tests
jkhsjdhjs Nov 4, 2023
c25e5f0
Refactor `Entity` and `AssetInformation`
zrgt Nov 7, 2023
cabc193
Refactor `Entity` and `AssetInformation`
zrgt Nov 7, 2023
1d87d2d
make `Operation` a `Namespace`
jkhsjdhjs Nov 3, 2023
bc2ff75
model._string_constraints: don't overwrite existing attributes in cas…
jkhsjdhjs Nov 3, 2023
defe3b7
model.base: Improve `NamespaceSet` (#155)
zrgt Nov 14, 2023
2b82cc6
Update constraints.rst docs
zrgt Nov 9, 2023
bb3ed92
Document DataSpecification template class not implemented
zrgt Nov 9, 2023
9a9bd8a
adapter.json: Update Schema to comply with v3.0
s-heppner Nov 14, 2023
24d4cf3
test: remove null values from example files
jkhsjdhjs Nov 14, 2023
58d0fea
test: add schema validation of wrong attribute JSON/XML files
jkhsjdhjs Nov 14, 2023
9fcf8be
adapter.json: Remove deprecated XSD DataTypes from Schema
s-heppner Nov 15, 2023
eed8972
adapter.xml: Update XSD Schema
s-heppner Nov 14, 2023
aef62f8
adapter.xml: Update XSD of `valueDataType` and `Extension`
s-heppner Nov 14, 2023
bfc2cca
adapter.xml: Update `levelType` XSD
s-heppner Nov 14, 2023
b5b4a41
adapter.xml: Change order of `SubmodelElementList` objects
s-heppner Nov 14, 2023
a5b61f4
adapter.xml: Remove `<aas:kind>` from `SubmodelElement`s in XSD
s-heppner Nov 14, 2023
1ada11f
adapter.xml: Fix deserialization for `Extension`
s-heppner Nov 15, 2023
03c1579
model.Extension: Change refers_to to be of type `Set[Reference]`
s-heppner Nov 15, 2023
f6074ee
Soften the language tag constraint
zrgt Nov 15, 2023
aef37fe
Update test_language_tag_constraints
zrgt Nov 15, 2023
4384bbb
compliance_tool: add verification of `Extensions`
jkhsjdhjs Nov 16, 2023
dd361c6
adapter: fix deserialization of `Extension`
jkhsjdhjs Nov 16, 2023
0f55c2a
README: Bump to v3.0
s-heppner Nov 20, 2023
e520b71
Merge branch 'improve/V30' into merge/Bugfixes
s-heppner Nov 20, 2023
6d58ca7
test.adapter.xml: Reintroduce "# type: ignore" tags that got lost in …
s-heppner Nov 21, 2023
de82662
Merge the bugfixes from branch `main` into `improve/V30`
s-heppner Nov 21, 2023
2db802b
test.adapter.xml: remove 'type: ignore' comments
jkhsjdhjs Nov 21, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# Coverage artifacts
/.coverage
/htmlcov/
/docs/build/

# customized config files
/test/test_config.ini
42 changes: 24 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,23 @@

(formerly known as PyI40AAS – Python Industry 4.0 Asset Administration Shell)

The Eclipse BaSyx Python project focuses on providing a Python implementation of the Asset Administration Shell (AAS) for Industry 4.0 Systems,
compliant with the meta model and interface specification provided in
[the document “Details of the Asset Administration Shell” (v2.0.1)](https://www.plattform-i40.de/IP/Redaktion/DE/Downloads/Publikation/Details_of_the_Asset_Administration_Shell_Part1_V2.html).
It currently adheres to version 2.0.1 of the specification.
An updated version with support for version 3.0RC01 is already in preparation and will be made available on an additional branch of this repository and in a future major release.
The Eclipse BaSyx Python project focuses on providing a Python implementation of the Asset Administration Shell (AAS)
for Industry 4.0 Systems.
These are the currently implemented specifications:

| Specification | Version |
|---------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| Part 1: Metamodel | [v3.0 (01001-3-0)](https://industrialdigitaltwin.org/content-hub/aasspecifications/idta_01001-3-0_metamodel) |
| Part 2: API | not implemented yet |
| Part 3a: Data Specification IEC 61360 | [v3.0 (01003-a-3-0)](https://industrialdigitaltwin.org/content-hub/aasspecifications/idta_01003-a-3-0_data_specification) |
| Part 5: Package File Format (AASX) | [v3.0 (01005-3-0)](https://industrialdigitaltwin.org/content-hub/aasspecifications/idta-01005-3-0_package_file_format_aasx) |

## Features

* Modelling of AASs as Python objects (according to DotAAS sec. 4)
* **except for**: Security extension of the metamodel (according to DotAAS sec. 5), *HasDataSpecification*
* Reading and writing of AASX package files (according to DotAAS sec. 6)
* (De-)serialization of AAS objects into/from JSON and XML (according to DotAAS sec. 7)
* Modelling of AASs as Python objects
* **except for**: *HasDataSpecification*
* Reading and writing of AASX package files
* (De-)serialization of AAS objects into/from JSON and XML
* Storing of AAS objects in CouchDB, Backend infrastructure for easy expansion
* Compliance checking of AAS XML and JSON files

Expand Down Expand Up @@ -53,9 +58,12 @@ Optional production usage dependencies:
* For using the Compliance Tool to validate JSON files against the JSON Schema: `jsonschema` and its
dependencies (MIT License, Apache License, PSF License)

Development/testing/example dependencies (see `requirements.txt`):
Development/testing/documentation/example dependencies (see `requirements.txt`):
* `jsonschema` and its dependencies (MIT License, Apache License, PSF License)
* `psutil` (BSD 3-clause License)
* `Sphinx` and its dependencies (multiple licenses)
* `sphinx-rtd-theme` and its dependencies
* `sphinx-argparse` (MIT License)

Dependencies for building the documentation:
* `Sphinx` and its dependencies (BSD 2-clause License, MIT License, Apache License)
Expand Down Expand Up @@ -89,19 +97,17 @@ Create a `Submodel`:
```python
from basyx.aas import model # Import all BaSyx Python SDK classes from the model package

identifier = model.Identifier('https://acplt.org/Simple_Submodel', model.IdentifierType.IRI)
submodel = model.Submodel(identification=identifier)
identifier = 'https://acplt.org/Simple_Submodel'
submodel = model.Submodel(identifier)
```

Create a `Property` and add it to the `Submodel`:
```python
# create a global reference to a semantic description of the property
semantic_reference = model.Reference(
# create an external reference to a semantic description of the property
semantic_reference = model.ExternalReference(
(model.Key(
type_=model.KeyElements.GLOBAL_REFERENCE,
local=False,
value='http://acplt.org/Properties/SimpleProperty',
id_type=model.KeyType.IRI
type_=model.KeyTypes.GLOBAL_REFERENCE,
value='http://acplt.org/Properties/SimpleProperty'
),)
)
property = model.Property(
Expand Down
147 changes: 82 additions & 65 deletions basyx/aas/adapter/_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,87 +12,104 @@

from basyx.aas import model

MODELING_KIND: Dict[model.ModelingKind, str] = {
model.ModelingKind.TEMPLATE: 'Template',
model.ModelingKind.INSTANCE: 'Instance'}
# XML Namespace definition
XML_NS_MAP = {"aas": "https://admin-shell.io/aas/3/0"}
XML_NS_AAS = "{" + XML_NS_MAP["aas"] + "}"

MODELLING_KIND: Dict[model.ModellingKind, str] = {
model.ModellingKind.TEMPLATE: 'Template',
model.ModellingKind.INSTANCE: 'Instance'}

ASSET_KIND: Dict[model.AssetKind, str] = {
model.AssetKind.TYPE: 'Type',
model.AssetKind.INSTANCE: 'Instance'}
model.AssetKind.INSTANCE: 'Instance',
model.AssetKind.NOT_APPLICABLE: 'NotApplicable'}

QUALIFIER_KIND: Dict[model.QualifierKind, str] = {
model.QualifierKind.CONCEPT_QUALIFIER: 'ConceptQualifier',
model.QualifierKind.TEMPLATE_QUALIFIER: 'TemplateQualifier',
model.QualifierKind.VALUE_QUALIFIER: 'ValueQualifier'}

DIRECTION: Dict[model.Direction, str] = {
model.Direction.INPUT: 'input',
model.Direction.OUTPUT: 'output'}

KEY_ELEMENTS: Dict[model.KeyElements, str] = {
model.KeyElements.ASSET: 'Asset',
model.KeyElements.ASSET_ADMINISTRATION_SHELL: 'AssetAdministrationShell',
model.KeyElements.CONCEPT_DESCRIPTION: 'ConceptDescription',
model.KeyElements.SUBMODEL: 'Submodel',
model.KeyElements.ANNOTATED_RELATIONSHIP_ELEMENT: 'AnnotatedRelationshipElement',
model.KeyElements.BASIC_EVENT: 'BasicEvent',
model.KeyElements.BLOB: 'Blob',
model.KeyElements.CAPABILITY: 'Capability',
model.KeyElements.CONCEPT_DICTIONARY: 'ConceptDictionary',
model.KeyElements.DATA_ELEMENT: 'DataElement',
model.KeyElements.ENTITY: 'Entity',
model.KeyElements.EVENT: 'Event',
model.KeyElements.FILE: 'File',
model.KeyElements.MULTI_LANGUAGE_PROPERTY: 'MultiLanguageProperty',
model.KeyElements.OPERATION: 'Operation',
model.KeyElements.PROPERTY: 'Property',
model.KeyElements.RANGE: 'Range',
model.KeyElements.REFERENCE_ELEMENT: 'ReferenceElement',
model.KeyElements.RELATIONSHIP_ELEMENT: 'RelationshipElement',
model.KeyElements.SUBMODEL_ELEMENT: 'SubmodelElement',
model.KeyElements.SUBMODEL_ELEMENT_COLLECTION: 'SubmodelElementCollection',
model.KeyElements.VIEW: 'View',
model.KeyElements.GLOBAL_REFERENCE: 'GlobalReference',
model.KeyElements.FRAGMENT_REFERENCE: 'FragmentReference'}
STATE_OF_EVENT: Dict[model.StateOfEvent, str] = {
model.StateOfEvent.ON: 'on',
model.StateOfEvent.OFF: 'off'}

KEY_TYPES: Dict[model.KeyType, str] = {
model.KeyType.CUSTOM: 'Custom',
model.KeyType.IRDI: 'IRDI',
model.KeyType.IRI: 'IRI',
model.KeyType.IDSHORT: 'IdShort',
model.KeyType.FRAGMENT_ID: 'FragmentId'}
REFERENCE_TYPES: Dict[Type[model.Reference], str] = {
model.ExternalReference: 'ExternalReference',
model.ModelReference: 'ModelReference'}

IDENTIFIER_TYPES: Dict[model.IdentifierType, str] = {
model.IdentifierType.CUSTOM: 'Custom',
model.IdentifierType.IRDI: 'IRDI',
model.IdentifierType.IRI: 'IRI'}
KEY_TYPES: Dict[model.KeyTypes, str] = {
model.KeyTypes.ASSET_ADMINISTRATION_SHELL: 'AssetAdministrationShell',
model.KeyTypes.CONCEPT_DESCRIPTION: 'ConceptDescription',
model.KeyTypes.SUBMODEL: 'Submodel',
model.KeyTypes.ANNOTATED_RELATIONSHIP_ELEMENT: 'AnnotatedRelationshipElement',
model.KeyTypes.BASIC_EVENT_ELEMENT: 'BasicEventElement',
model.KeyTypes.BLOB: 'Blob',
model.KeyTypes.CAPABILITY: 'Capability',
model.KeyTypes.DATA_ELEMENT: 'DataElement',
model.KeyTypes.ENTITY: 'Entity',
model.KeyTypes.EVENT_ELEMENT: 'EventElement',
model.KeyTypes.FILE: 'File',
model.KeyTypes.MULTI_LANGUAGE_PROPERTY: 'MultiLanguageProperty',
model.KeyTypes.OPERATION: 'Operation',
model.KeyTypes.PROPERTY: 'Property',
model.KeyTypes.RANGE: 'Range',
model.KeyTypes.REFERENCE_ELEMENT: 'ReferenceElement',
model.KeyTypes.RELATIONSHIP_ELEMENT: 'RelationshipElement',
model.KeyTypes.SUBMODEL_ELEMENT: 'SubmodelElement',
model.KeyTypes.SUBMODEL_ELEMENT_COLLECTION: 'SubmodelElementCollection',
model.KeyTypes.SUBMODEL_ELEMENT_LIST: 'SubmodelElementList',
model.KeyTypes.GLOBAL_REFERENCE: 'GlobalReference',
model.KeyTypes.FRAGMENT_REFERENCE: 'FragmentReference'}

ENTITY_TYPES: Dict[model.EntityType, str] = {
model.EntityType.CO_MANAGED_ENTITY: 'CoManagedEntity',
model.EntityType.SELF_MANAGED_ENTITY: 'SelfManagedEntity'}

IEC61360_DATA_TYPES: Dict[model.concept.IEC61360DataType, str] = {
model.concept.IEC61360DataType.DATE: 'DATE',
model.concept.IEC61360DataType.STRING: 'STRING',
model.concept.IEC61360DataType.STRING_TRANSLATABLE: 'STRING_TRANSLATABLE',
model.concept.IEC61360DataType.REAL_MEASURE: 'REAL_MEASURE',
model.concept.IEC61360DataType.REAL_COUNT: 'REAL_COUNT',
model.concept.IEC61360DataType.REAL_CURRENCY: 'REAL_CURRENCY',
model.concept.IEC61360DataType.BOOLEAN: 'BOOLEAN',
model.concept.IEC61360DataType.URL: 'URL',
model.concept.IEC61360DataType.RATIONAL: 'RATIONAL',
model.concept.IEC61360DataType.RATIONAL_MEASURE: 'RATIONAL_MEASURE',
model.concept.IEC61360DataType.TIME: 'TIME',
model.concept.IEC61360DataType.TIMESTAMP: 'TIMESTAMP',
IEC61360_DATA_TYPES: Dict[model.base.DataTypeIEC61360, str] = {
model.base.DataTypeIEC61360.DATE: 'DATE',
model.base.DataTypeIEC61360.STRING: 'STRING',
model.base.DataTypeIEC61360.STRING_TRANSLATABLE: 'STRING_TRANSLATABLE',
model.base.DataTypeIEC61360.INTEGER_MEASURE: 'INTEGER_MEASURE',
model.base.DataTypeIEC61360.INTEGER_COUNT: 'INTEGER_COUNT',
model.base.DataTypeIEC61360.INTEGER_CURRENCY: 'INTEGER_CURRENCY',
model.base.DataTypeIEC61360.REAL_MEASURE: 'REAL_MEASURE',
model.base.DataTypeIEC61360.REAL_COUNT: 'REAL_COUNT',
model.base.DataTypeIEC61360.REAL_CURRENCY: 'REAL_CURRENCY',
model.base.DataTypeIEC61360.BOOLEAN: 'BOOLEAN',
model.base.DataTypeIEC61360.IRI: 'IRI',
model.base.DataTypeIEC61360.IRDI: 'IRDI',
model.base.DataTypeIEC61360.RATIONAL: 'RATIONAL',
model.base.DataTypeIEC61360.RATIONAL_MEASURE: 'RATIONAL_MEASURE',
model.base.DataTypeIEC61360.TIME: 'TIME',
model.base.DataTypeIEC61360.TIMESTAMP: 'TIMESTAMP',
model.base.DataTypeIEC61360.HTML: 'HTML',
model.base.DataTypeIEC61360.BLOB: 'BLOB',
model.base.DataTypeIEC61360.FILE: 'FILE',
}

IEC61360_LEVEL_TYPES: Dict[model.concept.IEC61360LevelType, str] = {
model.concept.IEC61360LevelType.MIN: 'Min',
model.concept.IEC61360LevelType.MAX: 'Max',
model.concept.IEC61360LevelType.NOM: 'Nom',
model.concept.IEC61360LevelType.TYP: 'Typ',
IEC61360_LEVEL_TYPES: Dict[model.base.IEC61360LevelType, str] = {
model.base.IEC61360LevelType.MIN: 'min',
model.base.IEC61360LevelType.NOM: 'nom',
model.base.IEC61360LevelType.TYP: 'typ',
model.base.IEC61360LevelType.MAX: 'max',
}

MODELING_KIND_INVERSE: Dict[str, model.ModelingKind] = {v: k for k, v in MODELING_KIND.items()}
MODELLING_KIND_INVERSE: Dict[str, model.ModellingKind] = {v: k for k, v in MODELLING_KIND.items()}
ASSET_KIND_INVERSE: Dict[str, model.AssetKind] = {v: k for k, v in ASSET_KIND.items()}
KEY_ELEMENTS_INVERSE: Dict[str, model.KeyElements] = {v: k for k, v in KEY_ELEMENTS.items()}
KEY_TYPES_INVERSE: Dict[str, model.KeyType] = {v: k for k, v in KEY_TYPES.items()}
IDENTIFIER_TYPES_INVERSE: Dict[str, model.IdentifierType] = {v: k for k, v in IDENTIFIER_TYPES.items()}
QUALIFIER_KIND_INVERSE: Dict[str, model.QualifierKind] = {v: k for k, v in QUALIFIER_KIND.items()}
DIRECTION_INVERSE: Dict[str, model.Direction] = {v: k for k, v in DIRECTION.items()}
STATE_OF_EVENT_INVERSE: Dict[str, model.StateOfEvent] = {v: k for k, v in STATE_OF_EVENT.items()}
REFERENCE_TYPES_INVERSE: Dict[str, Type[model.Reference]] = {v: k for k, v in REFERENCE_TYPES.items()}
KEY_TYPES_INVERSE: Dict[str, model.KeyTypes] = {v: k for k, v in KEY_TYPES.items()}
ENTITY_TYPES_INVERSE: Dict[str, model.EntityType] = {v: k for k, v in ENTITY_TYPES.items()}
IEC61360_DATA_TYPES_INVERSE: Dict[str, model.concept.IEC61360DataType] = {v: k for k, v in IEC61360_DATA_TYPES.items()}
IEC61360_LEVEL_TYPES_INVERSE: Dict[str, model.concept.IEC61360LevelType] = \
IEC61360_DATA_TYPES_INVERSE: Dict[str, model.base.DataTypeIEC61360] = {v: k for k, v in IEC61360_DATA_TYPES.items()}
IEC61360_LEVEL_TYPES_INVERSE: Dict[str, model.base.IEC61360LevelType] = \
{v: k for k, v in IEC61360_LEVEL_TYPES.items()}

KEY_ELEMENTS_CLASSES_INVERSE: Dict[model.KeyElements, Type[model.Referable]] = \
{v: k for k, v in model.KEY_ELEMENTS_CLASSES.items()}
KEY_TYPES_CLASSES_INVERSE: Dict[model.KeyTypes, Type[model.Referable]] = \
{v: k for k, v in model.KEY_TYPES_CLASSES.items()}
Loading
Loading