-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tested support for mkdocstrings plugin
- Loading branch information
Showing
10 changed files
with
156 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# | ||
msgid "" | ||
msgstr "" | ||
|
||
msgid "API documentation building" | ||
msgstr "Construcción de documentación de API" | ||
|
||
msgid "[API documentation building][api-documentation-building]" | ||
msgstr "[Construcción de documentación de API][api-documentation-building]" | ||
|
||
msgid "" | ||
"[api-documentation-building]: https://github.com/mkdocs/mkdocs/wiki/MkDocs-" | ||
"Plugins#api-documentation-building" | ||
msgstr "" | ||
"[api-documentation-building]: https://github.com/mkdocs/mkdocs/wiki/MkDocs-" | ||
"Plugins#api-documentation-building" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# [API documentation building][api-documentation-building] | ||
|
||
<!-- mdpo-disable --> | ||
- [x] [mkdocstrings](https://github.com/pawamoy/mkdocstrings) | ||
|
||
<!-- mdpo-enable --> | ||
|
||
[api-documentation-building]: https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins#api-documentation-building |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"""mkdocs-mdpo-plugin package""" | ||
|
||
__version__ = '0.0.9' | ||
__version__ = '0.0.10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
"""Mkdocs builds tests for mkdocs-mdpo-plugin API documentation building | ||
plugins support: | ||
https://github.com/mkdocs/mkdocs/wiki/MkDocs-Plugins#api-documentation-building | ||
""" | ||
|
||
import pytest | ||
|
||
|
||
TESTS = ( | ||
pytest.param( # mkdocstrings (configuration before mdpo) | ||
{ | ||
'index.md': ( | ||
'Hello\n\n::: mkdocs_mdpo_plugin.io.' | ||
'remove_empty_directories_from_dirtree\n\nBye' | ||
), | ||
}, | ||
{ | ||
'es/index.md.po': { | ||
'Hello': 'Hola', | ||
'Bye': 'Adios', | ||
( | ||
'Remove empty directories walking through all nested' | ||
' subdirectories.' | ||
): ( | ||
'Elimina directorios vacíos caminando' | ||
' por todos los subdirectorios anidados.' | ||
), | ||
'Top directory tree path.': ( | ||
'Path al directorio superior en el árbol.' | ||
), | ||
}, | ||
}, | ||
{ | ||
'languages': ['en', 'es'], | ||
}, | ||
{ | ||
'plugins': [ | ||
{ | ||
'mkdocstrings': {}, | ||
}, | ||
], | ||
}, | ||
{ | ||
'index.html': [ | ||
'<p>Hello</p>', | ||
( | ||
'<p>Remove empty directories walking through all nested' | ||
' subdirectories.</p>' | ||
), | ||
'<td><p>Top directory tree path.</p></td>', | ||
], | ||
'es/index.html': [ | ||
'<p>Hola</p>', | ||
( | ||
'<p>Elimina directorios vacíos caminando por todos' | ||
' los subdirectorios anidados.</p>' | ||
), | ||
'<td><p>Path al directorio superior en el árbol.</p></td>', | ||
], | ||
}, | ||
id='mkdocs-exclude (before mdpo)', | ||
), | ||
) | ||
|
||
|
||
@pytest.mark.parametrize( | ||
( | ||
'input_files_contents', | ||
'translations', | ||
'plugin_config', | ||
'additional_config', | ||
'expected_output_files', | ||
), | ||
TESTS, | ||
) | ||
def test_navigation_and_page_building_plugins( | ||
input_files_contents, | ||
translations, | ||
plugin_config, | ||
additional_config, | ||
expected_output_files, | ||
mkdocs_build, | ||
): | ||
mkdocs_build( | ||
input_files_contents, | ||
translations, | ||
plugin_config, | ||
additional_config, | ||
expected_output_files, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters