From c06ef3fc43d31669f4d1ba1377e3f09061aeb6a4 Mon Sep 17 00:00:00 2001 From: "Michael Foerderer (F29233)" Date: Thu, 23 Nov 2023 14:35:03 +0100 Subject: [PATCH 1/9] Remove usage of _filter_files According to the logs this function is deprecated and also filtering of files can have an impact to some projects. By default it's not possible to add dot directories, dot files or the folder templates to the documentation. INFO - DeprecationWarning: warning_filter doesn't do anything since MkDocs 1.2 and will be removed soon. All messages on the `mkdocs` logger get counted automatically. File "xxx/.venv/lib/python3.9/site-packages/mkdocs_multirepo_plugin/util.py", line 10, in from mkdocs.utils import warning_filter File "xxx/.venv/lib/python3.9/site-packages/mkdocs/utils/__init__.py", line 453, in __getattr__ warnings.warn( --- mkdocs_multirepo_plugin/structure.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/mkdocs_multirepo_plugin/structure.py b/mkdocs_multirepo_plugin/structure.py index 8a81603..11dce15 100644 --- a/mkdocs_multirepo_plugin/structure.py +++ b/mkdocs_multirepo_plugin/structure.py @@ -7,7 +7,7 @@ from typing import Callable, Dict, List, Optional, Tuple, Union from mkdocs.config import Config -from mkdocs.structure.files import File, Files, _filter_paths, _sort_files +from mkdocs.structure.files import File, Files, _sort_files from mkdocs.utils import yaml_load from slugify import slugify @@ -433,25 +433,16 @@ async def batch_import( def get_files(config: Config, repo: DocsRepo) -> Files: """Walk the `docs_dir` and return a Files collection.""" files = [] - exclude = [".*", "/templates"] for source_dir, dirnames, filenames in os.walk(repo.location, followlinks=True): relative_dir = os.path.relpath(source_dir, repo.temp_dir) for dirname in list(dirnames): path = os.path.normpath(os.path.join(relative_dir, dirname)) - # Skip any excluded directories - if _filter_paths(basename=dirname, path=path, is_dir=True, exclude=exclude): - dirnames.remove(dirname) dirnames.sort() for filename in _sort_files(filenames): path = os.path.normpath(os.path.join(relative_dir, filename)) - # Skip any excluded files - if _filter_paths( - basename=filename, path=path, is_dir=False, exclude=exclude - ): - continue # Skip README.md if an index file also exists in dir if filename == "README.md" and "index.md" in filenames: log.warning( From 2162253164f2f1bfeece37b0a4ca2eb6fab68372 Mon Sep 17 00:00:00 2001 From: "Michael Foerderer (F29233)" Date: Thu, 23 Nov 2023 14:38:43 +0100 Subject: [PATCH 2/9] Remove usage of warning_filter According to the logs this function is deprecated (a NOP). --- mkdocs_multirepo_plugin/util.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mkdocs_multirepo_plugin/util.py b/mkdocs_multirepo_plugin/util.py index 24be6e9..6d5e1db 100644 --- a/mkdocs_multirepo_plugin/util.py +++ b/mkdocs_multirepo_plugin/util.py @@ -7,14 +7,12 @@ from sys import platform, version_info from typing import Any, Dict -from mkdocs.utils import warning_filter - # used for getting Git version GitVersion = namedtuple("GitVersion", "major minor") LINUX_LIKE_PLATFORMS = ["linux", "linux2", "darwin"] +# This is a global variable imported by other modules log = logging.getLogger("mkdocs.plugins." + __name__) -log.addFilter(warning_filter) class ImportDocsException(Exception): From 9130fdfa7906f33f525802a2e8c773c274f13b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=B6rderer?= <40258682+Spacetown@users.noreply.github.com> Date: Sat, 25 Nov 2023 20:26:14 +0100 Subject: [PATCH 3/9] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec33aa8..5531483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.6.4 + +### Prs in Release + +- [Remove deprecation warning.](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/131) + ## 0.6.3 ### Prs in Release From 789f9ebcabf0dbd651d660ac4d065ecc547514ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=B6rderer?= <40258682+Spacetown@users.noreply.github.com> Date: Sat, 25 Nov 2023 21:04:23 +0100 Subject: [PATCH 4/9] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0af96d2..75e712a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mkdocs-multirepo-plugin" -version = "0.6.3" +version = "0.6.4" description = "Build documentation in multiple repos into one site." authors = ["jdoiro3 "] license = "MIT" From 9de22d48054cfc1625a4de39f09446fe3b9bbf5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=B6rderer?= <40258682+Spacetown@users.noreply.github.com> Date: Wed, 10 Jan 2024 21:48:08 +0100 Subject: [PATCH 5/9] Update CHANGELOG.md Co-authored-by: Joseph Doiron <57968347+jdoiro3@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ced770..dd36fb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### Prs in Release - [Fix section case](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/124) -- [Remove deprecation warning.](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/131) +- [Remove deprecation warning](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/131) ## 0.6.3 From 933b70f192beeea1d640c6fcc526db3ff0ca7d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=B6rderer?= <40258682+Spacetown@users.noreply.github.com> Date: Wed, 10 Jan 2024 21:48:24 +0100 Subject: [PATCH 6/9] Update CHANGELOG.md Co-authored-by: Joseph Doiron <57968347+jdoiro3@users.noreply.github.com> --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd36fb0..e31fd03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Prs in Release +## 0.7.0 - [Fix section case](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/124) - [Remove deprecation warning](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/131) From f88f64f18b93047a66ce4f321e6b010fc6775eb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=B6rderer?= <40258682+Spacetown@users.noreply.github.com> Date: Wed, 10 Jan 2024 21:50:25 +0100 Subject: [PATCH 7/9] Update pyproject.toml Co-authored-by: Joseph Doiron <57968347+jdoiro3@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 75e712a..bbcd94a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mkdocs-multirepo-plugin" -version = "0.6.4" +version = "0.7.0" description = "Build documentation in multiple repos into one site." authors = ["jdoiro3 "] license = "MIT" From 7859f4d106090618e196f1b532735dc5c483c85a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=B6rderer?= <40258682+Spacetown@users.noreply.github.com> Date: Fri, 19 Jan 2024 14:28:40 +0100 Subject: [PATCH 8/9] CHANGELOG.md aktualisieren Co-authored-by: Joseph Doiron <57968347+jdoiro3@users.noreply.github.com> --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e31fd03..bf2d866 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ### Prs in Release ## 0.7.0 + +### Prs in Release - [Fix section case](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/124) - [Remove deprecation warning](https://github.com/jdoiro3/mkdocs-multirepo-plugin/pull/131) From ae33fa3d4d55ba580b107162eaf403138ea1e4ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=C3=B6rderer?= <40258682+Spacetown@users.noreply.github.com> Date: Fri, 19 Jan 2024 14:32:58 +0100 Subject: [PATCH 9/9] Update CHANGELOG.md as requested --- CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2d866..a6d64a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,3 @@ -## 0.7 (Not Releases) - -### Prs in Release - ## 0.7.0 ### Prs in Release