Skip to content

Commit

Permalink
Merge pull request #227 from deejay1/rename_src_picked
Browse files Browse the repository at this point in the history
Rename package namespace and fix deprecation
  • Loading branch information
awanlin authored Nov 7, 2024
2 parents c83d4f1 + 2d1d875 commit e795583
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
pip install -r requirements.txt
- name: Test with unittest
run: |
python -m unittest src/test_core.py
python -m unittest techdocs_core/test_core.py
- name: Uninstall dependencies
run: |
pip list --format=freeze | xargs pip uninstall -y
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ We only use `material-mkdocs` as base styles because Backstage also uses the `Ma

## Changelog

### 1.5.0
- Renamed package namespace from `src` to `techdocs_core`
- Fix small deprecation in tests (`assertEquals` -> `assertEqual`) as it was deprecated since Python 3.2 and removed in 3.12

### 1.4.2
- 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)

Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

setup(
name="mkdocs-techdocs-core",
version="1.4.2",
version="1.5.0",
description="The core MkDocs plugin used by Backstage's TechDocs as a wrapper around "
"multiple MkDocs plugins and Python Markdown extensions",
long_description=long_description,
Expand All @@ -50,5 +50,7 @@
"Programming Language :: Python :: 3.8",
],
packages=find_packages(),
entry_points={"mkdocs.plugins": ["techdocs-core = src.core:TechDocsCore"]},
entry_points={
"mkdocs.plugins": ["techdocs-core = techdocs_core.core:TechDocsCore"]
},
)
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions src/test_core.py → techdocs_core/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ def test_theme_overrides_dirs(self):
def test_template_renders__multiline_value_as_valid_json(self):
self.techdocscore.on_config(self.mkdocs_yaml_config)
env = Environment(
loader=PackageLoader("test", self.techdocscore.tmp_dir_techdocs_theme.name),
loader=PackageLoader(
"techdocs_core", self.techdocscore.tmp_dir_techdocs_theme.name
),
autoescape=select_autoescape(),
)
template = env.get_template("techdocs_metadata.json")
Expand All @@ -98,7 +100,7 @@ def test_template_renders__multiline_value_as_valid_json(self):
}
rendered = template.render(config=config)
as_json = json.loads(rendered)
self.assertEquals(config, as_json)
self.assertEqual(config, as_json)

def test_restrict_snippet_base_path(self):
self.mkdocs_yaml_config["mdx_configs"] = {
Expand Down

0 comments on commit e795583

Please sign in to comment.