Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeAeich committed Jul 9, 2024
1 parent e1270a1 commit ed97b27
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/elixir-cloud-aai/cookiecutter-python",
"commit": "82a9aebbdff819758c94e7607c052a3fa5ba3b18",
"commit": "62a5236346840bffc3000bf642d3576569ba2fa2",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ jobs:

- 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
awk '{print $1}' /tmp/docs.sha > /tmp/docs_hashes.sha
awk '{print $1}' docs/project_doc.sha > docs/project_doc_hashes.sha
diff=$(diff /tmp/docs.sha docs/project_doc.sha) || true
if [[ -n "$diff" ]]; then
echo "::error::API documentation is out of date."
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/modules.rst → docs/source/pages/modules.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tus_storagehandler
===================
==================

.. toctree::
:maxdepth: 4
Expand Down
21 changes: 21 additions & 0 deletions docs/source/pages/tus_storagehandler.rst
Original file line number Diff line number Diff line change
@@ -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:
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ed97b27

Please sign in to comment.