Skip to content

Commit

Permalink
Fix building of dynamic configuration section (#1538)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored May 19, 2023
1 parent 6e9d662 commit b47752f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
1 change: 1 addition & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ lintables
magiclink
maskables
maxsplit
mkdocs
mkdocstrings
moduleauthor
mqueue # https://github.com/ansible/ansible-runner/issues/984
Expand Down
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
default_language_version:
# ensures that we get same behavior on CI(s) as on local machines
python: python3.11
exclude: >
(?x)^(
_readthedocs|
.tox
)$
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.0-alpha.9-for-vscode"
Expand Down Expand Up @@ -164,13 +169,14 @@ repos:
- src/
- tests/
additional_dependencies:
- dill>=0.3.6 # needed for py311
- ansible-core
- astroid
- ansible-runner
- astroid
- dill>=0.3.6 # needed for py311
- jinja2
- jsonschema
- libtmux
- mkdocs-gen-files
- onigurumacffi
- pytest
- pytest-mock
Expand Down
4 changes: 1 addition & 3 deletions docs/.generated/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
ansible-navigator.yml
settings-dump.md
subcommands-overview.md
*.*
17 changes: 10 additions & 7 deletions docs/_ext/regenerate_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from pathlib import Path
from re import match

import mkdocs_gen_files

from ansible_navigator.configuration_subsystem import Constants as C
from ansible_navigator.configuration_subsystem import NavigatorConfiguration
from ansible_navigator.configuration_subsystem.definitions import SettingsEntry
Expand Down Expand Up @@ -184,10 +186,11 @@ def md_settings_sample() -> str:
return result


if __name__ == "__main__":
with DOCS_SETTINGS_SAMPLE.open("w") as f:
f.write(md_settings_sample())
with DOCS_SETTINGS_DUMP.open("w") as f:
f.write(md_settings_dump())
with DOCS_SUBCOMMANDS_OVERVIEW.open("w") as f:
f.write(_subcommands_overview())
with mkdocs_gen_files.open(DOCS_SETTINGS_SAMPLE, "w") as f:
f.write(md_settings_sample())

with mkdocs_gen_files.open(DOCS_SETTINGS_DUMP, "w") as f:
f.write(md_settings_dump())

with mkdocs_gen_files.open(DOCS_SUBCOMMANDS_OVERVIEW, "w") as f:
f.write(_subcommands_overview())
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ description = Build The Docs
commands_pre =
rm -rf .cache/plugin
commands =
mkdocs build {posargs}
mkdocs build {posargs:--strict}
isolated_build = true
passenv =
SSH_AUTH_SOCK
Expand Down

0 comments on commit b47752f

Please sign in to comment.