Skip to content

Commit 5e08a46

Browse files
authored
examples: Fix typos in tutorials (#179)
1 parent 5255a1f commit 5e08a46

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

basyx/aas/examples/tutorial_aasx.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
# step 3: Reading AAS objects and auxiliary files from an AASX package
2323

2424

25-
#########################################################################################
26-
# Step 1: Setting up an SupplementaryFileContainer and AAS & submodel with File objects #
27-
#########################################################################################
25+
########################################################################################
26+
# Step 1: Setting up a SupplementaryFileContainer and AAS & submodel with File objects #
27+
########################################################################################
2828

29-
# Let's first create a basic Asset Adminstration Shell with a simple submodel.
29+
# Let's first create a basic Asset Administration Shell with a simple submodel.
3030
# See `tutorial_create_simple_aas.py` for more details.
3131

3232
submodel = model.Submodel(
@@ -52,8 +52,8 @@
5252
object_store = model.DictObjectStore([submodel, aas, unrelated_submodel])
5353

5454

55-
# For holding auxiliary files, which will eventually be added to an AASX package, we need an SupplementaryFileContainer.
56-
# The `DictSupplementaryFileContainer` is a simple SupplementaryFileContainer, that stores the files' contents in simple
55+
# For holding auxiliary files, which will eventually be added to an AASX package, we need a SupplementaryFileContainer.
56+
# The `DictSupplementaryFileContainer` is a simple SupplementaryFileContainer that stores the files' contents in simple
5757
# bytes objects in memory.
5858
file_store = aasx.DictSupplementaryFileContainer()
5959

@@ -62,7 +62,7 @@
6262
# For this purpose, we need to specify the file's name in the SupplementaryFileContainer. This name is used to reference
6363
# the file in the container and will later be used as the filename in the AASX package file. Thus, this file must begin
6464
# with a slash and should begin with `/aasx/`. Here, we use `/aasx/suppl/MyExampleFile.pdf`. The
65-
# SupplementaryFileContainer's add_file() method will ensure uniqueness of the name by adding a suffix if a equally
65+
# SupplementaryFileContainer's add_file() method will ensure uniqueness of the name by adding a suffix if an equally
6666
# named file with different contents exists. The final name is returned.
6767
#
6868
# 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 @@
9999
# objects and fetch the referenced auxiliary files from the SupplementaryFileContainer.
100100
# In order to add more than one AAS to the package, we can simply add more Identifiers to the `aas_ids` list.
101101
#
102-
# ATTENTION: As of Version 3.0 RC01 of Details of the Asset Administration Shell, it is not longer valid to add more
102+
# ATTENTION: As of Version 3.0 RC01 of Details of the Asset Administration Shell, it is no longer valid to add more
103103
# than one "aas-spec" part (JSON/XML part with AAS objects) to an AASX package. Thus, `write_aas` MUST
104104
# only be called once per AASX package!
105105
writer.write_aas(aas_ids=['https://acplt.org/Simple_AAS'],
@@ -110,7 +110,7 @@
110110
# only an AAS and referenced objects) in the AASX package manually. `write_aas_objects()` will also take care of
111111
# adding referenced auxiliary files by scanning all submodel objects for contained `File` objects.
112112
#
113-
# ATTENTION: As of Version 3.0 RC01 of Details of the Asset Administration Shell, it is not longer valid to add more
113+
# ATTENTION: As of Version 3.0 RC01 of Details of the Asset Administration Shell, it is no longer valid to add more
114114
# than one "aas-spec" part (JSON/XML part with AAS objects) to an AASX package. Thus, `write_all_aas_objects` SHALL
115115
# only be used as an alternative to `write_aas` and SHALL only be called once!
116116
objects_to_be_written: model.DictObjectStore[model.Identifiable] = model.DictObjectStore([unrelated_submodel])
@@ -125,7 +125,7 @@
125125
writer.write_core_properties(meta_data)
126126

127127
# Closing the AASXWriter will write some required parts with relationships and MIME types to the AASX package file and
128-
# close the package file afterwards. Make sure, to always call `AASXWriter.close()` or use the AASXWriter in a `with`
128+
# close the package file afterward. Make sure, to always call `AASXWriter.close()` or use the AASXWriter in a `with`
129129
# statement (as a context manager) as shown above.
130130

131131

@@ -145,7 +145,7 @@
145145
reader.read_into(object_store=new_object_store,
146146
file_store=new_file_store)
147147

148-
# We can also read the meta data
148+
# We can also read the metadata
149149
new_meta_data = reader.get_core_properties()
150150

151151
# We could also read the thumbnail image, using `reader.get_thumbnail()`

basyx/aas/examples/tutorial_backend_couchdb.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
# Afterwards you can add the new user to the set of "Members" of your new database (via the "Permissions" section in the
3131
# user interface). Alternatively, you can use the admin credentials with the BaSyx Python SDK (see below).
3232

33-
# Step by Step Guide:
33+
# Step-by-Step Guide:
3434
# step 1: connecting to a CouchDB server
35-
# step 2: storing objects in the CouchDBObjectStore
35+
# step 2: storing objects in CouchDBObjectStore
3636
# step 3: updating objects from the CouchDB and committing changes
3737

3838

@@ -58,7 +58,7 @@
5858

5959

6060
# Provide the login credentials to the CouchDB backend.
61-
# These credetials are used, whenever communication with this CouchDB server is required (either via the
61+
# These credentials are used whenever communication with this CouchDB server is required either via the
6262
# CouchDBObjectStore or via the update()/commit() backend.
6363
basyx.aas.backend.couchdb.register_credentials(couchdb_url, couchdb_user, couchdb_password)
6464

@@ -81,9 +81,9 @@
8181
object_store.add(example_submodel2)
8282

8383

84-
###################################################################
85-
# Step 3: Updating Objects from the CouchDB and Commiting Changes #
86-
###################################################################
84+
####################################################################
85+
# Step 3: Updating Objects from the CouchDB and Committing Changes #
86+
####################################################################
8787

8888
# Since the CouchDBObjectStore has set the `source` attribute of our Submodel objects, we can now use update() and
8989
# commit() to synchronize changes to these objects with the database. The `source` indicates (via its URI scheme) that

basyx/aas/examples/tutorial_create_simple_aas.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
# This work is licensed under a Creative Commons CCZero 1.0 Universal License.
33
# See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
44
"""
5-
Tutorial for the creation of an simple Asset Administration Shell, containing an AssetInformation object and a Submodel
5+
Tutorial for the creation of a simple Asset Administration Shell, containing an AssetInformation object and a Submodel
66
reference
77
"""
88

99
# Import all Eclipse BaSyx Python SDK classes from model package
1010
from basyx.aas import model
1111

12-
# In this tutorial, you'll get a step by step guide on how to create an Asset Administration Shell (AAS) and all
12+
# In this tutorial, you'll get a step-by-step guide on how to create an Asset Administration Shell (AAS) and all
1313
# required objects within. First, you need an AssetInformation object for which you want to create an AAS. After that,
1414
# an Asset Administration Shell can be created. Then, it's possible to add Submodels to the AAS. The Submodels can
1515
# contain SubmodelElements.
1616
#
17-
# Step by Step Guide:
18-
# Step 1: create a simple Asset Administration Shell, containing an AssetInformation object
17+
# Step-by-Step Guide:
18+
# Step 1: create a simple Asset Administration Shell, containing AssetInformation object
1919
# Step 2: create a simple Submodel
2020
# Step 3: create a simple Property and add it to the Submodel
2121

@@ -91,7 +91,7 @@
9191

9292
# =====================================================================
9393
# ALTERNATIVE: step 2 and 3 can also be combined in a single statement:
94-
# Again, we pass the Property to the Submodel's constructor instead of adding it afterwards.
94+
# Again, we pass the Property to the Submodel's constructor instead of adding it afterward.
9595
submodel = model.Submodel(
9696
id_='https://acplt.org/Simple_Submodel',
9797
submodel_element={

basyx/aas/examples/tutorial_serialization_deserialization.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
import basyx.aas.adapter.xml
1414

1515
# 'Details of the Asset Administration Shell' specifies multiple official serialization formats for AAS data. In this
16-
# tutorial, we show, how the Eclipse BaSyx Python library can be used to serialize AAS objects into JSON or XML and to
17-
# create JSON/XML files according to the standardized format. It is also demonstrated, how these files can be parsed to
16+
# tutorial, we show how the Eclipse BaSyx Python library can be used to serialize AAS objects into JSON or XML and to
17+
# create JSON/XML files, according to the standardized format. It is also demonstrated how these files can be parsed to
1818
# restore the AAS objects as Python objects.
1919
#
20-
# Step by Step Guide:
20+
# Step-by-Step Guide:
2121
# Step 1: creating Submodel and Asset Administration Shell objects
2222
# Step 2: serializing single objects to JSON
2323
# Step 3: parsing single objects or custom data structures from JSON
@@ -56,7 +56,7 @@
5656
# Step 2: Serializing Single Objects to JSON #
5757
##############################################
5858

59-
# Before serializing the data, we should make sure, it's up to data. This is irrelevant for the static AAS objects in
59+
# Before serializing the data, we should make sure, it's up-to-date. This is irrelevant for the static AAS objects in
6060
# this tutorial, but may be important when dealing with dynamic data.
6161
# See `tutorial_dynamic_model.py` for more information on that topic.
6262
aashell.update()
@@ -103,7 +103,7 @@
103103
obj_store.add(submodel)
104104
obj_store.add(aashell)
105105

106-
# step 4.2: Again, make sure that the data is up to date
106+
# step 4.2: Again, make sure that the data is up-to-date
107107
submodel.update()
108108
aashell.update()
109109

basyx/aas/examples/tutorial_storage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# objects, which can be used to easily get the Submodel objects, which are referenced by the
1313
# `AssetAdministrationShell.submodel` set, etc.
1414
#
15-
# Step by Step Guide:
15+
# Step-by-Step Guide:
1616
# Step 1: creating AssetInformation, Submodel and Asset Administration Shell objects
1717
# Step 2: storing the data in an ObjectStore for easier handling
1818
# Step 3: retrieving objects from the store by their identifier
@@ -64,8 +64,8 @@
6464
#
6565
# In this tutorial, we use a `DictObjectStore`, which is a simple in-memory store: It just keeps track of the Python
6666
# objects using a dict.
67-
# This may not be a suitable solution, if you need to manage large numbers of objects or objects must kept in a
68-
# persistent memory (i.e. on hard disk). In this case, you may chose the `CouchDBObjectStore` from
67+
# This may not be a suitable solution, if you need to manage large numbers of objects or objects must be kept in a
68+
# persistent memory (i.e. on hard disk). In this case, you may choose the `CouchDBObjectStore` from
6969
# `aas.backends.couchdb` to use a CouchDB database server as persistent storage. Both ObjectStore implementations
7070
# provide the same interface. In addition, the CouchDBObjectStores allows synchronizing the local object with the
7171
# database via a Backend and the update()/commit() mechanism. See the `tutorial_backend_couchdb.py` for more

0 commit comments

Comments
 (0)