From 648e6bef6cf1a4a0fd3610d533fbcd14652417ed Mon Sep 17 00:00:00 2001 From: airwish Date: Sun, 16 Jun 2024 16:41:36 +0800 Subject: [PATCH] feat: Add "Last Updated Time" for python client docs site (#2921) * feat: Add Last Updated Time * fix group * pin plugin * upgrade lock file --------- Co-authored-by: bossenti --- .github/workflows/python-docs.yml | 2 + streampipes-client-python/mkdocs.yml | 1 + streampipes-client-python/poetry.lock | 70 ++++++++++++++++++++++-- streampipes-client-python/pyproject.toml | 1 + 4 files changed, 69 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-docs.yml b/.github/workflows/python-docs.yml index 224c3a1b19..e558a904cd 100644 --- a/.github/workflows/python-docs.yml +++ b/.github/workflows/python-docs.yml @@ -26,6 +26,8 @@ jobs: steps: - name: clone uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: create working branch & set GitHub config run: | diff --git a/streampipes-client-python/mkdocs.yml b/streampipes-client-python/mkdocs.yml index af18d46ed7..d573d7ba03 100644 --- a/streampipes-client-python/mkdocs.yml +++ b/streampipes-client-python/mkdocs.yml @@ -109,6 +109,7 @@ plugins: - search: lang: - en + - git-revision-date-localized extra_css: - stylesheets/extra.css diff --git a/streampipes-client-python/poetry.lock b/streampipes-client-python/poetry.lock index ba05f11b77..338522eaa1 100644 --- a/streampipes-client-python/poetry.lock +++ b/streampipes-client-python/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "alabaster" @@ -850,6 +850,38 @@ python-dateutil = ">=2.8.1" [package.extras] dev = ["flake8", "markdown", "twine", "wheel"] +[[package]] +name = "gitdb" +version = "4.0.11" +description = "Git Object Database" +optional = false +python-versions = ">=3.7" +files = [ + {file = "gitdb-4.0.11-py3-none-any.whl", hash = "sha256:81a3407ddd2ee8df444cbacea00e2d038e40150acfa3001696fe0dcf1d3adfa4"}, + {file = "gitdb-4.0.11.tar.gz", hash = "sha256:bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b"}, +] + +[package.dependencies] +smmap = ">=3.0.1,<6" + +[[package]] +name = "gitpython" +version = "3.1.43" +description = "GitPython is a Python library used to interact with Git repositories" +optional = false +python-versions = ">=3.7" +files = [ + {file = "GitPython-3.1.43-py3-none-any.whl", hash = "sha256:eec7ec56b92aad751f9912a73404bc02ba212a23adb2c7098ee668417051a1ff"}, + {file = "GitPython-3.1.43.tar.gz", hash = "sha256:35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c"}, +] + +[package.dependencies] +gitdb = ">=4.0.1,<5" + +[package.extras] +doc = ["sphinx (==4.3.2)", "sphinx-autodoc-typehints", "sphinx-rtd-theme", "sphinxcontrib-applehelp (>=1.0.2,<=1.0.4)", "sphinxcontrib-devhelp (==1.0.2)", "sphinxcontrib-htmlhelp (>=2.0.0,<=2.0.1)", "sphinxcontrib-qthelp (==1.0.3)", "sphinxcontrib-serializinghtml (==1.1.5)"] +test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions"] + [[package]] name = "griffe" version = "0.42.0" @@ -1538,6 +1570,23 @@ files = [ [package.dependencies] mkdocs = ">=1.0.3" +[[package]] +name = "mkdocs-git-revision-date-localized-plugin" +version = "1.2.6" +description = "Mkdocs plugin that enables displaying the localized date of the last git modification of a markdown file." +optional = false +python-versions = ">=3.8" +files = [ + {file = "mkdocs_git_revision_date_localized_plugin-1.2.6-py3-none-any.whl", hash = "sha256:f015cb0f3894a39b33447b18e270ae391c4e25275cac5a626e80b243784e2692"}, + {file = "mkdocs_git_revision_date_localized_plugin-1.2.6.tar.gz", hash = "sha256:e432942ce4ee8aa9b9f4493e993dee9d2cc08b3ea2b40a3d6b03ca0f2a4bcaa2"}, +] + +[package.dependencies] +babel = ">=2.7.0" +GitPython = "*" +mkdocs = ">=1.0" +pytz = "*" + [[package]] name = "mkdocs-jupyter" version = "0.24.0" @@ -3002,13 +3051,13 @@ files = [ [[package]] name = "requests" -version = "2.32.1" +version = "2.32.3" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" files = [ - {file = "requests-2.32.1-py3-none-any.whl", hash = "sha256:21ac9465cdf8c1650fe1ecde8a71669a93d4e6f147550483a2967d08396a56a5"}, - {file = "requests-2.32.1.tar.gz", hash = "sha256:eb97e87e64c79e64e5b8ac75cee9dd1f97f49e289b083ee6be96268930725685"}, + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, ] [package.dependencies] @@ -3271,6 +3320,17 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +[[package]] +name = "smmap" +version = "5.0.1" +description = "A pure Python implementation of a sliding window memory map manager" +optional = false +python-versions = ">=3.7" +files = [ + {file = "smmap-5.0.1-py3-none-any.whl", hash = "sha256:e6d8668fa5f93e706934a62d7b4db19c8d9eb8cf2adbb75ef1b675aa332b69da"}, + {file = "smmap-5.0.1.tar.gz", hash = "sha256:dceeb6c0028fdb6734471eb07c0cd2aae706ccaecab45965ee83f11c8d3b1f62"}, +] + [[package]] name = "snowballstemmer" version = "2.2.0" @@ -3815,4 +3875,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">3.8.1,<3.12" -content-hash = "7f2ee902cd8a32cf1ca2c8402407635cdab716518719a4996af61b6b5b403d30" +content-hash = "052de6b78b898f6e1271dcdbfa8fb4d07df8f103b7d502c677d631d49a651ed3" diff --git a/streampipes-client-python/pyproject.toml b/streampipes-client-python/pyproject.toml index 127b9cca8a..6adf376fed 100644 --- a/streampipes-client-python/pyproject.toml +++ b/streampipes-client-python/pyproject.toml @@ -86,6 +86,7 @@ mike = { git = "https://github.com/jimporter/mike.git", rev = "872f72def32f58890 mkdocs = "1.5.2" mkdocs-awesome-pages-plugin = "2.9.0" mkdocs-gen-files = "0.5.0" +mkdocs-git-revision-date-localized-plugin = "1.2.6" mkdocs-jupyter = "0.24.0" mkdocs-literate-nav = "0.6.0" mkdocs-material = "9.3.2"