From e6f5102f37a107ccadb55c1bae6ffe427ddfba95 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Fri, 24 Nov 2023 16:02:11 +0100 Subject: [PATCH] Use hatch-mkdocs and hatch-pip-compile for docs deps --- .github/workflows/deploy-docs.yml | 4 ++-- docs/requirements.in | 10 ---------- hatch.toml | 10 ++++++++++ .../requirements-docs.txt | 15 ++++++++++++--- 4 files changed, 24 insertions(+), 15 deletions(-) delete mode 100644 docs/requirements.in create mode 100644 hatch.toml rename docs/requirements.txt => requirements/requirements-docs.txt (89%) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 5ddafdb..aca6f92 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -15,9 +15,9 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: '3.x' + python-version: '3.11' - name: Install dependencies - run: pip install --no-deps -r docs/requirements.txt + run: pip install --no-deps -r requirements/requirements-docs.txt - name: Build site run: LINT=true mkdocs build --strict - name: Upload to GitHub Pages diff --git a/docs/requirements.in b/docs/requirements.in deleted file mode 100644 index 72bb69e..0000000 --- a/docs/requirements.in +++ /dev/null @@ -1,10 +0,0 @@ -markdown-callouts>=0.1.0 -mkdocs>=1.5 -mkdocs-code-validator>=0.1.0 -mkdocs-gen-files>=0.3.2 -mkdocs-literate-nav>=0.3.1 -mkdocs-material>=7.1.4 -mkdocs-section-index>=0.3.0 -mkdocstrings>=0.15.0 -mkdocstrings-crystal>=0.3.1 -pymdown-extensions>=8.2 diff --git a/hatch.toml b/hatch.toml new file mode 100644 index 0000000..29c79fb --- /dev/null +++ b/hatch.toml @@ -0,0 +1,10 @@ +[env] +requires = [ + "hatch-mkdocs", + "hatch-pip-compile", +] + +[env.collectors.mkdocs.docs] +[envs.docs] +type = "pip-compile" +pip-compile-hashes = false diff --git a/docs/requirements.txt b/requirements/requirements-docs.txt similarity index 89% rename from docs/requirements.txt rename to requirements/requirements-docs.txt index 2ce37fd..118714b 100644 --- a/docs/requirements.txt +++ b/requirements/requirements-docs.txt @@ -1,9 +1,18 @@ # -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: +# This file is autogenerated by hatch-pip-compile with Python 3.11 # -# pip-compile docs/requirements.in +# - markdown-callouts +# - mkdocs +# - mkdocs-code-validator +# - mkdocs-gen-files +# - mkdocs-literate-nav +# - mkdocs-material +# - mkdocs-section-index +# - mkdocstrings +# - mkdocstrings-crystal +# - pymdown-extensions # + babel==2.13.1 # via mkdocs-material certifi==2023.7.22