Skip to content

Commit 6fa7670

Browse files
committed
fix typos, add codespell ignore to pass style checks
fix potential typos in python string concatenation fix another typo fix 'stora' typos fix 'diffucult' typo ignore codespell warning for .metrix
1 parent bcca820 commit 6fa7670

24 files changed

+37
-37
lines changed

config/adamant.configuration.yaml.original

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ccsds_packet_buffer_size: 1274
7474
# define the amount of "usable" stack used by the Stack Monitor component. You should
7575
# size this value as small as possible, but the value MUST be larger than the amount
7676
# of stack that a task uses prior to calling the Cycle procedure the first time, and MUST
77-
# be smaller than that smallest task stack efined in the system. When in doubt, leave
77+
# be smaller than that smallest task stack defined in the system. When in doubt, leave
7878
# this value at the default.
7979
#
8080
# Note, this value only affects bareboard runtimes. Linux uses a predefined stack margin

doc/QuickStartGuide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ redo build/src/<component_name>_events.adb
337337
redo build/src/<component_name>_events.ads
338338
```
339339

340-
You can view an html table of your events by running `redo build/html/<component_name>_events.html`. The autgenerated source code for creating events can be found in `build/src/<component_name>_events.ad[b,s]`. The representation package, which allows you to print events in a human readable form is generated in `build/src/<component_name>_events-representation.ad[b,s]`. Each of these source code packages can be compiled into their corresponding objects using the `redo build/obj/..` commands above.
340+
You can view an html table of your events by running `redo build/html/<component_name>_events.html`. The autogenerated source code for creating events can be found in `build/src/<component_name>_events.ad[b,s]`. The representation package, which allows you to print events in a human readable form is generated in `build/src/<component_name>_events-representation.ad[b,s]`. Each of these source code packages can be compiled into their corresponding objects using the `redo build/obj/..` commands above.
341341

342342
Now, you will be able to create events inside of your component using the `self.events` record element.
343343

@@ -368,7 +368,7 @@ redo build/src/<component_name>_data_products.adb
368368
redo build/src/<component_name>_data_products.ads
369369
```
370370

371-
You can view an html table of your data products by running `redo build/html/<component_name>_data_products.html`. The autgenerated source code for creating data products can be found in `build/src/<component_name>_data_products.ad[b,s]`. The representation package, which allows you to print data products in a human readable form is generated in `build/src/<component_name>_data_products-representation.ad[b,s]`. Each of these source code packages can be compiled into their corresponding objects using the `redo build/obj/..` commands above.
371+
You can view an html table of your data products by running `redo build/html/<component_name>_data_products.html`. The autogenerated source code for creating data products can be found in `build/src/<component_name>_data_products.ad[b,s]`. The representation package, which allows you to print data products in a human readable form is generated in `build/src/<component_name>_data_products-representation.ad[b,s]`. Each of these source code packages can be compiled into their corresponding objects using the `redo build/obj/..` commands above.
372372

373373
Now, you will be able to create data products inside of your component using the `self.data_products` record element.
374374

