Skip to content

Commit 7f8d557

Browse files
Snooz82CopilotCopilotleeuwe
authored
Dynamic Glossary (#72)
This PR implements a dynamic glossary with search and alias. The glossary is stored in a JSON file (`website/static/glossary/glossary.json`), so that the glossary definition can be used by dynamic glossary tool tips in all MarkDown documents. https://github.com/user-attachments/assets/358107a3-e9d4-44a7-9ba4-a6b566a8e322 I implemented the glossary terms to be hovered and a dynamic glossary. The glossary is based on a json file. ```json { "term": "Named-Only Argument", "aliasses": ["Named Argument"], "abbreviation": "", "definition": "An argument that must be provided by name (never positionally); typically defined after a \"Variable Number of Positional Arguments\" or explicitly marked with a label icon in docs, and can be mandatory or optional." }, ``` the usage is like this in Markdown: ```markdown Except for "Positional-Only Arguments", which are not part of this syllabus, all arguments that are positioned before :term[Variable Number of Positional Arguments], :term[Named-Only Arguments]{term="Named-Only Argument"}, or :term[Free Named Arguments]{term="Free Named Argument"} in the argument interface of a keyword are :term[Positional or Named Arguments]{term="Positional or Named Argument"}. ``` so either if the exact term is used: ``` :term[Variable Number of Positional Arguments] ``` or in case a different grammatical form is used: ``` :term[Named-Only Arguments]{term="Named-Only Argument"} ``` --------- Signed-off-by: René <snooz@posteo.de> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Elout van Leeuwen <66635066+leeuwe@users.noreply.github.com>
1 parent c1614a6 commit 7f8d557

File tree

23 files changed

+1242
-190
lines changed

23 files changed

+1242
-190
lines changed

Glossary_wip.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

LOs.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ LO-2.5.2.3,(K1),Recall the concept of keywords with embedded arguments used in B
5050
LO-2.5.2.4,(K1),"Recall how ""Positional or Named Arguments"" are marked in the documentation and their use case.",,,
5151
LO-2.5.2.5,(K1),"Recall how ""Variable Number of Positional Arguments"" are marked in the documentation and their use case.",,,
5252
LO-2.5.2.6,(K1),"Recall what properties ""Named-Only Arguments"" have and how they are documented.",,,
53-
LO-2.5.2.7,(K1),Recall how free named arguments are marked in documentation.,,,
53+
LO-2.5.2.7,(K1),"Recall how ""Free Named Arguments"" are marked in documentation.",,,
5454
LO-2.5.2.8,(K2),Understand the concept of argument types and automatic type conversion.,,,
5555
LO-2.5.2.9,(K2),Understand the concept of return type hints.,,,
5656
LO-2.5.3,(K2),Understand how to read keyword documentation and how to interpret the examples.,,,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
- [`2.5.2.6 Named-Only Arguments`](website/docs/chapter-02/05_keyword_interface.md#2526-named-only-arguments)
114114
- LO-2.5.2.6 (K1) Recall what properties "Named-Only Arguments" have and how they are documented.
115115
- [`2.5.2.7 Free Named Arguments`](website/docs/chapter-02/05_keyword_interface.md#2527-free-named-arguments)
116-
- LO-2.5.2.7 (K1) Recall how free named arguments are marked in documentation.
116+
- LO-2.5.2.7 (K1) Recall how "Free Named Arguments" are marked in documentation.
117117
- [`2.5.2.8 Argument Types`](website/docs/chapter-02/05_keyword_interface.md#2528-argument-types)
118118
- LO-2.5.2.8 (K2) Understand the concept of argument types and automatic type conversion.
119119
- [`2.5.2.9 Return Types`](website/docs/chapter-02/05_keyword_interface.md#2529-return-types)

website/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
.docusaurus
99
.cache-loader
1010

11+
# Build artifacts - TypeScript compiled JS files from TS sources
12+
docusaurus.config.js
13+
sidebars.js
14+
/src/components/**/*.js
15+
/src/pages/**/*.js
16+
/src/theme/**/*.js
17+
# Keep these JS files that are source files, not build artifacts:
18+
!/src/components/Quiz/quizPrebuild.js
19+
!/src/remark/*.js
20+
1121
# Misc
1222
.DS_Store
1323
.env.local

website/docs/chapter-01/04_styles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ While **Keyword-Driven Testing (KDT)** and **Behavior-Driven Development (BDD)**
1616

1717
Both styles can be mixed, even within the same test or task, but it is strongly recommended to have separate styles for separate purposes and not mix them within the same body.
1818
One practical solution would be to define acceptance test cases that cover users' expectations in a declarative *Behavior-Driven Style*, while using keywords that are implemented in an imperative *Keyword-Driven style*.
19-
Further system level test cases, that are not covering acceptance criteria could be written in a *Keyword-Driven style*.
19+
Further system level :term[test cases]{term="Test Case"}, that are not covering acceptance criteria could be written in a *Keyword-Driven style*.
2020

2121
The approach of both styles is different in that way,
2222
that the *Behavior-Driven Style* is a **declarative** specification,

website/docs/chapter-02/05_keyword_interface.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ All of them can be called positionally or by name.
7070

7171
![Run Process Keyword Documentation](/img/Run_Process_Docs.png)
7272

73-
This keyword has one :term[Mandatory Arguments]{tooltipMd="An **Argument** that must be set.<br/>See [Mandatory Args](chapter-03/03_user_keyword.md)"} `command` which can be called positionally or by name.
73+
This keyword has one Mandatory Argument `command` which can be called positionally or by name.
7474
The latter two arguments are optional.
7575

76-
The argument `arguments` is a "Variable Number of Positional Arguments" and can only be set by position.
76+
The argument `arguments` is a :term[Variable Number of Positional Arguments] and can only be set by position.
7777
Therefore, if it shall be set, all preceding arguments must be set by position as well.
7878
See [2.5.2.5 Variable Number of Positional Arguments](chapter-02/05_keyword_interface.md#2525-variable-number-of-positional-arguments) for more information about this kind of argument.
7979

80-
The argument `configuration` is a "Free Named Argument" and can only be set by names.
80+
The argument `configuration` is a :term[Free Named Argument] and can only be set by names.
8181
See [2.5.2.7 Free Named Arguments](chapter-02/05_keyword_interface.md#2527-free-named-arguments) for more information about this kind of argument.
8282

8383

@@ -92,11 +92,11 @@ See [2.5.2.7 Free Named Arguments](chapter-02/05_keyword_interface.md#2527-free-
9292
This keyword has 2 "Mandatory Arguments" that can be called positionally or by name.
9393
The last two arguments are optional.
9494

95-
The argument `groups` is a "Variable Number of Positional Arguments" and can only be set by position.
95+
The argument `groups` is a :term[Variable Number of Positional Arguments] and can only be set by position.
9696
Therefore, if it shall be set, all preceding arguments must be set by position as well.
9797
See [2.5.2.5 Variable Number of Positional Arguments](chapter-02/05_keyword_interface.md#2525-variable-number-of-positional-arguments) for more information about this kind of argument.
9898

99-
The argument `flags` is a "Named-Only Argument" and can only be set by name.
99+
The argument `flags` is a :term[Named-Only Argument] and can only be set by name.
100100
See [2.5.2.6 Named-Only Arguments](chapter-02/05_keyword_interface.md#2526-named-only-arguments) for more information about this kind of argument.
101101

102102

@@ -118,20 +118,20 @@ The more business oriented keywords are the less arguments they typically have.
118118
Keyword arguments can be grouped into different argument kinds.
119119
On the one hand you can group them by their definition attributes and on the other hand by their usage kind.
120120

121-
The relevant distinction of usage kinds is between using **Positional Arguments**, **Named Arguments**, or **Embedded Arguments**.
121+
The relevant distinction of usage kinds is between using :term[Positional Arguments]{term="Positional Argument"}, :term[Named Arguments]{term="Named Argument"}, or :term[Embedded Arguments]{term="Embedded Argument"}.
122122
How to use them is described in [2.6 Writing Test|Task and Calling Keywords](chapter-02/06_writing_test.md).
123123

124124
Another important information is if an argument is mandatory or optional.
125125
See the next two sections for more information about these two kinds of arguments.
126126

127127
Most arguments can either be set by their position or by their name.
128-
But there are some kinds of arguments that can only be set positionally, like **Variable Number of Positional Arguments**, or only be set named, like **Named-Only Arguments** or **Free Named Arguments**.
128+
But there are some kinds of arguments that can only be set positionally, like :term[Variable Number of Positional Arguments], or only be set named, like :term[Named-Only Arguments]{term="Named-Only Argument"} or :term[Free Named Arguments]{term="Free Named Argument"}.
129129

130130
The order is as follows:
131-
1. **Positional or Named Arguments** (can be mandatory or optional)
132-
2. **Variable Number of Positional Arguments** (optional)
133-
3. **Named-Only Arguments** (can be mandatory or optional)
134-
4. **Free Named Arguments** (optional)
131+
1. :term[Positional or Named Arguments]{term="Positional or Named Argument"} (can be mandatory or optional)
132+
2. :term[Variable Number of Positional Arguments] (optional)
133+
3. :term[Named-Only Arguments]{term="Named-Only Argument"} (can be mandatory or optional)
134+
4. :term[Free Named Arguments]{term="Free Named Argument"} (optional)
135135

136136
### 2.5.2.1 Mandatory Arguments
137137

@@ -189,7 +189,7 @@ Arguments that have a default value can be omitted when the keyword is called, c
189189
These arguments are listed after the mandatory arguments in the argument interface.
190190
Default values are defined and represented in the docs by the equal sign `=` after the argument name and a value after that.
191191

192-
Also "Variable Number of Positional Arguments", represented with a single star (`*`) prefix, and "Free Named Arguments", represented with a double star (`**`) prefix are optional arguments.
192+
Also :term[Variable Number of Positional Arguments], represented with a single star (`*`) prefix, and :term[Free Named Arguments]{term="Free Named Argument"}, represented with a double star (`**`) prefix are optional arguments.
193193

194194
E.g. the argument `msg` in the `Should Be Equal` keyword documentation has the default value `None` and `ignore_case` has the default value `False`.
195195

@@ -233,7 +233,7 @@ Foundation Page should be Accessible
233233
And the url should be https://robotframework.org/foundation
234234
```
235235
The optional prefixes `Given`, `When`, `Then`, `And` and `But` are basically ignored by Robot Framework if a keyword is found matching the rest of the name including the embedded arguments.
236-
In the example test case some keywords are designed so that the arguments are surrounded by double quotes (`"`) for better visibility.
236+
In the example :term[test case] some keywords are designed so that the arguments are surrounded by double quotes (`"`) for better visibility.
237237

238238
A mix of embedded arguments and "normal" arguments is possible to fully support BDD.
239239
In the keyword documentation the embedded arguments are written in variable syntax with dollar-curly-braces (`${var_name}`) to indicate that they are not part of the keyword name but are arguments.
@@ -253,7 +253,7 @@ Recall how "Positional or Named Arguments" are marked in the documentation and t
253253
::::
254254

255255
Except for "Positional-Only Arguments", which are not part of this syllabus,
256-
all arguments that are positioned before "Variable Number of Positional Arguments", "Named-Only Arguments", or "Free Named Arguments" in the argument interface of a keyword are "Positional or Named Arguments".
256+
all arguments that are positioned before :term[Variable Number of Positional Arguments], :term[Named-Only Arguments]{term="Named-Only Argument"}, or :term[Free Named Arguments]{term="Free Named Argument"} in the argument interface of a keyword are :term[Positional or Named Arguments]{term="Positional or Named Argument"}.
257257

258258
As their name states, they can be set either by their position or by their name, but not by both at the same time for one argument.
259259
If an argument shall be set by its position, all preceding arguments must be set by their position as well.
@@ -275,7 +275,7 @@ Recall how "Variable Number of Positional Arguments" are marked in the documenta
275275

276276
::::
277277

278-
A special case of optional arguments that can only be set by their position are "Variable Number of Positional Arguments".
278+
A special case of optional arguments that can only be set by their position are :term[Variable Number of Positional Arguments].
279279
These are also referred to as `*args` or `*varargs` in Python.
280280
Some keywords need to collect a variable amount of values into one argument, because it is not possible to define the amount of values in advance.
281281

@@ -286,8 +286,8 @@ Depending on the command to be executed different amount of arguments are needed
286286
This variable argument is marked with a single asterisk `*` before the argument name in the keyword documentation.
287287

288288
When calling this keyword, the first positional argument is assigned to `command`, while all subsequent positional arguments are collected into `arguments`.
289-
Because of this behavior, no additional positional arguments can be used after these "Variable Number of Positional Arguments".
290-
As a result, any arguments following these "Variable Number of Positional Arguments" must be named arguments,
289+
Because of this behavior, no additional positional arguments can be used after these :term[Variable Number of Positional Arguments].
290+
As a result, any arguments following these :term[Variable Number of Positional Arguments] must be named arguments,
291291
regardless of whether they are mandatory or optional arguments with a default value.
292292

293293
Also see [2.5.1.3 Example Keyword `Get Regexp Matches`](chapter-02/05_keyword_interface.md#2513-example-keyword-get-regexp-matches).
@@ -305,30 +305,30 @@ Recall what properties "Named-Only Arguments" have and how they are documented.
305305

306306
::::
307307

308-
All arguments that are defined after a "Variable Number of Positional Arguments" (`*varargs`) are "Named-Only Arguments".
309-
However it is also possible to create "Named-Only Arguments without a preceding "Variable Number of Positional Arguments".
308+
All arguments that are defined after a :term[Variable Number of Positional Arguments] (`*varargs`) are :term[Named-Only Arguments]{term="Named-Only Argument"}.
309+
However it is also possible to create :term[Named-Only Arguments]{term="Named-Only Argument"} without a preceding :term[Variable Number of Positional Arguments].
310310

311-
"Named-Only Arguments" are marked with a "LABEL" sign `🏷` before the argument name in the keyword documentation.
311+
:term[Named-Only Arguments]{term="Named-Only Argument"} are marked with a "LABEL" sign `🏷` before the argument name in the keyword documentation.
312312

313-
Those arguments can not be set positionally. All positional values would be consumed by the "Variable Number of Positional Arguments".
313+
Those arguments can not be set positionally. All positional values would be consumed by the :term[Variable Number of Positional Arguments].
314314
So they must be called by their name followed by an equal sign `=` and the value of the argument.
315315

316-
"Named-Only Arguments" can be mandatory or optional with a default value.
316+
:term[Named-Only Arguments]{term="Named-Only Argument"} can be mandatory or optional with a default value.
317317

318318
### 2.5.2.7 Free Named Arguments
319319

320320
::::lo[Learning Objectives]
321321

322322
:::K1[LO-2.5.2.7]
323323

324-
Recall how free named arguments are marked in documentation.
324+
Recall how "Free Named Arguments" are marked in documentation.
325325

326326
:::
327327

328328
::::
329329

330-
Another special case of "Named-Only Arguments" are "Free Named Arguments."
331-
These arguments are similar to the "Variable Number of Positional Arguments" in that they can collect multiple values.
330+
Another special case of :term[Named-Only Arguments]{term="Named-Only Argument"} are :term[Free Named Arguments]{term="Free Named Argument"}.
331+
These arguments are similar to the :term[Variable Number of Positional Arguments] in that they can collect multiple values.
332332
However, instead of collecting positional values, they gather all named values that are not explicitly defined as argument names.
333333
In this case all values given to the keyword as arguments, that do contain an unescaped equal sign (`=`) are considered as named arguments.
334334

0 commit comments

Comments
 (0)