diff --git a/basyx/aas/examples/tutorial_aasx.py b/basyx/aas/examples/tutorial_aasx.py index 3e7e59748..9e5ca4c0b 100755 --- a/basyx/aas/examples/tutorial_aasx.py +++ b/basyx/aas/examples/tutorial_aasx.py @@ -23,10 +23,10 @@ ######################################################################################### -# Step 1: Setting up an SupplementaryFileContainer and AAS & submodel with File objects # +# Step 1: Setting up a SupplementaryFileContainer and AAS & submodel with File objects # ######################################################################################### -# Let's first create a basic Asset Adminstration Shell with a simple submodel. +# Let's first create a basic Asset Administration Shell with a simple submodel. # See `tutorial_create_simple_aas.py` for more details. submodel = model.Submodel( @@ -52,8 +52,8 @@ object_store = model.DictObjectStore([submodel, aas, unrelated_submodel]) -# For holding auxiliary files, which will eventually be added to an AASX package, we need an SupplementaryFileContainer. -# The `DictSupplementaryFileContainer` is a simple SupplementaryFileContainer, that stores the files' contents in simple +# For holding auxiliary files, which will eventually be added to an AASX package, we need a SupplementaryFileContainer. +# The `DictSupplementaryFileContainer` is a simple SupplementaryFileContainer that stores the files' contents in simple # bytes objects in memory. file_store = aasx.DictSupplementaryFileContainer() @@ -62,7 +62,7 @@ # For this purpose, we need to specify the file's name in the SupplementaryFileContainer. This name is used to reference # the file in the container and will later be used as the filename in the AASX package file. Thus, this file must begin # with a slash and should begin with `/aasx/`. Here, we use `/aasx/suppl/MyExampleFile.pdf`. The -# SupplementaryFileContainer's add_file() method will ensure uniqueness of the name by adding a suffix if a equally +# SupplementaryFileContainer's add_file() method will ensure uniqueness of the name by adding a suffix if an equally # named file with different contents exists. The final name is returned. # # In addition, we need to specify the MIME type of the file, which is later used in the metadata of the AASX package. @@ -99,7 +99,7 @@ # objects and fetch the referenced auxiliary files from the SupplementaryFileContainer. # In order to add more than one AAS to the package, we can simply add more Identifiers to the `aas_ids` list. # - # ATTENTION: As of Version 3.0 RC01 of Details of the Asset Administration Shell, it is not longer valid to add more + # ATTENTION: As of Version 3.0 RC01 of Details of the Asset Administration Shell, it is no longer valid to add more # than one "aas-spec" part (JSON/XML part with AAS objects) to an AASX package. Thus, `write_aas` MUST # only be called once per AASX package! writer.write_aas(aas_ids=['https://acplt.org/Simple_AAS'], @@ -110,7 +110,7 @@ # only an AAS and referenced objects) in the AASX package manually. `write_aas_objects()` will also take care of # adding referenced auxiliary files by scanning all submodel objects for contained `File` objects. # - # ATTENTION: As of Version 3.0 RC01 of Details of the Asset Administration Shell, it is not longer valid to add more + # ATTENTION: As of Version 3.0 RC01 of Details of the Asset Administration Shell, it is no longer valid to add more # than one "aas-spec" part (JSON/XML part with AAS objects) to an AASX package. Thus, `write_all_aas_objects` SHALL # only be used as an alternative to `write_aas` and SHALL only be called once! objects_to_be_written: model.DictObjectStore[model.Identifiable] = model.DictObjectStore([unrelated_submodel]) @@ -125,7 +125,7 @@ writer.write_core_properties(meta_data) # Closing the AASXWriter will write some required parts with relationships and MIME types to the AASX package file and -# close the package file afterwards. Make sure, to always call `AASXWriter.close()` or use the AASXWriter in a `with` +# close the package file afterward. Make sure, to always call `AASXWriter.close()` or use the AASXWriter in a `with` # statement (as a context manager) as shown above. @@ -145,7 +145,7 @@ reader.read_into(object_store=new_object_store, file_store=new_file_store) - # We can also read the meta data + # We can also read the metadata new_meta_data = reader.get_core_properties() # We could also read the thumbnail image, using `reader.get_thumbnail()` diff --git a/basyx/aas/examples/tutorial_backend_couchdb.py b/basyx/aas/examples/tutorial_backend_couchdb.py index 67b3c1241..4276dcf45 100755 --- a/basyx/aas/examples/tutorial_backend_couchdb.py +++ b/basyx/aas/examples/tutorial_backend_couchdb.py @@ -30,9 +30,9 @@ # Afterwards you can add the new user to the set of "Members" of your new database (via the "Permissions" section in the # user interface). Alternatively, you can use the admin credentials with the BaSyx Python SDK (see below). -# Step by Step Guide: +# Step-by-Step Guide: # step 1: connecting to a CouchDB server -# step 2: storing objects in the CouchDBObjectStore +# step 2: storing objects in CouchDBObjectStore # step 3: updating objects from the CouchDB and committing changes @@ -58,7 +58,7 @@ # Provide the login credentials to the CouchDB backend. -# These credetials are used, whenever communication with this CouchDB server is required (either via the +# These credentials are used whenever communication with this CouchDB server is required either via the # CouchDBObjectStore or via the update()/commit() backend. basyx.aas.backend.couchdb.register_credentials(couchdb_url, couchdb_user, couchdb_password) @@ -82,7 +82,7 @@ ################################################################### -# Step 3: Updating Objects from the CouchDB and Commiting Changes # +# Step 3: Updating Objects from the CouchDB and Committing Changes # ################################################################### # Since the CouchDBObjectStore has set the `source` attribute of our Submodel objects, we can now use update() and diff --git a/basyx/aas/examples/tutorial_create_simple_aas.py b/basyx/aas/examples/tutorial_create_simple_aas.py index c7fcb7be0..afa8b46c0 100755 --- a/basyx/aas/examples/tutorial_create_simple_aas.py +++ b/basyx/aas/examples/tutorial_create_simple_aas.py @@ -2,20 +2,20 @@ # This work is licensed under a Creative Commons CCZero 1.0 Universal License. # See http://creativecommons.org/publicdomain/zero/1.0/ for more information. """ -Tutorial for the creation of an simple Asset Administration Shell, containing an AssetInformation object and a Submodel +Tutorial for the creation of a simple Asset Administration Shell, containing an AssetInformation object and a Submodel reference """ # Import all Eclipse BaSyx Python SDK classes from model package from basyx.aas import model -# In this tutorial, you'll get a step by step guide on how to create an Asset Administration Shell (AAS) and all +# 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, # an Asset Administration Shell can be created. Then, it's possible to add Submodels to the AAS. The Submodels can # contain SubmodelElements. # -# Step by Step Guide: -# Step 1: create a simple Asset Administration Shell, containing an AssetInformation object +# Step-by-Step Guide: +# Step 1: create a simple Asset Administration Shell, containing AssetInformation object # Step 2: create a simple Submodel # Step 3: create a simple Property and add it to the Submodel @@ -91,7 +91,7 @@ # ===================================================================== # ALTERNATIVE: step 2 and 3 can also be combined in a single statement: -# Again, we pass the Property to the Submodel's constructor instead of adding it afterwards. +# Again, we pass the Property to the Submodel's constructor instead of adding it afterward. submodel = model.Submodel( id_='https://acplt.org/Simple_Submodel', submodel_element={ diff --git a/basyx/aas/examples/tutorial_serialization_deserialization.py b/basyx/aas/examples/tutorial_serialization_deserialization.py index 8f7b36949..a163dd9f0 100755 --- a/basyx/aas/examples/tutorial_serialization_deserialization.py +++ b/basyx/aas/examples/tutorial_serialization_deserialization.py @@ -13,11 +13,11 @@ import basyx.aas.adapter.xml # 'Details of the Asset Administration Shell' specifies multiple official serialization formats for AAS data. In this -# tutorial, we show, how the Eclipse BaSyx Python library can be used to serialize AAS objects into JSON or XML and to -# create JSON/XML files according to the standardized format. It is also demonstrated, how these files can be parsed to +# tutorial, we show how the Eclipse BaSyx Python library can be used to serialize AAS objects into JSON or XML and to +# create JSON/XML files, according to the standardized format. It is also demonstrated how these files can be parsed to # restore the AAS objects as Python objects. # -# Step by Step Guide: +# Step-by-Step Guide: # Step 1: creating Submodel and Asset Administration Shell objects # Step 2: serializing single objects to JSON # Step 3: parsing single objects or custom data structures from JSON @@ -56,7 +56,7 @@ # Step 2: Serializing Single Objects to JSON # ############################################## -# Before serializing the data, we should make sure, it's up to data. This is irrelevant for the static AAS objects in +# Before serializing the data, we should make sure, it's up-to-date. This is irrelevant for the static AAS objects in # this tutorial, but may be important when dealing with dynamic data. # See `tutorial_dynamic_model.py` for more information on that topic. aashell.update() @@ -103,7 +103,7 @@ obj_store.add(submodel) obj_store.add(aashell) -# step 4.2: Again, make sure that the data is up to date +# step 4.2: Again, make sure that the data is up-to-date submodel.update() aashell.update() diff --git a/basyx/aas/examples/tutorial_storage.py b/basyx/aas/examples/tutorial_storage.py index d479dae05..98ef7781d 100755 --- a/basyx/aas/examples/tutorial_storage.py +++ b/basyx/aas/examples/tutorial_storage.py @@ -12,7 +12,7 @@ # objects, which can be used to easily get the Submodel objects, which are referenced by the # `AssetAdministrationShell.submodel` set, etc. # -# Step by Step Guide: +# Step-by-Step Guide: # Step 1: creating AssetInformation, Submodel and Asset Administration Shell objects # Step 2: storing the data in an ObjectStore for easier handling # Step 3: retrieving objects from the store by their identifier @@ -64,8 +64,8 @@ # # In this tutorial, we use a `DictObjectStore`, which is a simple in-memory store: It just keeps track of the Python # objects using a dict. -# This may not be a suitable solution, if you need to manage large numbers of objects or objects must kept in a -# persistent memory (i.e. on hard disk). In this case, you may chose the `CouchDBObjectStore` from +# This may not be a suitable solution, if you need to manage large numbers of objects or objects must be kept in a +# persistent memory (i.e. on hard disk). In this case, you may choose the `CouchDBObjectStore` from # `aas.backends.couchdb` to use a CouchDB database server as persistent storage. Both ObjectStore implementations # provide the same interface. In addition, the CouchDBObjectStores allows synchronizing the local object with the # database via a Backend and the update()/commit() mechanism. See the `tutorial_backend_couchdb.py` for more