diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-03-16 17:15:43 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-03-16 17:15:43 +0000 |
commit | 0bc4388bdd75a50bbb847dc3085d9a798301730a (patch) | |
tree | f796cd03c57372aa287521e1dc103d0ee3ace7bf | |
parent | bc6c65c87e3e47e4508bb860597ebb25da7cde7a (diff) | |
parent | eec39617182c5ef0db160343d93bd0d78a3fae3e (diff) | |
download | subplot-0bc4388bdd75a50bbb847dc3085d9a798301730a.tar.gz |
Merge branch 'typos' into 'main'
Typos
See merge request subplot/subplot!257
-rw-r--r-- | NEWS.md | 2 | ||||
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | examples/muck/muck.md | 16 | ||||
-rw-r--r-- | examples/website/website.md | 8 | ||||
-rw-r--r-- | share/bash/template/assert.sh | 2 | ||||
-rw-r--r-- | share/python/template/asserts.py | 4 | ||||
-rw-r--r-- | subplot.md | 94 |
7 files changed, 66 insertions, 66 deletions
@@ -136,7 +136,7 @@ generation is used. * We've not made much effort to improve the Bash support (modulo the environment cleanup). Compared to Python and Rust it is not a well-support language in Subplot. Lars and Daniel do not feel it is - a target worth spending much of their free time one, but would + a target worth spending much of their free time on, but would welcome help with that. @@ -7,9 +7,9 @@ stakeholders. Acceptance criteria are expressed as _scenarios_ in the Cucumber given/when/then style: -> given a web site subplot.liw.fi -> when I retrieve the site front page -> then it contains "Subplot" +> given a web site subplot.liw.fi +> when I retrieve the site front page +> then it contains "Subplot" > and it contains "acceptance criteria" diff --git a/examples/muck/muck.md b/examples/muck/muck.md index 48f421f..b074424 100644 --- a/examples/muck/muck.md +++ b/examples/muck/muck.md @@ -14,10 +14,10 @@ Muck is intended for storing relatively small pieces of data securely, and accessing them quickly. Intended uses cases are: * storing user, client, application, and related data for an OpenID - Connect authenatication server + Connect authentication server * storing personally identifiable information of data subjects (in the GDPR sense) in a way that they can access and update, assuming - integration with a suitable authantication and authorization server + integration with a suitable authentication and authorization server * in general, storage for web applications of data that isn't large and fits easily into RAM @@ -33,7 +33,7 @@ configured to accept. Access control is simplistic. Each resource is assigned an owner upon creation, and each user can access (see, update, delete) only their own resources. A use with "super" powers can access, update, and -delete resources they don't own, but can't create resources for other. +delete resources they don't own, but can't create resources for others. This will be improved later. Architecture @@ -76,7 +76,7 @@ Muck will be configured with one public key for validating the tokens. For Muck to access a token: * its signature must be valid according to the public key -* it to must be used while it's valid (after the validity starts, but +* it must be used while it's valid (after the validity starts, but before if expires) * its audience must be the specific Muck instance * its scope claim contains the specified scopes needed for the @@ -84,7 +84,7 @@ For Muck to access a token: * it specified an end-user (data subject) Every request to the Muck API must include a token, in the -`Authorizatin` header as a bearer token. The request is denied if the +`Authorization` header as a bearer token. The request is denied if the token does not pass all the above checks. Requirements @@ -92,7 +92,7 @@ Requirements This chapter lists high level requirements for Muck. -Each requirement here is given a unique mnemnoic id for easier +Each requirement here is given a unique mnemonic id for easier reference in discussions. **SimpleOps** @@ -117,7 +117,7 @@ reference in discussions. access objects owned by the data subject, unless the client has super privileges. The data subject specifies, via the access token, what operations the client is allowed to do: whether they - read, update, or delete objects. + may read, update, or delete objects. HTTP API @@ -510,4 +510,4 @@ then response code is 404 * Encryption of resources, so that Muck doesn't see the contents? -* Should Muck sign the resources it returns, with it's own key? +* Should Muck sign the resources it returns, with its own key? diff --git a/examples/website/website.md b/examples/website/website.md index d74b2b6..e85249a 100644 --- a/examples/website/website.md +++ b/examples/website/website.md @@ -27,7 +27,7 @@ backup program. To use Subplot to verify that you need to write a document that explains everything to all the people involved in the project. The document will contain semi-formal _scenarios_ that document how a -program would verify the home works. For this tutorial, that document +program would verify the site works. For this tutorial, that document is this document, [website.md][]. It uses [website.yaml][] for bindings, and [website.py][] for step implementations. Consult the source code for how to mark up scenarios and the other files. @@ -75,7 +75,7 @@ $ subplot docgen website.md -o website.html $ subplot docgen website.md -o website.pdf ~~~ -Open up the file to see what they look like. +Open up the files to see what they look like. ## Generate and run test program @@ -114,7 +114,7 @@ one of the key words (given, when, then) and a pattern, and also a function name. The pattern can be fixed text, or it can extract parts of the scenario step and pass those to the function. -Patterns which capture and extract parts of the scenario stesp +Patterns which capture and extract parts of the scenario steps have the form `{name}` for single words, or `{name:text}` for multiple words. This allows for an easy way to, for example, use the same step for different web sites. @@ -128,7 +128,7 @@ The `assert` statement is typically used to verify things in a step function. For more useful error messages, Subplot provides the functions `assert_eq` and `assert_ne` that can be used as well. -Extracted parts of steps are passed to functions a keyword arguments. +Extracted parts of steps are passed to functions as keyword arguments. Such arguments must exist, which is why you will typically see them added as `name=None` in the function definition. diff --git a/share/bash/template/assert.sh b/share/bash/template/assert.sh index 17aa71e..ccfd09a 100644 --- a/share/bash/template/assert.sh +++ b/share/bash/template/assert.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Check two values for equality and give error if they are not equal +# Check two values for equality and give an error if they are not equal assert_eq() { if ! diff -u <(echo "$1") <(echo "$2") then diff --git a/share/python/template/asserts.py b/share/python/template/asserts.py index 33609ce..ceab2e2 100644 --- a/share/python/template/asserts.py +++ b/share/python/template/asserts.py @@ -1,9 +1,9 @@ -# Check two values for equality and give error if they are not equal +# Check two values for equality and give an error if they are not equal def assert_eq(a, b): assert a == b, "expected %r == %r" % (a, b) -# Check two values for inequality and give error if they are equal +# Check two values for inequality and give an error if they are equal def assert_ne(a, b): assert a != b, "expected %r != %r" % (a, b) @@ -30,7 +30,7 @@ correspond to use cases. The scenario as accompanied by explanatory text to explain things to the reader. Scenarios use a given/when/then sequence of steps, where each step is implemented by code provided by the developers of the system under test. This is very similar to the -[Cucumber][] tool, but with more emphasis of producing a standalone +[Cucumber][] tool, but with more emphasis on producing a standalone document. [Cucumber]: https://en.wikipedia.org/wiki/Cucumber_(software) @@ -71,7 +71,7 @@ you can vary based on your particular needs and circumstances. 3. Write scenarios to verify that the criteria are met, and have those scenarios agreed by the stakeholders. 4. Write bindings and test functions, so that as the code is written - it can be tested against the acceptance criteria. + it can be tested against the acceptance criteria. 5. Iterate on this in short cycles to maximise discussion and stakeholder buy-in. @@ -85,7 +85,7 @@ Subplot reads an input document, in Markdown, and generates a typeset output document, as PDF or HTML, for all stakeholders to understand. Subplot also generates a test program, in Python, that verifies the acceptance criteria are met, for developers and testers and auditors -to verify the sustem under test meets its acceptance criteria. The +to verify the system under test meets its acceptance criteria. The generated program uses code written by the Subplot user to implement the verification steps. The graph below illustrates this and shows how data flows through the system. @@ -134,7 +134,7 @@ be requested by the user. Depending on the output format, Pandoc may use, for example, LaTeX. Subplot interprets parts of the Markdown input file itself. -Subplot actually consists mainly of two separate programs: +Subplot actually consists mainly of two separate programs: **subplot docgen** for generating output documents, and **subplot codegen** for generating the test program. There are a couple of additional tools (**subplot metadata** for reporting meta data about a Subplot document, and @@ -206,7 +206,7 @@ tasty morsels to the great beasts. "I am tired of choosing what to wear every day. Can't you do something?" -The wizard stoke his long, grey beard. He turned around, looked at the +The wizard stoked his long, grey beard. He turned around, looked at the magnificent outfits worn by members of the court. He turned back, and looked at the king. @@ -291,7 +291,7 @@ $ cargo run --bin subplot codegen -- subplot.md -o test.py $ python3 test.py ... much output OK, all scenarios finished successfully -$ +$ ~~~ To test an installed Subplot, generate the test program, and tell the @@ -304,7 +304,7 @@ $ cargo run --bin subplot codegen -- subplot.md -o test.py $ python3 test.py --env SUBPLOT_DIR=/usr/local/bin ... much output OK, all scenarios finished successfully -$ +$ ~~~ You can do this with an installed Subplot as well: @@ -331,13 +331,13 @@ not meant to be automatically verifiable. For specific, automatically testable acceptance criteria, see the later [chapter with acceptance tests for Subplot](#acceptance). -Each requirement here is given a unique mnemnoic id for easier +Each requirement here is given a unique mnemonic id for easier reference in discussions. **UnderstandableTests** : Acceptance tests should be possible to express in a way that's - easily understood by all stakeholders, includcing those who are + easily understood by all stakeholders, including those who are not software developers. _Done_ but requires the Subplot document to be written with care. @@ -378,7 +378,7 @@ reference in discussions. : Executing the acceptance tests should be fast. - _Not done_ &mash; the generated Python test program is simplistic + _Not done_ — the generated Python test program is simplistic and linear. **NoDeployment** @@ -546,7 +546,7 @@ will deal with formatting that nicely for you. Subplot uses [Pandoc][], the universal document converter, to parse the Markdown file, and thus understands the variants of Markdown that Pandoc supports. This includes traditional Markdown, CommonMark, and -GitHub-flavored Markdown. +GitHub-flavored Markdown. [fenced code blocks]: https://pandoc.org/MANUAL.html#fenced-code-blocks @@ -689,22 +689,22 @@ There are some flexibilities in bindings, futher details can be found below: ~~~{.yaml .numberLines} - given: "a standard setup" impl: - python: + python: function: create_standard_setup - when: "{thing} happens" impl: - python: + python: function: make_thing_happen types: thing: word - when: "I say (?P<sentence>.+) with a smile" regex: true impl: - python: + python: function: speak - then: "everything is OK" impl: - python: + python: function: check_everything_is_ok ~~~ @@ -1021,37 +1021,37 @@ then bar was done ~~~{#b.yaml .file .yaml .numberLines} - given: precondition foo impl: - python: + python: function: precond_foo bash: function: precond_foo - when: I do bar impl: - python: + python: function: do_bar bash: function: do_bar - when: I do foobar impl: - python: + python: function: do_foobar bash: function: do_foobar - then: bar was done impl: - python: + python: function: bar_was_done bash: function: bar_was_done - then: foobar was done impl: - python: + python: function: foobar_was_done bash: function: foobar_was_done - given: file {filename} impl: - python: + python: function: provide_file bash: function: provide_file @@ -1322,7 +1322,7 @@ test this for every language template we support. ~~~{#cleanup.yaml .file .yaml .numberLines} - given: foo impl: - python: + python: function: foo cleanup: foo_cleanup bash: @@ -1330,7 +1330,7 @@ test this for every language template we support. cleanup: foo_cleanup - given: bar impl: - python: + python: function: bar cleanup: bar_cleanup bash: @@ -1338,7 +1338,7 @@ test this for every language template we support. cleanup: bar_cleanup - given: failure impl: - python: + python: function: failure cleanup: failure_cleanup bash: @@ -1555,7 +1555,7 @@ then TMPDIR is set ~~~{#tmpdir.yaml .file .yaml .numberLines} - then: TMPDIR is set impl: - python: + python: function: tmpdir_is_set ~~~ @@ -1607,7 +1607,7 @@ given I am Tomjon ~~~{#simplepattern.yaml .file .yaml .numberLines} - given: I am {name} impl: - python: + python: function: func ~~~ @@ -1618,7 +1618,7 @@ def func(ctx, name=None): ### Simple patterns with regex metacharacters: forbidden case -Help use to avoid accidental regular expression versus simple pattern +Help users to avoid accidental regular expression versus simple pattern confusion. The rule is that a simple pattern mustn't contain regular expression meta characters unless the rule is explicitly marked as not being a regular expression pattern. @@ -1651,7 +1651,7 @@ given I* am Tomjon ~~~{#confusedpattern.yaml .file .yaml .numberLines} - given: I* am {name} impl: - python: + python: function: func ~~~ @@ -1684,7 +1684,7 @@ given I* am Tomjon ~~~{#confusedbutok.yaml .file .yaml .numberLines} - given: I* am {name} impl: - python: + python: function: func regex: false ~~~ @@ -1721,7 +1721,7 @@ given I am Tomjon ~~~{#regex.yaml .file .yaml .numberLines} - given: I am (?P<name>\S+) impl: - python: + python: function: func regex: true ~~~ @@ -1772,12 +1772,12 @@ then expanded "${foo}" is bar ~~~{#values.yaml .file .yaml .numberLines} - when: I remember {name} as {value} impl: - python: + python: function: remember - + - then: expanded "{actual}" is {expected} impl: - python: + python: function: check ~~~ @@ -1842,7 +1842,7 @@ then environment variable FOO is set to "bar" ~~~{#env.yaml .file .yaml .numberLines} - then: environment variable {name} is set to "{value:text}" impl: - python: + python: function: is_set_to ~~~ @@ -1930,7 +1930,7 @@ then file simple.pdf has changed from before Subplot uses chapters and sections to keep together scenario snippets that form a complete scenario. The lowest level heading before a -snippet starts a scenario and is the name of the scenario. If there's +snippet starts a scenario and is the name of the scenario. If there are subheadings, they divide the description of the scenario into parts, but don't start a new scenario. The next heading at the same or a higher level starts a new scenario. @@ -2342,7 +2342,7 @@ given file dateless.md and an installed subplot when I run subplot docgen dateless.md -o dateoption.html --date=FANCYDATE then file dateoption.html exists -and file dateoption.html contains "<title>The Fabulous Title</title>" +and file dateoption.html contains "<title>The Fabulous Title</title>" and file dateoption.html contains "Alfred Pennyworth" and file dateoption.html contains "Geoffrey Butler" and file dateoption.html contains "FANCYDATE" @@ -2470,7 +2470,7 @@ then JSON output matches expected.json ~~~{#images.md .file .markdown .numberLines} --- title: Document refers to external images -bindings: +bindings: - b.yaml - other.yaml impls: @@ -2561,7 +2561,7 @@ to the code blocks, with one of three allowed cases: * `add-newline=yes`—always add a newline, even if one is already there -The scenarios below test the various cases. +The scenarios below test the various cases. ### Extract embedded file @@ -2779,16 +2779,16 @@ binding. ```{#badbindings.yaml .file .yaml} - given: a binding impl: - python: + python: function: a_binding - given: a (?:broken)? binding impl: - python: + python: function: a_broken_binding regex: true - given: a capitalised Binding impl: - python: + python: function: os.getcwd case_sensitive: true ``` @@ -2861,11 +2861,11 @@ given a binding ~~~{#twobindings.yaml .file .yaml} - given: a {xyzzy} impl: - python: + python: function: a_function - given: a {plugh} impl: - python: + python: function: a_function ~~~ @@ -3071,14 +3071,14 @@ finished: ready: status: ready label: | - This task is ready + This task is ready to be done: it is not blocked by anything next: status: next label: | - This task is chosen + This task is chosen to be done next blocked: @@ -3130,14 +3130,14 @@ finished: ready: status: ready label: | - This task is ready + This task is ready to be done: it is not blocked by anything next: status: next label: | - This task is chosen + This task is chosen to be done next blocked: |