mkdocs2confluence 0.21.0__tar.gz → 0.22.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mkdocs2confluence-0.21.0/src/mkdocs2confluence.egg-info → mkdocs2confluence-0.22.0}/PKG-INFO +4 -2
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/README.md +3 -1
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/pyproject.toml +1 -1
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0/src/mkdocs2confluence.egg-info}/PKG-INFO +4 -2
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs2confluence.egg-info/SOURCES.txt +1 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/cli.py +27 -19
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/loader/config.py +46 -23
- mkdocs2confluence-0.22.0/tests/test_config_discovery.py +83 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_loader.py +1 -1
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/LICENSE +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/setup.cfg +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs2confluence.egg-info/dependency_links.txt +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs2confluence.egg-info/entry_points.txt +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs2confluence.egg-info/requires.txt +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs2confluence.egg-info/top_level.txt +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/compiler/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/compiler/models.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/compiler/page.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/emitter/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/emitter/xhtml.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/ir/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/ir/nodes.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/ir/treeutil.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/loader/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/loader/extra_css.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/loader/nav.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/loader/page.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/parser/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/parser/markdown.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/pdf/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/pdf/generator.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/pdf/render.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/abbrevs.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/captions.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/fence.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/frontmatter.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/icons.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/includes.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/linkdefs.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preview/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preview/render.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preview/server.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/changelog.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/client.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/digest.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/executor.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/http_retry.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/models.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/planner.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/skill_installer.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/skills/mkdocs-changelog/SKILL.md +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/skills/mkdocs-changelog/scripts/changelog_data.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/anchoring.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/command.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/comments.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/github.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/platform.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/state.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/__init__.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/_kroki.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/abbrevs.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/admonition_titles.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/assets.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/attachment_previews.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/captions.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/editlink.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/footer.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/images.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/internallinks.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/mermaid.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/plantuml.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_abbrevs.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_admonition_titles.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_attachment_previews.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_captions.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_changelog_config.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_changelog_publish.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_children_macro.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_cli.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_editlink.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_emitter.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_exclude_attachments.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_exclude_properties_config.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_extra_css.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_footer.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_frontmatter.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_icons.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_images.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_internallinks.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_ir.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_linkdefs.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_mermaid.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_page_loader.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_parser.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_pdf.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_plantuml.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_preprocess.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_preview.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_publish_client.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_publish_config.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_publish_pipeline.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_server.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_skill_installer.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_sync_anchoring.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_sync_command.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_sync_comments.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_sync_github.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_sync_state.py +0 -0
- {mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_treeutil.py +0 -0
{mkdocs2confluence-0.21.0/src/mkdocs2confluence.egg-info → mkdocs2confluence-0.22.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mkdocs2confluence
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.22.0
|
|
4
4
|
Summary: Publish MkDocs Material pages to Confluence Cloud — admonitions, Mermaid diagrams, tabs, page properties and more
|
|
5
5
|
Author: Anders Hybertz
|
|
6
6
|
License: GPL-3.0-or-later
|
|
@@ -67,6 +67,8 @@ A Python CLI tool that compiles MkDocs-flavoured Markdown into **native Confluen
|
|
|
67
67
|
|
|
68
68
|
> **Zensical compatible** — [Zensical](https://zensical.org/) is the modern successor to MkDocs + Material for MkDocs. Since it uses the same `mkdocs.yml` format and Python Markdown extensions, your Zensical project works with mk2conf today with no changes required.
|
|
69
69
|
|
|
70
|
+
> **ProperDocs compatible** — [ProperDocs](https://properdocs.org/) is a fork of MkDocs that reads `properdocs.yml`, which has the same format as `mkdocs.yml`. Without `--config`, mk2conf looks in the current directory for `properdocs.yml` first, then `mkdocs.yml`, the same order ProperDocs uses. All `mkdocs.yml` settings in this README, including the `confluence:` block, work the same in `properdocs.yml`.
|
|
71
|
+
|
|
70
72
|
---
|
|
71
73
|
|
|
72
74
|
## Installation
|
|
@@ -107,7 +109,7 @@ name: Publish docs
|
|
|
107
109
|
on:
|
|
108
110
|
push:
|
|
109
111
|
branches: [main]
|
|
110
|
-
paths: ['docs/**', 'mkdocs.yml']
|
|
112
|
+
paths: ['docs/**', 'mkdocs.yml', 'properdocs.yml']
|
|
111
113
|
|
|
112
114
|
# One publish at a time: overlapping runs can race to create the same page.
|
|
113
115
|
concurrency:
|
|
@@ -24,6 +24,8 @@ A Python CLI tool that compiles MkDocs-flavoured Markdown into **native Confluen
|
|
|
24
24
|
|
|
25
25
|
> **Zensical compatible** — [Zensical](https://zensical.org/) is the modern successor to MkDocs + Material for MkDocs. Since it uses the same `mkdocs.yml` format and Python Markdown extensions, your Zensical project works with mk2conf today with no changes required.
|
|
26
26
|
|
|
27
|
+
> **ProperDocs compatible** — [ProperDocs](https://properdocs.org/) is a fork of MkDocs that reads `properdocs.yml`, which has the same format as `mkdocs.yml`. Without `--config`, mk2conf looks in the current directory for `properdocs.yml` first, then `mkdocs.yml`, the same order ProperDocs uses. All `mkdocs.yml` settings in this README, including the `confluence:` block, work the same in `properdocs.yml`.
|
|
28
|
+
|
|
27
29
|
---
|
|
28
30
|
|
|
29
31
|
## Installation
|
|
@@ -64,7 +66,7 @@ name: Publish docs
|
|
|
64
66
|
on:
|
|
65
67
|
push:
|
|
66
68
|
branches: [main]
|
|
67
|
-
paths: ['docs/**', 'mkdocs.yml']
|
|
69
|
+
paths: ['docs/**', 'mkdocs.yml', 'properdocs.yml']
|
|
68
70
|
|
|
69
71
|
# One publish at a time: overlapping runs can race to create the same page.
|
|
70
72
|
concurrency:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mkdocs2confluence"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.22.0"
|
|
4
4
|
description = "Publish MkDocs Material pages to Confluence Cloud — admonitions, Mermaid diagrams, tabs, page properties and more"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "GPL-3.0-or-later" }
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0/src/mkdocs2confluence.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mkdocs2confluence
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.22.0
|
|
4
4
|
Summary: Publish MkDocs Material pages to Confluence Cloud — admonitions, Mermaid diagrams, tabs, page properties and more
|
|
5
5
|
Author: Anders Hybertz
|
|
6
6
|
License: GPL-3.0-or-later
|
|
@@ -67,6 +67,8 @@ A Python CLI tool that compiles MkDocs-flavoured Markdown into **native Confluen
|
|
|
67
67
|
|
|
68
68
|
> **Zensical compatible** — [Zensical](https://zensical.org/) is the modern successor to MkDocs + Material for MkDocs. Since it uses the same `mkdocs.yml` format and Python Markdown extensions, your Zensical project works with mk2conf today with no changes required.
|
|
69
69
|
|
|
70
|
+
> **ProperDocs compatible** — [ProperDocs](https://properdocs.org/) is a fork of MkDocs that reads `properdocs.yml`, which has the same format as `mkdocs.yml`. Without `--config`, mk2conf looks in the current directory for `properdocs.yml` first, then `mkdocs.yml`, the same order ProperDocs uses. All `mkdocs.yml` settings in this README, including the `confluence:` block, work the same in `properdocs.yml`.
|
|
71
|
+
|
|
70
72
|
---
|
|
71
73
|
|
|
72
74
|
## Installation
|
|
@@ -107,7 +109,7 @@ name: Publish docs
|
|
|
107
109
|
on:
|
|
108
110
|
push:
|
|
109
111
|
branches: [main]
|
|
110
|
-
paths: ['docs/**', 'mkdocs.yml']
|
|
112
|
+
paths: ['docs/**', 'mkdocs.yml', 'properdocs.yml']
|
|
111
113
|
|
|
112
114
|
# One publish at a time: overlapping runs can race to create the same page.
|
|
113
115
|
concurrency:
|
|
@@ -11,7 +11,7 @@ from pathlib import Path
|
|
|
11
11
|
from mkdocs_to_confluence import __version__
|
|
12
12
|
from mkdocs_to_confluence.compiler.page import compile_page
|
|
13
13
|
from mkdocs_to_confluence.emitter.xhtml import warn_unknown_admonition_kinds
|
|
14
|
-
from mkdocs_to_confluence.loader.config import load_config
|
|
14
|
+
from mkdocs_to_confluence.loader.config import find_config, load_config
|
|
15
15
|
from mkdocs_to_confluence.loader.nav import find_section, find_section_by_folder, flat_pages, resolve_nav
|
|
16
16
|
from mkdocs_to_confluence.loader.page import PageLoadError, find_page
|
|
17
17
|
from mkdocs_to_confluence.preview.render import inject_livereload, render_index, render_page
|
|
@@ -49,8 +49,8 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
49
49
|
preview.add_argument(
|
|
50
50
|
"--config",
|
|
51
51
|
metavar="PATH",
|
|
52
|
-
default=
|
|
53
|
-
help="Path to
|
|
52
|
+
default=None,
|
|
53
|
+
help="Path to the config file (default: ./properdocs.yml, else ./mkdocs.yml).",
|
|
54
54
|
)
|
|
55
55
|
preview.add_argument(
|
|
56
56
|
"--page",
|
|
@@ -110,14 +110,14 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
110
110
|
" MK2CONF_TOKEN=<token> (alias)\n"
|
|
111
111
|
"\n"
|
|
112
112
|
" The token, email, base_url, space_key/parent_page_id must also be\n"
|
|
113
|
-
" configured in the 'confluence:' block of mkdocs.yml.\n"
|
|
113
|
+
" configured in the 'confluence:' block of mkdocs.yml / properdocs.yml.\n"
|
|
114
114
|
),
|
|
115
115
|
)
|
|
116
116
|
publish.add_argument(
|
|
117
117
|
"--config",
|
|
118
118
|
metavar="PATH",
|
|
119
|
-
default=
|
|
120
|
-
help="Path to
|
|
119
|
+
default=None,
|
|
120
|
+
help="Path to the config file (default: ./properdocs.yml, else ./mkdocs.yml).",
|
|
121
121
|
)
|
|
122
122
|
publish.add_argument(
|
|
123
123
|
"--dry-run",
|
|
@@ -183,8 +183,8 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
183
183
|
pdf.add_argument(
|
|
184
184
|
"--config",
|
|
185
185
|
metavar="PATH",
|
|
186
|
-
default=
|
|
187
|
-
help="Path to
|
|
186
|
+
default=None,
|
|
187
|
+
help="Path to the config file (default: ./properdocs.yml, else ./mkdocs.yml).",
|
|
188
188
|
)
|
|
189
189
|
pdf.add_argument(
|
|
190
190
|
"--section",
|
|
@@ -229,7 +229,7 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
229
229
|
help="Sync open Confluence comments to GitHub review PRs.",
|
|
230
230
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
231
231
|
epilog=(
|
|
232
|
-
"Requires github_repo and github_token (or GITHUB_TOKEN env var) in mkdocs.yml.\n"
|
|
232
|
+
"Requires github_repo and github_token (or GITHUB_TOKEN env var) in mkdocs.yml / properdocs.yml.\n"
|
|
233
233
|
"\n"
|
|
234
234
|
"Examples:\n"
|
|
235
235
|
" mk2conf sync-comments # sync new comments → PRs\n"
|
|
@@ -240,8 +240,8 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
240
240
|
sc.add_argument(
|
|
241
241
|
"--config",
|
|
242
242
|
metavar="PATH",
|
|
243
|
-
default=
|
|
244
|
-
help="Path to
|
|
243
|
+
default=None,
|
|
244
|
+
help="Path to the config file (default: ./properdocs.yml, else ./mkdocs.yml).",
|
|
245
245
|
)
|
|
246
246
|
sc.add_argument(
|
|
247
247
|
"--check-merges",
|
|
@@ -336,8 +336,15 @@ def _parse_out_path(out_arg: str | None) -> tuple[Path, str]:
|
|
|
336
336
|
return p.parent, p.name
|
|
337
337
|
|
|
338
338
|
|
|
339
|
+
def _config_path(args: argparse.Namespace) -> Path:
|
|
340
|
+
"""Return the --config path, or look up properdocs.yml / mkdocs.yml in the CWD."""
|
|
341
|
+
if args.config:
|
|
342
|
+
return Path(args.config).resolve()
|
|
343
|
+
return find_config(Path.cwd())
|
|
344
|
+
|
|
345
|
+
|
|
339
346
|
def _cmd_preview(args: argparse.Namespace) -> None:
|
|
340
|
-
config_path =
|
|
347
|
+
config_path = _config_path(args)
|
|
341
348
|
config = load_config(config_path)
|
|
342
349
|
warn_unknown_admonition_kinds(config.confluence.admonitions if config.confluence else {})
|
|
343
350
|
|
|
@@ -492,13 +499,13 @@ def _cmd_preview(args: argparse.Namespace) -> None:
|
|
|
492
499
|
|
|
493
500
|
|
|
494
501
|
def _cmd_publish(args: argparse.Namespace) -> None:
|
|
495
|
-
config_path =
|
|
502
|
+
config_path = _config_path(args)
|
|
496
503
|
config = load_config(config_path)
|
|
497
504
|
warn_unknown_admonition_kinds(config.confluence.admonitions if config.confluence else {})
|
|
498
505
|
|
|
499
506
|
conf_config = config.confluence
|
|
500
507
|
if conf_config is None:
|
|
501
|
-
print("error: no 'confluence:' section in
|
|
508
|
+
print(f"error: no 'confluence:' section in {config_path.name}", file=sys.stderr)
|
|
502
509
|
sys.exit(1)
|
|
503
510
|
|
|
504
511
|
token = conf_config.token
|
|
@@ -565,7 +572,7 @@ def _cmd_publish(args: argparse.Namespace) -> None:
|
|
|
565
572
|
space_id = client.get_space_id(conf_config.space_key)
|
|
566
573
|
else:
|
|
567
574
|
print(
|
|
568
|
-
"error: cannot determine space — set 'space_key' or 'parent_page_id' in
|
|
575
|
+
f"error: cannot determine space — set 'space_key' or 'parent_page_id' in {config_path.name}",
|
|
569
576
|
file=sys.stderr,
|
|
570
577
|
)
|
|
571
578
|
sys.exit(1)
|
|
@@ -684,7 +691,7 @@ def _cmd_pdf(args: argparse.Namespace) -> None:
|
|
|
684
691
|
from mkdocs_to_confluence.pdf.generator import write_pdf
|
|
685
692
|
from mkdocs_to_confluence.pdf.render import build_pdf_html
|
|
686
693
|
|
|
687
|
-
config_path =
|
|
694
|
+
config_path = _config_path(args)
|
|
688
695
|
config = load_config(config_path)
|
|
689
696
|
warn_unknown_admonition_kinds(config.confluence.admonitions if config.confluence else {})
|
|
690
697
|
|
|
@@ -763,12 +770,12 @@ def _cmd_sync_comments(args: argparse.Namespace) -> None:
|
|
|
763
770
|
from mkdocs_to_confluence.sync.command import check_and_resolve_merges, run_sync_comments
|
|
764
771
|
from mkdocs_to_confluence.sync.github import GitHubReviewClient
|
|
765
772
|
|
|
766
|
-
config_path =
|
|
773
|
+
config_path = _config_path(args)
|
|
767
774
|
config = load_config(config_path)
|
|
768
775
|
|
|
769
776
|
conf = config.confluence
|
|
770
777
|
if conf is None:
|
|
771
|
-
print("error: no 'confluence:' section in
|
|
778
|
+
print(f"error: no 'confluence:' section in {config_path.name}", file=sys.stderr)
|
|
772
779
|
sys.exit(1)
|
|
773
780
|
|
|
774
781
|
if not conf.token:
|
|
@@ -784,7 +791,8 @@ def _cmd_sync_comments(args: argparse.Namespace) -> None:
|
|
|
784
791
|
|
|
785
792
|
if not conf.github_token:
|
|
786
793
|
print(
|
|
787
|
-
"error: GitHub token not set. Set GITHUB_TOKEN env var or 'confluence.github_token'
|
|
794
|
+
"error: GitHub token not set. Set GITHUB_TOKEN env var or 'confluence.github_token' "
|
|
795
|
+
f"in {config_path.name}.",
|
|
788
796
|
file=sys.stderr,
|
|
789
797
|
)
|
|
790
798
|
sys.exit(1)
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/loader/config.py
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Load and validate mkdocs.yml into a typed MkDocsConfig."""
|
|
1
|
+
"""Load and validate mkdocs.yml / properdocs.yml into a typed MkDocsConfig."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
@@ -149,20 +149,43 @@ def _default_edit_uri(repo_url: str | None) -> str | None:
|
|
|
149
149
|
return None
|
|
150
150
|
|
|
151
151
|
|
|
152
|
+
# Default config files, in lookup order. ProperDocs (a renamed MkDocs fork)
|
|
153
|
+
# reads properdocs.yml first and falls back to mkdocs.yml; we mirror that.
|
|
154
|
+
CONFIG_FILENAMES: tuple[str, ...] = ("properdocs.yml", "mkdocs.yml")
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def find_config(directory: Path) -> Path:
|
|
158
|
+
"""Return the first of :data:`CONFIG_FILENAMES` that exists in *directory*.
|
|
159
|
+
|
|
160
|
+
Raises:
|
|
161
|
+
FileNotFoundError: If none of them exists.
|
|
162
|
+
"""
|
|
163
|
+
for name in CONFIG_FILENAMES:
|
|
164
|
+
candidate = directory / name
|
|
165
|
+
if candidate.is_file():
|
|
166
|
+
return candidate.resolve()
|
|
167
|
+
raise FileNotFoundError(
|
|
168
|
+
f"no {' or '.join(CONFIG_FILENAMES)} found in {directory.resolve()} "
|
|
169
|
+
"(use --config to name the file)"
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
|
|
152
173
|
def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
153
174
|
"""Parse *mkdocs_yml* and return a validated :class:`MkDocsConfig`.
|
|
154
175
|
|
|
155
176
|
Args:
|
|
156
|
-
mkdocs_yml: Absolute (or CWD-relative) path to ``mkdocs.yml
|
|
177
|
+
mkdocs_yml: Absolute (or CWD-relative) path to ``mkdocs.yml`` or
|
|
178
|
+
``properdocs.yml`` (same format; see :func:`find_config`).
|
|
157
179
|
|
|
158
180
|
Raises:
|
|
159
181
|
FileNotFoundError: If *mkdocs_yml* does not exist.
|
|
160
182
|
ConfigError: If required fields are absent or have invalid values.
|
|
161
183
|
"""
|
|
162
184
|
mkdocs_yml = Path(mkdocs_yml).resolve()
|
|
185
|
+
cfg_name = mkdocs_yml.name # named in error messages: mkdocs.yml or properdocs.yml
|
|
163
186
|
|
|
164
187
|
if not mkdocs_yml.exists():
|
|
165
|
-
raise FileNotFoundError(f"
|
|
188
|
+
raise FileNotFoundError(f"config file not found: {mkdocs_yml}")
|
|
166
189
|
|
|
167
190
|
with mkdocs_yml.open(encoding="utf-8") as fh:
|
|
168
191
|
# B506 is suppressed below because _make_env_loader() returns a
|
|
@@ -172,22 +195,22 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
172
195
|
raw: object = yaml.load(fh, Loader=_make_env_loader()) # noqa: S506 # nosec B506
|
|
173
196
|
|
|
174
197
|
if not isinstance(raw, dict):
|
|
175
|
-
raise ConfigError("
|
|
198
|
+
raise ConfigError(f"{cfg_name} must be a YAML mapping at the top level.")
|
|
176
199
|
|
|
177
200
|
# --- site_name ---
|
|
178
201
|
site_name = raw.get("site_name")
|
|
179
202
|
if not isinstance(site_name, str) or not site_name.strip():
|
|
180
|
-
raise ConfigError("
|
|
203
|
+
raise ConfigError(f"{cfg_name}: 'site_name' is required and must be a non-empty string.")
|
|
181
204
|
|
|
182
205
|
# --- nav (optional — some projects use awesome-pages or literate-nav plugins) ---
|
|
183
206
|
nav = raw.get("nav")
|
|
184
207
|
if nav is not None and (not isinstance(nav, list) or len(nav) == 0):
|
|
185
|
-
raise ConfigError("
|
|
208
|
+
raise ConfigError(f"{cfg_name}: 'nav' must be a non-empty list when present.")
|
|
186
209
|
|
|
187
210
|
# --- docs_dir (optional; defaults to 'docs' relative to mkdocs.yml) ---
|
|
188
211
|
raw_docs_dir = raw.get("docs_dir", "docs")
|
|
189
212
|
if not isinstance(raw_docs_dir, str):
|
|
190
|
-
raise ConfigError("
|
|
213
|
+
raise ConfigError(f"{cfg_name}: 'docs_dir' must be a string.")
|
|
191
214
|
docs_dir = (mkdocs_yml.parent / raw_docs_dir).resolve()
|
|
192
215
|
|
|
193
216
|
# --- site_url (optional) ---
|
|
@@ -201,13 +224,13 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
201
224
|
if repo_url is not None:
|
|
202
225
|
if not isinstance(repo_url, str) or not _REPO_URL_RE.match(repo_url):
|
|
203
226
|
raise ConfigError(
|
|
204
|
-
"
|
|
227
|
+
f"{cfg_name}: 'repo_url' must be an http/https URL when provided."
|
|
205
228
|
)
|
|
206
229
|
|
|
207
230
|
# --- edit_uri (optional; sensible defaults for GitHub/GitLab) ---
|
|
208
231
|
_raw_edit_uri = raw.get("edit_uri", _default_edit_uri(repo_url))
|
|
209
232
|
if _raw_edit_uri is not None and not isinstance(_raw_edit_uri, str):
|
|
210
|
-
raise ConfigError("
|
|
233
|
+
raise ConfigError(f"{cfg_name}: 'edit_uri' must be a string when provided.")
|
|
211
234
|
edit_uri: str | None = _raw_edit_uri or None
|
|
212
235
|
|
|
213
236
|
# --- confluence (optional) ---
|
|
@@ -223,17 +246,17 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
223
246
|
raw_conf = extra.get("confluence")
|
|
224
247
|
if raw_conf is not None:
|
|
225
248
|
if not isinstance(raw_conf, dict):
|
|
226
|
-
raise ConfigError("
|
|
249
|
+
raise ConfigError(f"{cfg_name}: 'confluence' must be a mapping when present.")
|
|
227
250
|
|
|
228
251
|
base_url = raw_conf.get("base_url")
|
|
229
252
|
if not isinstance(base_url, str) or not base_url.strip():
|
|
230
|
-
raise ConfigError("
|
|
253
|
+
raise ConfigError(f"{cfg_name}: 'confluence.base_url' is required and must be a non-empty string.")
|
|
231
254
|
|
|
232
255
|
# Security: require HTTPS so credentials are never sent in plaintext.
|
|
233
256
|
parsed_url = urlparse(base_url.strip())
|
|
234
257
|
if parsed_url.scheme != "https":
|
|
235
258
|
raise ConfigError(
|
|
236
|
-
"
|
|
259
|
+
f"{cfg_name}: 'confluence.base_url' must use HTTPS (got "
|
|
237
260
|
f"{parsed_url.scheme!r}). Plain HTTP would transmit credentials in "
|
|
238
261
|
"cleartext."
|
|
239
262
|
)
|
|
@@ -246,7 +269,7 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
246
269
|
_is_atlassian = host == "atlassian.net" or host.endswith(".atlassian.net")
|
|
247
270
|
if not _is_atlassian and not allow_any_host:
|
|
248
271
|
raise ConfigError(
|
|
249
|
-
f"
|
|
272
|
+
f"{cfg_name}: 'confluence.base_url' host {host!r} is not an "
|
|
250
273
|
"Atlassian Cloud domain (*.atlassian.net). If you are using a "
|
|
251
274
|
"self-hosted Confluence instance, add 'allow_any_host: true' under "
|
|
252
275
|
"the 'confluence:' block to acknowledge this."
|
|
@@ -263,13 +286,13 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
263
286
|
|
|
264
287
|
if not space_key and not parent_page_id:
|
|
265
288
|
raise ConfigError(
|
|
266
|
-
"
|
|
289
|
+
f"{cfg_name}: 'confluence.space_key' or 'confluence.parent_page_id' is required. "
|
|
267
290
|
"Provide at least one so the publisher can locate the target space."
|
|
268
291
|
)
|
|
269
292
|
|
|
270
293
|
email = raw_conf.get("email")
|
|
271
294
|
if not isinstance(email, str) or not email.strip():
|
|
272
|
-
raise ConfigError("
|
|
295
|
+
raise ConfigError(f"{cfg_name}: 'confluence.email' is required and must be a non-empty string.")
|
|
273
296
|
|
|
274
297
|
# Token lookup order: YAML value → CONFLUENCE_API_TOKEN env → MK2CONF_TOKEN env
|
|
275
298
|
token: str = raw_conf.get("token") or ""
|
|
@@ -289,7 +312,7 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
289
312
|
candidate.relative_to(docs_dir)
|
|
290
313
|
except ValueError:
|
|
291
314
|
raise ConfigError(
|
|
292
|
-
f"
|
|
315
|
+
f"{cfg_name}: 'confluence.changelog' path {cl_str!r} "
|
|
293
316
|
"escapes docs_dir. The path must be relative to the docs directory."
|
|
294
317
|
) from None
|
|
295
318
|
changelog_file = cl_str
|
|
@@ -303,7 +326,7 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
303
326
|
exclude_properties = tuple(str(k) for k in raw_exclude)
|
|
304
327
|
else:
|
|
305
328
|
raise ConfigError(
|
|
306
|
-
"
|
|
329
|
+
f"{cfg_name}: 'confluence.exclude_properties' must be a list of "
|
|
307
330
|
f"front matter keys, got {type(raw_exclude).__name__}."
|
|
308
331
|
)
|
|
309
332
|
|
|
@@ -311,7 +334,7 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
311
334
|
raw_preview = raw_conf.get("attachment_preview", False)
|
|
312
335
|
if not isinstance(raw_preview, bool):
|
|
313
336
|
raise ConfigError(
|
|
314
|
-
"
|
|
337
|
+
f"{cfg_name}: 'confluence.attachment_preview' must be a boolean, "
|
|
315
338
|
f"got {type(raw_preview).__name__}."
|
|
316
339
|
)
|
|
317
340
|
attachment_preview = raw_preview
|
|
@@ -325,7 +348,7 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
325
348
|
isinstance(ext, str) and ext.strip().lstrip(".") for ext in raw_excl_att
|
|
326
349
|
):
|
|
327
350
|
raise ConfigError(
|
|
328
|
-
"
|
|
351
|
+
f"{cfg_name}: 'confluence.exclude_attachments' must be a list of "
|
|
329
352
|
"file extensions (e.g. ['.yml', '.yaml'])."
|
|
330
353
|
)
|
|
331
354
|
exclude_attachments = tuple(
|
|
@@ -336,7 +359,7 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
336
359
|
raw_children = raw_conf.get("children_macro", True)
|
|
337
360
|
if not isinstance(raw_children, bool):
|
|
338
361
|
raise ConfigError(
|
|
339
|
-
"
|
|
362
|
+
f"{cfg_name}: 'confluence.children_macro' must be a boolean, "
|
|
340
363
|
f"got {type(raw_children).__name__}."
|
|
341
364
|
)
|
|
342
365
|
children_macro = raw_children
|
|
@@ -347,18 +370,18 @@ def load_config(mkdocs_yml: Path) -> MkDocsConfig:
|
|
|
347
370
|
raw_admonitions = raw_conf.get("admonitions", {})
|
|
348
371
|
if not isinstance(raw_admonitions, dict):
|
|
349
372
|
raise ConfigError(
|
|
350
|
-
"
|
|
373
|
+
f"{cfg_name}: 'confluence.admonitions' must be a mapping of "
|
|
351
374
|
f"custom kind to built-in kind, got {type(raw_admonitions).__name__}."
|
|
352
375
|
)
|
|
353
376
|
admonitions: dict[str, str] = {}
|
|
354
377
|
for key, value in raw_admonitions.items():
|
|
355
378
|
if not isinstance(key, str) or not key.strip():
|
|
356
379
|
raise ConfigError(
|
|
357
|
-
"
|
|
380
|
+
f"{cfg_name}: 'confluence.admonitions' keys must be non-empty strings."
|
|
358
381
|
)
|
|
359
382
|
if not isinstance(value, str) or not value.strip():
|
|
360
383
|
raise ConfigError(
|
|
361
|
-
f"
|
|
384
|
+
f"{cfg_name}: 'confluence.admonitions.{key}' must be a non-empty "
|
|
362
385
|
"string naming a built-in admonition kind (e.g. 'tip', 'warning')."
|
|
363
386
|
)
|
|
364
387
|
# Admonition kinds are case-insensitive in Markdown; normalise both sides.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"""Tests for config file discovery: properdocs.yml first, then mkdocs.yml."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
import pytest
|
|
9
|
+
|
|
10
|
+
from mkdocs_to_confluence.cli import _config_path, main
|
|
11
|
+
from mkdocs_to_confluence.loader.config import ConfigError, find_config, load_config
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _write(directory: Path, name: str, site_name: str = "Test") -> Path:
|
|
15
|
+
(directory / "docs").mkdir(exist_ok=True)
|
|
16
|
+
path = directory / name
|
|
17
|
+
path.write_text(f"site_name: {site_name}\n", encoding="utf-8")
|
|
18
|
+
return path
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def test_finds_properdocs_yml(tmp_path: Path) -> None:
|
|
22
|
+
expected = _write(tmp_path, "properdocs.yml").resolve()
|
|
23
|
+
assert find_config(tmp_path) == expected
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def test_falls_back_to_mkdocs_yml(tmp_path: Path) -> None:
|
|
27
|
+
expected = _write(tmp_path, "mkdocs.yml").resolve()
|
|
28
|
+
assert find_config(tmp_path) == expected
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_properdocs_yml_wins_when_both_exist(tmp_path: Path) -> None:
|
|
32
|
+
_write(tmp_path, "mkdocs.yml")
|
|
33
|
+
_write(tmp_path, "properdocs.yml")
|
|
34
|
+
assert find_config(tmp_path).name == "properdocs.yml"
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def test_neither_file_raises_naming_both(tmp_path: Path) -> None:
|
|
38
|
+
with pytest.raises(FileNotFoundError, match=r"properdocs\.yml or mkdocs\.yml"):
|
|
39
|
+
find_config(tmp_path)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def test_properdocs_yml_loads_like_mkdocs_yml(tmp_path: Path) -> None:
|
|
43
|
+
cfg = load_config(_write(tmp_path, "properdocs.yml", site_name="Proper"))
|
|
44
|
+
assert cfg.site_name == "Proper"
|
|
45
|
+
assert cfg.docs_dir == (tmp_path / "docs").resolve()
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def test_errors_name_the_loaded_file(tmp_path: Path) -> None:
|
|
49
|
+
path = tmp_path / "properdocs.yml"
|
|
50
|
+
path.write_text("site_name: ''\n", encoding="utf-8")
|
|
51
|
+
with pytest.raises(ConfigError, match=r"^properdocs\.yml: 'site_name'"):
|
|
52
|
+
load_config(path)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# ── CLI ──────────────────────────────────────────────────────────────────────
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def test_cli_looks_up_properdocs_yml_in_cwd(
|
|
59
|
+
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
|
60
|
+
) -> None:
|
|
61
|
+
_write(tmp_path, "mkdocs.yml")
|
|
62
|
+
expected = _write(tmp_path, "properdocs.yml").resolve()
|
|
63
|
+
monkeypatch.chdir(tmp_path)
|
|
64
|
+
assert _config_path(argparse.Namespace(config=None)) == expected
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def test_cli_explicit_config_wins(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
68
|
+
_write(tmp_path, "properdocs.yml")
|
|
69
|
+
other = tmp_path / "site"
|
|
70
|
+
other.mkdir()
|
|
71
|
+
explicit = _write(other, "mkdocs.yml")
|
|
72
|
+
monkeypatch.chdir(tmp_path)
|
|
73
|
+
assert _config_path(argparse.Namespace(config=str(explicit))) == explicit.resolve()
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def test_cli_without_any_config_exits_with_error(
|
|
77
|
+
tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
|
|
78
|
+
) -> None:
|
|
79
|
+
monkeypatch.chdir(tmp_path)
|
|
80
|
+
with pytest.raises(SystemExit) as exc:
|
|
81
|
+
main(["preview", "--page", "index.md"])
|
|
82
|
+
assert exc.value.code == 1
|
|
83
|
+
assert "properdocs.yml or mkdocs.yml" in capsys.readouterr().err
|
|
@@ -80,7 +80,7 @@ class TestLoadConfigHappyPath:
|
|
|
80
80
|
|
|
81
81
|
class TestLoadConfigErrors:
|
|
82
82
|
def test_missing_file_raises_file_not_found(self, tmp_path: Path) -> None:
|
|
83
|
-
with pytest.raises(FileNotFoundError, match="
|
|
83
|
+
with pytest.raises(FileNotFoundError, match="config file not found"):
|
|
84
84
|
load_config(tmp_path / "nonexistent.yml")
|
|
85
85
|
|
|
86
86
|
def test_missing_site_name_raises_config_error(self, tmp_path: Path) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs2confluence.egg-info/requires.txt
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs2confluence.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/compiler/__init__.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/compiler/models.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/compiler/page.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/emitter/__init__.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/emitter/xhtml.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/ir/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/ir/treeutil.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/loader/__init__.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/loader/extra_css.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/loader/nav.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/loader/page.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/parser/__init__.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/parser/markdown.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/pdf/__init__.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/pdf/generator.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/pdf/render.py
RENAMED
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/abbrevs.py
RENAMED
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/fence.py
RENAMED
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preprocess/icons.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preview/__init__.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preview/render.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/preview/server.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/client.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/digest.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/executor.py
RENAMED
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/models.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/publisher/planner.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/skill_installer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/__init__.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/anchoring.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/command.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/comments.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/github.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/platform.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/sync/state.py
RENAMED
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/_kroki.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/abbrevs.py
RENAMED
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/assets.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/footer.py
RENAMED
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/images.py
RENAMED
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/src/mkdocs_to_confluence/transforms/mermaid.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mkdocs2confluence-0.21.0 → mkdocs2confluence-0.22.0}/tests/test_exclude_properties_config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|