@@ -395,7 +395,7 @@ redo build/src/<component_name>_commands.adb
395395
redo build/src/<component_name>_commands.ads
396396
```
397397

398-
You can view an html table of your commands by running `redo build/html/<component_name>_commands.html`. The autgenerated source code for creating commands can be found in `build/src/<component_name>_commands.ad[b,s]`. This source code packages can be compiled into its corresponding objects using the `redo build/obj/Linux/<component_name>_commands.o` command.
398+
You can view an html table of your commands by running `redo build/html/<component_name>_commands.html`. The autogenerated source code for creating commands can be found in `build/src/<component_name>_commands.ad[b,s]`. This source code packages can be compiled into its corresponding objects using the `redo build/obj/Linux/<component_name>_commands.o` command.
399399

400400
Now, the autocoder will generate the code necessary to route commands to specific user-implemented handler functions. You can see these handlers if you generate the component template code following the instructions in the "Creating a Component" section.
401401

doc/user_guide/user_guide.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ \subsubsection{``White-box" Unit Testing}
12361236
\newpage
12371237
\section{Packed Types} \label{Packed Types}
12381238

1239-
Often in embedded systems, communication protocols and hardware devices require a very specific binary format for transferred bytes or bits to properly function. However, technical differences in processors and compilers can often make code built to talk to these devices diffucult to implement in a cross-platform and portable way. For instance, processors used in the design of embedded systems can be either big or little endian, depending on the chosen platform. Embedded systems often communicate with other embedded processors or end-user systems which have an endianness different from their own. If not carefully handled, these differences in endianness can be one of the largest sources of defects encountered while debugging embedded software. Besides endianness issues, the ``packed"-ness, that is, the amount of padding supplied around individual types, of a struct or array in processor memory differs based on the compiler used. The differences in endianness and ``packed"-ness can make writing portable software difficult without a layer of abstraction to handle the differences. \\
1239+
Often in embedded systems, communication protocols and hardware devices require a very specific binary format for transferred bytes or bits to properly function. However, technical differences in processors and compilers can often make code built to talk to these devices difficult to implement in a cross-platform and portable way. For instance, processors used in the design of embedded systems can be either big or little endian, depending on the chosen platform. Embedded systems often communicate with other embedded processors or end-user systems which have an endianness different from their own. If not carefully handled, these differences in endianness can be one of the largest sources of defects encountered while debugging embedded software. Besides endianness issues, the ``packed"-ness, that is, the amount of padding supplied around individual types, of a struct or array in processor memory differs based on the compiler used. The differences in endianness and ``packed"-ness can make writing portable software difficult without a layer of abstraction to handle the differences. \\
12401240

12411241
Adamant aims to solve these problem through the use of \textit{packed types}. In Adamant, packed types are modeled using a YAML specification. From the specification, the following type definitions are generated:
12421242

gen/templates/array/name.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,29 @@ def __init__(self, elements=[]):
3232
assert isinstance(elements, list), \
3333
"Expected type for elements to be 'list' and instead found '" + str(type(elements))
3434
assert len(elements) == self.length, \
35-
("Expected length of element array to be '" + str(self.length) + "'"
35+
("Expected length of element array to be '" + str(self.length) + "' "
3636
"but instead found length of: " + str(len(elements)))
3737
for e in elements:
3838
if e is not None:
3939
{% if element.is_packed_type %}
4040
assert isinstance(e, {{ element.type_package }}), \
41-
("Expected type for elements to be '{{ element.type_package }}'"
41+
("Expected type for elements to be '{{ element.type_package }}' "
4242
"and instead found '" + str(type(e)))
4343
{% elif element.is_enum %}
4444
assert isinstance(e, {{ element.type_model.name }}), \
45-
("Expected type for elements to be '{{ element.type_model.name }}'"
45+
("Expected type for elements to be '{{ element.type_model.name }}' "
4646
"and instead found '" + str(type(e)))
4747
{% else %}
4848
{% if element.format %}
4949
{% if element.format.length %}
5050
assert isinstance(e, list), \
5151
"Expected type for elements to be 'list' and instead found '" + str(type(e))
5252
assert len(e) == {{ element.format.length }}, \
53-
("Expected length of list for elements to be '{{ element.format.length }}'"
53+
("Expected length of list for elements to be '{{ element.format.length }}' "
5454
"but instead found a list of length '" + str(len(e)) + "'.")
5555
{% else %}
5656
assert isinstance(e, {{ element.format.get_python_type_string() }}), \
57-
("Expected type for elements to be '{{ element.format.get_python_type_string() }}'"
57+
("Expected type for elements to be '{{ element.format.get_python_type_string() }}' "
5858
"and instead found '" + str(type(e)))
5959
{% if element.format.type[0] == "U" %}
6060
assert e >= 0, \

gen/templates/record/name.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ def __init__(
4040
if {{ field.name }} is not None:
4141
{% if field.is_enum %}
4242
assert isinstance({{ field.name }}, {{ field.type_model.name }}), \
43-
("Expected type for field '{{ field.name }}' to be '{{ field.type_model.name }}'"
43+
("Expected type for field '{{ field.name }}' to be '{{ field.type_model.name }}' "
4444
" and instead found '" + str(type({{ field.name }})))
4545
{% elif field.is_packed_type %}
4646
assert isinstance({{ field.name }}, {{ field.type_package }}), \
47-
("Expected type for field '{{ field.name }}' to be '{{ field.type_package }}'"
47+
("Expected type for field '{{ field.name }}' to be '{{ field.type_package }}' "
4848
"and instead found '" + str(type({{ field.name }})))
4949
{% if field.variable_length %}
5050
# Make sure variable length field value is not larger than the packed array length
@@ -64,7 +64,7 @@ def __init__(
6464
if self.{{ field.variable_length }} is not None:
6565
assert (self.{{ field.variable_length }} + int({{ field.variable_length_offset }})) == len({{ field.name }}), \
6666
("Expected length of variable length field '{{ field.name }}' to match value of "
67-
"'{{ field.variable_length }} + int({{ field.variable_length_offset }})'"
67+
"'{{ field.variable_length }} + int({{ field.variable_length_offset }})' "
6868
"which is '" + str((self.{{ field.variable_length }} + int({{ field.variable_length_offset }}))) + ""
6969
"', but instead found length of '" + str(len({{ field.name }})) + "'.")
7070
{% else %}
@@ -75,7 +75,7 @@ def __init__(
7575
{% else %}
7676
assert isinstance({{ field.name }}, {{ field.format.get_python_type_string() }}), \
7777
("Expected type for field '{{ field.name }}' to be "
78-
"'{{ field.format.get_python_type_string() }}'"
78+
"'{{ field.format.get_python_type_string() }}' "
7979
"and instead found '" + str(type({{ field.name }})))
8080
{% if field.format.type[0] == "U" %}
8181
assert {{ field.name }} >= 0, \

redo/rules/build_metric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _build(self, redo_1, redo_2, redo_3):
8282
metric_dir = os.path.join(
8383
root_dir, "build" + os.sep + "metric" + os.sep + build_target
8484
)
85-
detailed_metric_dir = os.path.join(metric_dir, redo_no_txt_base + ".metrix")
85+
detailed_metric_dir = os.path.join(metric_dir, redo_no_txt_base + ".metrix") # codespell:ignore metrix
8686
cargs_string = ""
8787
filesystem.safe_makedir(detailed_metric_dir)
8888

redo/targets/linux.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def path_files(self):
2323
# This is the standard debug Linux target.
2424
class Linux_Debug(Linux_Base):
2525
def description(self):
26-
return ("This native 64-bit Linux target has no optimization, compiles with debug flags"
26+
return ("This native 64-bit Linux target has no optimization, compiles with debug flags "
2727
"enabled, and enforces the Ravenscar profile.")
2828

2929
def gpr_project_file(self):
@@ -42,7 +42,7 @@ def description(self):
4242
# Test target which links in aunit:
4343
class Linux_Test(Linux_Base):
4444
def description(self):
45-
return ("Same as Linux_Debug except it does not enforce the Ravenscar profile and links"
45+
return ("Same as Linux_Debug except it does not enforce the Ravenscar profile and links "
4646
"with AUnit.")
4747

4848
def gpr_project_file(self):
@@ -55,7 +55,7 @@ def gpr_project_file(self):
5555
# Coverage target which works with gcov:
5656
class Linux_Coverage(Linux_Base):
5757
def description(self):
58-
return ("Same as Linux_Test except it adds compilation flags to assist with coverage analysis"
58+
return ("Same as Linux_Test except it adds compilation flags to assist with coverage analysis "
5959
"via gcov.")
6060

6161
def path_files(self):

redo/util/redo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def info_print_bold(string):
106106
sys.stderr.flush()
107107

108108

109-
# Maing function to facilitate testing this modukle
109+
# Main function to facilitate testing this module
110110
# from the commandline.
111111
if __name__ == "__main__":
112112
command_dict = {

src/components/ccsds_command_depacketizer/ccsds_command_depacketizer.events.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ events:
44
description: A packet was received with an invalid checksum
55
param_type: Invalid_Packet_Xor8_Info.T
66
- name: Invalid_Packet_Type
7-
description: A packet was received with an invalid ccsds packet type. The expected packet type is a telecommand, but a telemtry packet was received.
7+
description: A packet was received with an invalid ccsds packet type. The expected packet type is a telecommand, but a telemetry packet was received.
88
param_type: Ccsds_Primary_Header.T
99
- name: Packet_Too_Small
1010
description: The packet received was too small to contain necessary command information.

src/components/ccsds_command_depacketizer/test/component-ccsds_command_depacketizer-implementation-tester.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ package body Component.Ccsds_Command_Depacketizer.Implementation.Tester is
136136
Self.Invalid_Packet_Checksum_History.Push (Arg);
137137
end Invalid_Packet_Checksum;
138138

139-
-- A packet was received with an invalid ccsds packet type. The expected packet type is a telecommand, but a telemtry packet was received.
139+
-- A packet was received with an invalid ccsds packet type. The expected packet type is a telecommand, but a telemetry packet was received.
140140
overriding procedure Invalid_Packet_Type (Self : in out Instance; Arg : in Ccsds_Primary_Header.T) is
141141
begin
142142
-- Push the argument onto the test history for looking at later:

src/components/ccsds_command_depacketizer/test/component-ccsds_command_depacketizer-implementation-tester.ads

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ package Component.Ccsds_Command_Depacketizer.Implementation.Tester is
108108
-----------------------------------------------
109109
-- A packet was received with an invalid checksum
110110
overriding procedure Invalid_Packet_Checksum (Self : in out Instance; Arg : in Invalid_Packet_Xor8_Info.T);
111-
-- A packet was received with an invalid ccsds packet type. The expected packet type is a telecommand, but a telemtry packet was received.
111+
-- A packet was received with an invalid ccsds packet type. The expected packet type is a telecommand, but a telemetry packet was received.
112112
overriding procedure Invalid_Packet_Type (Self : in out Instance; Arg : in Ccsds_Primary_Header.T);
113113
-- The packet received was too small to contain necessary command information.
114114
overriding procedure Packet_Too_Small (Self : in out Instance; Arg : in Invalid_Packet_Length.T);

src/components/ccsds_product_extractor/ccsds_product_extractor.requirements.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ description: The requirements for the CCSDS downsampler component are specified
33
requirements:
44
- text: The component shall take receive ccsds packets and extract a data type if it is part of the initial list of products.
55
- text: The component shall check the type of the extracted product and verify that it is valid.
6-
- text: The component shall forward data products when extracted and verifyed.
6+
- text: The component shall forward data products when extracted and verified.
77
- text: The component shall send errors when the extraction is invalid or out of the range of the packet.

src/components/event_filter/event_filter_entry/test/event_filter_entry.tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: This is a unit test suite forthe two_counter_entry object for help with the event_limiter
2+
description: This is a unit test suite for the two_counter_entry object for help with the event_limiter
33
tests:
44
- name: Test_Init_List
55
description: This test is intended to test the different permutations of the init of the byte array.
@@ -14,4 +14,4 @@ tests:
1414
- name: Test_Global_Enable_Switch
1515
description: A unit test that will just test getting and setting a master state from enabled and disabled
1616
- name: Test_Get_Entry_Array
17-
description: Test to make sure that we appropriately get the byte array access for packetizing in the component.
17+
description: Test to make sure that we appropriately get the byte array access for packetizing in the component.

src/components/event_filter/event_filter_entry/test/event_filter_entry_tests-implementation.ads

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- Event_Filter_Entry Tests Spec
33
--------------------------------------------------------------------------------
44

5-
-- This is a unit test suite forthe two_counter_entry object for help with the event_limiter
5+
-- This is a unit test suite for the two_counter_entry object for help with the event_limiter
66
package Event_Filter_Entry_Tests.Implementation is
77
-- Test data and state:
88
type Instance is new Event_Filter_Entry_Tests.Base_Instance with private;

src/components/event_limiter/two_counter_entry/test/two_counter_entry.tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: This is a unit test suite forthe two_counter_entry object for help with the event_limiter
2+
description: This is a unit test suite for the two_counter_entry object for help with the event_limiter
33
tests:
44
- name: Test_Init_List
55
description: This test is intended to test the different permutations of the init of the byte array.
@@ -16,4 +16,4 @@ tests:
1616
- name: Test_Get_Event_Range
1717
description: Unit test to get the range of the event ids for the component
1818
- name: Test_Master_Enable_Switch
19-
description: A unit test that will just test getting and setting a master state from enabled and disabled
19+
description: A unit test that will just test getting and setting a master state from enabled and disabled

src/components/event_limiter/two_counter_entry/test/two_counter_entry_tests-implementation.ads

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- Two_Counter_Entry Tests Spec
33
--------------------------------------------------------------------------------
44

5-
-- This is a unit test suite forthe two_counter_entry object for help with the event_limiter
5+
-- This is a unit test suite for the two_counter_entry object for help with the event_limiter
66
package Two_Counter_Entry_Tests.Implementation is
77
-- Test data and state:
88
type Instance is new Two_Counter_Entry_Tests.Base_Instance with private;

src/components/limiter/test/limiter_tests-implementation.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ package body Limiter_Tests.Implementation is
321321
T : Component_Tester_Package.Instance_Access renames Self.Tester;
322322
Param : Parameter.T := T.Parameters.Max_Sends_Per_Tick ((Value => 0));
323323
begin
324-
-- Make the perameter invalid by modifying its length.
324+
-- Make the parameter invalid by modifying its length.
325325
Param.Header.Buffer_Length := 0;
326326

327327
-- Send bad parameter and expect bad response:

0 commit comments

Comments
 (0)