diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7ab118f..82819b9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,7 +37,7 @@ jobs: echo "run-integration-tests = ${{ github.event.inputs.run-integration-tests }}" echo "generate-gh-release = ${{ github.event.inputs.generate-gh-release }}" echo "release-to-pypi-override = ${{ github.event.inputs.elease-to-pypi-override }}" - + unit-tests: name: Unit Tests runs-on: ubuntu-latest diff --git a/README.md b/README.md index aedeec7..d9fea55 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ The plugin introduces the *!import* statement in your config's *nav* section. Yo - **config={filename}.yml**: Tells *multirepo* the name of the config file, containing configuration for the plugin. The default value is also `mkdocs.yml`. This config file can live within the docs directory *or* in the parent directory. - **extra_imports=["{filename | path | glob}"]**: Use this if you want to import additional directories or files along with the docs. - **keep_docs_dir={True | False}**: If set the docs directory will not be removed when importing docs (i.e., `section/page.md` becomes `section/docs/page.md`) - + ```yaml diff --git a/mkdocs_multirepo_plugin/plugin.py b/mkdocs_multirepo_plugin/plugin.py index e5eeee4..bda458f 100644 --- a/mkdocs_multirepo_plugin/plugin.py +++ b/mkdocs_multirepo_plugin/plugin.py @@ -324,7 +324,9 @@ def on_files(self, files: Files, config: Config) -> Files: repo_config_path = repo.config_path for f in repo_files: if f.src_path == repo_config_path: - log.info(f"Multirepo plugin is not copying config file: {f.src_path}") + log.info( + f"Multirepo plugin is not copying config file: {f.src_path}" + ) else: # the file needs to know about the repo it belongs to f.repo = repo diff --git a/mkdocs_multirepo_plugin/scripts/mv_docs_up.sh b/mkdocs_multirepo_plugin/scripts/mv_docs_up.sh old mode 100644 new mode 100755 diff --git a/mkdocs_multirepo_plugin/scripts/sparse_clone_old.sh b/mkdocs_multirepo_plugin/scripts/sparse_clone_old.sh old mode 100644 new mode 100755 diff --git a/tests/unittests.py b/tests/unittests.py index c6ea875..b919abc 100644 --- a/tests/unittests.py +++ b/tests/unittests.py @@ -6,9 +6,9 @@ import unittest from pathlib import Path from shutil import copy -from parameterized import parameterized from aiofiles import tempfile +from parameterized import parameterized from mkdocs_multirepo_plugin import structure, util @@ -389,15 +389,19 @@ async def test_extra_imports(self): for file in expected_files + expected_src_files: self.assertFileExists(file) - @parameterized.expand([ - (True, False, True), # keep_docs_dir is set, global setting ignored - (True, True, True), - (False, False, False), - (False, True, False), - (None, False, False), # keep_docs_dir is not set, global setting overrides - (None, True, True), - ]) - async def test_keep_docs_dir(self, keep_docs_dir, global_keep_docs_dir, expected_docs_exist): + @parameterized.expand( + [ + (True, False, True), # keep_docs_dir is set, global setting ignored + (True, True, True), + (False, False, False), + (False, True, False), + (None, False, False), # keep_docs_dir is not set, global setting overrides + (None, True, True), + ] + ) + async def test_keep_docs_dir( + self, keep_docs_dir, global_keep_docs_dir, expected_docs_exist + ): async with tempfile.TemporaryDirectory() as temp_dir: temp_dir_path = pathlib.Path(temp_dir) docsRepo = structure.DocsRepo(