diff --git a/.cruft.json b/.cruft.json index 1c488ff..5e270c8 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/elixir-cloud-aai/cookiecutter-python", - "commit": "82a9aebbdff819758c94e7607c052a3fa5ba3b18", + "commit": "62a5236346840bffc3000bf642d3576569ba2fa2", "checkout": null, "context": { "cookiecutter": { diff --git a/.github/workflows/code_quality.yaml b/.github/workflows/code_quality.yaml index 8b64d3b..16cd729 100644 --- a/.github/workflows/code_quality.yaml +++ b/.github/workflows/code_quality.yaml @@ -76,8 +76,8 @@ jobs: with: os: ${{ job.os }} python-version: '3.11' - poetry-install-options: "--with=code_quality --with=types --no-root" - poetry-export-options: "--with=code_quality --with=types" + poetry-install-options: "--with=code_quality,types --no-root" + poetry-export-options: "--with=code_quality,types" - name: Check types run: poetry run mypy tus_storagehandler/ diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 9481c13..cf0d51d 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -22,19 +22,18 @@ jobs: with: os: ${{ job.os }} python-version: '3.11' - poetry-install-options: "--with=docs --with=types --no-root" - poetry-export-options: "--with=docs --with=types" + poetry-install-options: "--with=docs,types --no-root" + poetry-export-options: "--with=docs,types" - name: Generate API docs run: | - poetry run sphinx-apidoc -o /tmp/docs tus_storagehandler/ + poetry run sphinx-apidoc -o /tmp/docs/source/pages tus_storagehandler/ - name: Compare docs with main branch id: check_docs_diff run: | - shasum /tmp/docs/* > /tmp/docs.sha - rm -f docs/pages/.gitkeep # Remove placeholder file - shasum docs/pages/* > docs/project_doc.sha + shasum /tmp/docs/source/pages/* > /tmp/docs.sha + shasum docs/source/pages/* > docs/project_doc.sha diff=$(diff /tmp/docs.sha docs/project_doc.sha) || true if [[ -n "$diff" ]]; then echo "::error::API documentation is out of date." diff --git a/Makefile b/Makefile index bb3d0e5..b3d4524 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ fl: format-lint .PHONY: install install: - @echo "\nInstalling all dependencies and with this package +++++++++++++++++++++++++++++++++\n" + @echo "\nInstalling dependencies and with this package +++++++++++++++++++++++++++++++++\n" @poetry install --with=code_quality,docs,misc,test,types,vulnerability .PHONY: i diff --git a/README.md b/README.md index a41b9ff..c571005 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,9 @@ make fl make d ``` +> **Note**: If you make changes to the code, make sure to generate and push the +> documentation using above command, else the documentation check CI will fail. + - Running type checker ```sh diff --git a/docs/pages/modules.rst b/docs/source/pages/modules.rst similarity index 78% rename from docs/pages/modules.rst rename to docs/source/pages/modules.rst index cb090d8..66ab2b8 100644 --- a/docs/pages/modules.rst +++ b/docs/source/pages/modules.rst @@ -1,5 +1,5 @@ tus_storagehandler -=================== +================== .. toctree:: :maxdepth: 4 diff --git a/docs/source/pages/tus_storagehandler.rst b/docs/source/pages/tus_storagehandler.rst new file mode 100644 index 0000000..50d75ff --- /dev/null +++ b/docs/source/pages/tus_storagehandler.rst @@ -0,0 +1,21 @@ +tus\_storagehandler package +=========================== + +Submodules +---------- + +tus\_storagehandler.main module +------------------------------- + +.. automodule:: tus_storagehandler.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: tus_storagehandler + :members: + :undoc-members: + :show-inheritance: diff --git a/pyproject.toml b/pyproject.toml index b167ac0..f85f11e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,6 +72,9 @@ optional = true bandit = ">=1.7.8,<2.0.0" safety = ">=3.2.0,<4.0.0" +[tool.poetry.scripts] +tus_storagehandler = "tus_storagehandler.main:main" + [tool.ruff] indent-width = 4