Skip to content

Commit

Permalink
Fix documentation typos (#59)
Browse files Browse the repository at this point in the history
Fix typos in documentation.
Always remove '{docs-folder}/' for create_docs_index task.
  • Loading branch information
CasperWA authored Oct 5, 2022
1 parent 26aa8eb commit 1362644
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
8 changes: 6 additions & 2 deletions ci_cd/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,14 @@ def create_docs_index( # pylint: disable=too-many-locals
context: "Context" = context
pre_commit: bool = pre_commit
root_repo_path: str = root_repo_path
docs_folder: str = docs_folder
replacement: list[str] = replacement
replacement_separator: str = replacement_separator

docs_folder: Path = Path(docs_folder)

if not replacement:
replacement: list[str] = []
replacement.append(f"{docs_folder.name}/{replacement_separator}")

if pre_commit and root_repo_path == ".":
# Use git to determine repo root
result: "Result" = context.run("git rev-parse --show-toplevel", hide=True)
Expand Down
12 changes: 7 additions & 5 deletions docs/workflows/cd_release.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# CD - Release
<!-- markdownlint-disable MD007 -->

**File to use:** `cd_release.yml`

Expand Down Expand Up @@ -34,11 +35,12 @@ Some notes to consider and respect when using `version_update_changes` are:

- The value of `version_update_changes_separator` applies to _all_ lines given in `version_update_changes`, meaning it should be a character, or series of characters, which will not be part of the actual content.
- Specifically, concerning the 'raw' Python string 'pattern' the following applies:
- **Always** escape double quotes (`"`).
This is done by prefixing it with a backslash (`\`): `\"`.
- Escape special bash/sh characters, e.g., back tick (`` ` ``).
- Escape special Python regular expression characters, if they are not used for their intended purpose in this 'raw' string.
See the [`re` library documentation](https://docs.python.org/3/library/re.html) for more information.

- **Always** escape double quotes (`"`).
This is done by prefixing it with a backslash (`\`): `\"`.
- Escape special bash/sh characters, e.g., back tick (`` ` ``).
- Escape special Python regular expression characters, if they are not used for their intended purpose in this 'raw' string.
See the [`re` library documentation](https://docs.python.org/3/library/re.html) for more information.

Concerning the 'replacement string' part, the `package_dirs` input and full semantic version can be substituted in dynamically by wrapping either `package_dir` or `version` in curly braces (`{}`).
Indeed, for the version, one can specify sub-parts of the version to use, e.g., if one desires to only use the major version, this can be done by using the `major` attribute: `{version.major}`.
Expand Down
2 changes: 1 addition & 1 deletion docs/workflows/ci_cd_updated_default_branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
name: Call external workflow
uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v1
if: github.repository_owner == 'SINTEF'
inputs:
with:
git_username: "Casper Welzel Andersen"
git_email: "CasperWA@github.com"
default_repo_branch: stable
Expand Down
2 changes: 1 addition & 1 deletion docs/workflows/ci_check_pyproject_dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
name: Call external workflow
uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v1
if: github.repository_owner == 'SINTEF'
inputs:
with:
git_username: "Casper Welzel Andersen"
git_email: "CasperWA@github.com"
permanent_dependencies_branch: "ci/dependency-updates"
Expand Down
2 changes: 1 addition & 1 deletion docs/workflows/ci_update_dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
name: Call external workflow
uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v1
if: github.repository_owner == 'SINTEF'
inputs:
with:
git_username: "Casper Welzel Andersen"
git_email: "CasperWA@github.com"
permanent_dependencies_branch: "ci/dependency-updates"
Expand Down

0 comments on commit 1362644

Please sign in to comment.