mkdocs-techdocs-core 1.4.1__tar.gz → 1.5.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.
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mkdocs-techdocs-core
3
- Version: 1.4.1
3
+ Version: 1.5.0
4
4
  Summary: The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions
5
5
  Home-page: https://github.com/backstage/mkdocs-techdocs-core
6
6
  Author: TechDocs Core
7
- Author-email: pulp-fiction@spotify.com
7
+ Author-email: protean@spotify.com
8
8
  License: Apache-2.0
9
9
  Description: # mkdocs-techdocs-core
10
10
 
@@ -157,6 +157,13 @@ Description: # mkdocs-techdocs-core
157
157
 
158
158
  ## Changelog
159
159
 
160
+ ### 1.5.0
161
+ - Renamed package namespace from `src` to `techdocs_core`
162
+ - Fix small deprecation in tests (`assertEquals` -> `assertEqual`) as it was deprecated since Python 3.2 and removed in 3.12
163
+
164
+ ### 1.4.2
165
+ - Fixes an issue where individual extension configurations were being ignored if the extension was included within `pymdownx.extra`. See [#147](https://github.com/backstage/mkdocs-techdocs-core/issues/147)
166
+
160
167
  ### 1.4.1
161
168
  - Introduced mkdocs-redirects plugin (v`1.2.1`).
162
169
 
@@ -149,6 +149,13 @@ We only use `material-mkdocs` as base styles because Backstage also uses the `Ma
149
149
 
150
150
  ## Changelog
151
151
 
152
+ ### 1.5.0
153
+ - Renamed package namespace from `src` to `techdocs_core`
154
+ - Fix small deprecation in tests (`assertEquals` -> `assertEqual`) as it was deprecated since Python 3.2 and removed in 3.12
155
+
156
+ ### 1.4.2
157
+ - Fixes an issue where individual extension configurations were being ignored if the extension was included within `pymdownx.extra`. See [#147](https://github.com/backstage/mkdocs-techdocs-core/issues/147)
158
+
152
159
  ### 1.4.1
153
160
  - Introduced mkdocs-redirects plugin (v`1.2.1`).
154
161
 
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mkdocs-techdocs-core
3
- Version: 1.4.1
3
+ Version: 1.5.0
4
4
  Summary: The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions
5
5
  Home-page: https://github.com/backstage/mkdocs-techdocs-core
6
6
  Author: TechDocs Core
7
- Author-email: pulp-fiction@spotify.com
7
+ Author-email: protean@spotify.com
8
8
  License: Apache-2.0
9
9
  Description: # mkdocs-techdocs-core
10
10
 
@@ -157,6 +157,13 @@ Description: # mkdocs-techdocs-core
157
157
 
158
158
  ## Changelog
159
159
 
160
+ ### 1.5.0
161
+ - Renamed package namespace from `src` to `techdocs_core`
162
+ - Fix small deprecation in tests (`assertEquals` -> `assertEqual`) as it was deprecated since Python 3.2 and removed in 3.12
163
+
164
+ ### 1.4.2
165
+ - Fixes an issue where individual extension configurations were being ignored if the extension was included within `pymdownx.extra`. See [#147](https://github.com/backstage/mkdocs-techdocs-core/issues/147)
166
+
160
167
  ### 1.4.1
161
168
  - Introduced mkdocs-redirects plugin (v`1.2.1`).
162
169
 
@@ -6,6 +6,6 @@ mkdocs_techdocs_core.egg-info/dependency_links.txt
6
6
  mkdocs_techdocs_core.egg-info/entry_points.txt
7
7
  mkdocs_techdocs_core.egg-info/requires.txt
8
8
  mkdocs_techdocs_core.egg-info/top_level.txt
9
- src/__init__.py
10
- src/core.py
11
- src/test_core.py
9
+ techdocs_core/__init__.py
10
+ techdocs_core/core.py
11
+ techdocs_core/test_core.py
@@ -0,0 +1,3 @@
1
+ [mkdocs.plugins]
2
+ techdocs-core = techdocs_core.core:TechDocsCore
3
+
@@ -1,9 +1,9 @@
1
1
  mkdocs>=1.6
2
2
  Markdown<3.4,>=3.2
3
- mkdocs-material==9.5.33
3
+ mkdocs-material==9.5.43
4
4
  markdown_inline_graphviz_extension==1.1.2
5
5
  mkdocs-monorepo-plugin==1.1.0
6
- plantuml-markdown==3.10.3
6
+ plantuml-markdown==3.10.4
7
7
  mdx_truly_sane_lists==1.3
8
8
  pymdown-extensions==10.3.1
9
9
  pygments==2.17.2
@@ -9,10 +9,10 @@ Markdown>=3.2,<3.4
9
9
  # pinned to an exact version. Bumps should be accompanied by release notes
10
10
  # explaining what was added or fixed (or at least pointing to the underlying
11
11
  # release notes of the bumped package).
12
- mkdocs-material==9.5.33
12
+ mkdocs-material==9.5.43
13
13
  markdown_inline_graphviz_extension==1.1.2
14
14
  mkdocs-monorepo-plugin==1.1.0
15
- plantuml-markdown==3.10.3
15
+ plantuml-markdown==3.10.4
16
16
  mdx_truly_sane_lists==1.3
17
17
  pymdown-extensions==10.3.1
18
18
  pygments==2.17.2
@@ -28,7 +28,7 @@ with open("requirements.txt") as f:
28
28
 
29
29
  setup(
30
30
  name="mkdocs-techdocs-core",
31
- version="1.4.1",
31
+ version="1.5.0",
32
32
  description="The core MkDocs plugin used by Backstage's TechDocs as a wrapper around "
33
33
  "multiple MkDocs plugins and Python Markdown extensions",
34
34
  long_description=long_description,
@@ -36,7 +36,7 @@ setup(
36
36
  keywords="mkdocs",
37
37
  url="https://github.com/backstage/mkdocs-techdocs-core",
38
38
  author="TechDocs Core",
39
- author_email="pulp-fiction@spotify.com",
39
+ author_email="protean@spotify.com",
40
40
  license="Apache-2.0",
41
41
  python_requires=">=3.7",
42
42
  install_requires=required,
@@ -50,5 +50,7 @@ setup(
50
50
  "Programming Language :: Python :: 3.8",
51
51
  ],
52
52
  packages=find_packages(),
53
- entry_points={"mkdocs.plugins": ["techdocs-core = src.core:TechDocsCore"]},
53
+ entry_points={
54
+ "mkdocs.plugins": ["techdocs-core = techdocs_core.core:TechDocsCore"]
55
+ },
54
56
  )
@@ -23,6 +23,7 @@ from mkdocs.contrib.search import SearchPlugin
23
23
  from material.plugins.search.plugin import SearchPlugin as MaterialSearchPlugin
24
24
  from mkdocs_monorepo_plugin.plugin import MonorepoPlugin
25
25
  from pymdownx.emoji import to_svg
26
+ from pymdownx.extra import extra_extensions
26
27
 
27
28
  log = logging.getLogger(__name__)
28
29
 
@@ -114,7 +115,6 @@ class TechDocsCore(BasePlugin):
114
115
  config["markdown_extensions"].append("pymdownx.mark")
115
116
  config["markdown_extensions"].append("pymdownx.smartsymbols")
116
117
  config["markdown_extensions"].append("pymdownx.snippets")
117
- config["markdown_extensions"].append("pymdownx.superfences")
118
118
  config["markdown_extensions"].append("pymdownx.highlight")
119
119
  config["mdx_configs"]["pymdownx.highlight"] = {
120
120
  "linenums": True,
@@ -134,6 +134,17 @@ class TechDocsCore(BasePlugin):
134
134
  }
135
135
  config["markdown_extensions"].append("pymdownx.tilde")
136
136
 
137
+ # merge individual extension configs under the pymdownx.extra extension namespace if individual extension is supplied by pymdownx.extra
138
+ # https://facelessuser.github.io/pymdown-extensions/extensions/extra/
139
+ if "pymdownx.extra" not in config["mdx_configs"]:
140
+ config["mdx_configs"]["pymdownx.extra"] = {}
141
+ for extension in extra_extensions:
142
+ if extension in config["mdx_configs"]:
143
+ config["mdx_configs"]["pymdownx.extra"][extension] = config[
144
+ "mdx_configs"
145
+ ][extension]
146
+ del config["mdx_configs"][extension]
147
+
137
148
  config["markdown_extensions"].append("markdown_inline_graphviz")
138
149
  config["markdown_extensions"].append("plantuml_markdown")
139
150
  config["markdown_extensions"].append("mdx_truly_sane_lists")
@@ -88,7 +88,9 @@ class TestTechDocsCoreConfig(unittest.TestCase):
88
88
  def test_template_renders__multiline_value_as_valid_json(self):
89
89
  self.techdocscore.on_config(self.mkdocs_yaml_config)
90
90
  env = Environment(
91
- loader=PackageLoader("test", self.techdocscore.tmp_dir_techdocs_theme.name),
91
+ loader=PackageLoader(
92
+ "techdocs_core", self.techdocscore.tmp_dir_techdocs_theme.name
93
+ ),
92
94
  autoescape=select_autoescape(),
93
95
  )
94
96
  template = env.get_template("techdocs_metadata.json")
@@ -98,7 +100,7 @@ class TestTechDocsCoreConfig(unittest.TestCase):
98
100
  }
99
101
  rendered = template.render(config=config)
100
102
  as_json = json.loads(rendered)
101
- self.assertEquals(config, as_json)
103
+ self.assertEqual(config, as_json)
102
104
 
103
105
  def test_restrict_snippet_base_path(self):
104
106
  self.mkdocs_yaml_config["mdx_configs"] = {
@@ -1,3 +0,0 @@
1
- [mkdocs.plugins]
2
- techdocs-core = src.core:TechDocsCore
3
-