Skip to content

Commit 54dc89b

Browse files
committed
merge
2 parents 12135e0 + 7cf62f6 commit 54dc89b

File tree

4 files changed

+737
-694
lines changed

4 files changed

+737
-694
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ license = { text = "MIT" }
1616
description="Mkdocs plugin that enables displaying the localized date of the last git modification of a markdown file."
1717
readme = { file = "README.md", content-type = "text/markdown" }
1818

19-
requires-python=">=3.8"
19+
requires-python=">=3.9"
2020

2121
classifiers=[
2222
"Operating System :: OS Independent",
@@ -117,7 +117,7 @@ dev-dependencies = [
117117
"mkdocs-gen-files>=0.5.0",
118118
"mkdocs-git-authors-plugin>=0.9.2",
119119
"mkdocs-material>=9.6.7",
120-
"mkdocs-techdocs-core",
120+
"mkdocs-techdocs-core>=1.0.0",
121121
"mkdocs-monorepo-plugin>=1.1.0",
122122
"mkdocs-static-i18n>=1.3.0",
123123
"pytest>=8.3.5",

src/mkdocs_git_revision_date_localized_plugin/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def get_git_commit_timestamp(self, path: str, is_first_commit: bool = False) ->
118118
format="%H %at",
119119
n=len(self.ignored_commits) + 1,
120120
no_show_signature=True,
121+
follow=follow_option,
121122
).split("\n")
122123

123124
# process the commits for the file in reverse-chronological order. Ignore any commit that is on the

tests/test_builds.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def validate_mkdocs_file(temp_path: str, mkdocs_yml_file: str):
320320
testproject_path = setup_clean_mkdocs_folder(mkdocs_yml_path=mkdocs_yml_file, output_path=temp_path)
321321
setup_commit_history(testproject_path)
322322
result = build_docs_setup(testproject_path)
323-
assert result.exit_code == 0, f"'mkdocs build' command failed with output:\n{result.stdout}"
323+
assert result.exit_code == 0, f"'mkdocs build' command failed with output:\n{result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"
324324

325325
# validate build with locale retrieved from mkdocs config file
326326
validate_build(testproject_path, plugin_config=get_plugin_config_from_mkdocs(mkdocs_yml_file))
@@ -376,7 +376,7 @@ def test_tags_are_replaced(tmp_path, mkdocs_file):
376376
testproject_path = setup_clean_mkdocs_folder(mkdocs_yml_path=f"tests/fixtures/{mkdocs_file}", output_path=tmp_path)
377377
setup_commit_history(testproject_path)
378378
result = build_docs_setup(testproject_path)
379-
assert result.exit_code == 0, "'mkdocs build' command failed"
379+
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n{result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"
380380

381381
plugin_config = get_plugin_config_from_mkdocs(str(testproject_path / "mkdocs.yml"))
382382
tags_file = testproject_path / "site/page_with_tag/index.html"
@@ -647,7 +647,7 @@ def test_mkdocs_genfiles_plugin(tmp_path):
647647
)
648648
setup_commit_history(testproject_path)
649649
result = build_docs_setup(testproject_path)
650-
assert result.exit_code == 0, f"'mkdocs build' command failed with {result.stdout}"
650+
assert result.exit_code == 0, f"'mkdocs build' command failed with {result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"
651651

652652
# validate the build
653653
plugin_config = get_plugin_config_from_mkdocs(str(testproject_path / "mkdocs.yml"))
@@ -691,22 +691,22 @@ def test_monorepo_compat(tmp_path):
691691
testproject_path = setup_clean_mkdocs_folder("tests/fixtures/monorepo/mkdocs.yml", tmp_path)
692692
setup_commit_history(testproject_path)
693693
result = build_docs_setup(testproject_path)
694-
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}"
694+
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"
695695

696696
@pytest.mark.skipif(sys.platform.startswith("win"), reason="monorepo plugin did not work for me on windows (even without this plugin)")
697697
def test_monorepo_compat_reverse_order(tmp_path):
698698
testproject_path = setup_clean_mkdocs_folder("tests/fixtures/monorepo/mkdocs_reverse_order.yml", tmp_path)
699699
setup_commit_history(testproject_path)
700700
result = build_docs_setup(testproject_path)
701-
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}"
701+
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"
702702

703703

704704
def test_genfiles_plugin(tmp_path):
705705
testproject_path = setup_clean_mkdocs_folder("tests/fixtures/basic_project/mkdocs_plugin_genfiles.yml", tmp_path)
706706
setup_commit_history(testproject_path)
707707

708708
result = build_docs_setup(testproject_path)
709-
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}"
709+
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"
710710

711711
page_with_tag = testproject_path / "site/foo/index.html"
712712
contents = page_with_tag.read_text(encoding="utf8")

0 commit comments

Comments
 (0)