Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding documentation (Sphinx) and docstrings #164

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6a63464
moving old docs
kallewesterling Jun 10, 2024
14e3557
Dropping old docs
kallewesterling Jun 13, 2024
952119c
Adding setup of package to enable `sphinx`
kallewesterling Jun 13, 2024
f342913
Dropping old docs
kallewesterling Jun 13, 2024
f4bee6a
Adding in `sphinx`
kallewesterling Jun 13, 2024
7a9f86a
Adding in requirements
kallewesterling Jun 13, 2024
2654fcf
Updating sphinx config to remove old theme
kallewesterling Jun 13, 2024
033b316
Adding in main bulk of Sphinx files
kallewesterling Jun 13, 2024
0d12f8c
Correcting `README`
kallewesterling Jun 13, 2024
87c8269
Moving unused file that causes issues with documentation
kallewesterling Jun 13, 2024
ff1e2a9
Adding version to `__init__`
kallewesterling Jun 13, 2024
5a1a138
Ensuring new `_mycodes` directory is considered by Django still
kallewesterling Jun 13, 2024
c0308f0
Adding main bulk of docstrings
kallewesterling Jun 13, 2024
8e0a34f
Adding for consistency with other instructions
kallewesterling Jun 13, 2024
114d751
Adding helpful link to settings
kallewesterling Jun 13, 2024
b7ee6d0
Linking up the settings pages in the API documentation
kallewesterling Jun 13, 2024
251ffb0
Adding in comments about 2 models in `seshat_api` app
kallewesterling Jun 13, 2024
1aa3816
Removing placeholder texts from codebase to not confuse with document…
kallewesterling Jun 13, 2024
782d4e9
Adding instructions for how to generate docs
kallewesterling Jun 13, 2024
5ad872b
add sphinx-rtd-theme
edwardchalstrey1 Jun 25, 2024
07098de
Merge pull request #1 from edwardchalstrey1/adding-docstrings
kallewesterling Jun 25, 2024
4eedf06
link to pulumi docs
edwardchalstrey1 Jun 26, 2024
63a01a4
refactor pulumi stack setup doc
edwardchalstrey1 Jun 26, 2024
48c03f0
de-duplicate pulumi stack info
edwardchalstrey1 Jun 26, 2024
21ead0a
improve virtual env suggestion
edwardchalstrey1 Jun 26, 2024
305ecf3
fix rst link
edwardchalstrey1 Jun 26, 2024
caf3f61
remove hint as link wasn't working
edwardchalstrey1 Jun 26, 2024
1a1b90d
update spatialdb link again
edwardchalstrey1 Jun 26, 2024
09d519f
restore hint and fix link by adding underscore
edwardchalstrey1 Jun 26, 2024
7eb62c1
Merge branch 'dev' into adding-docstrings
edwardchalstrey1 Jun 26, 2024
7fbd27a
Merge pull request #2 from edwardchalstrey1/adding-docstrings
kallewesterling Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,8 @@ seshat/staticfiles
pulumi/logs
pulumi/Pulumi.seshat.yaml
scripts
.DS_Store
.DS_Store
*.ipynb

docs/source/api/seshat/
docs/source/api/custom_filters/
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ This repo contains the necessary Django Python code to host the [Seshat](http://

## Developers

Follow the steps on [docs/setup](docs/setup.md).
Follow the instructions available in [docs/source/getting-started/setup/index.rst](docs/source/getting-started/setup/index.rst).

In order to generate the documentation, in the correct environment run the following command:

```bash
pip install -r docs/requirements.txt
cd docs
make html
```

## GitHub process

Expand All @@ -22,4 +30,4 @@ Follow the steps on [docs/setup](docs/setup.md).
On this fork, currently GH actions is set up to run django tests for the following apps when pushing or PR-ing to the `dev` branch:
- Core

See [docs/testing](docs/testing.md) on how to run locally.
See [docs/source/contribute/testing.rst](docs/source/contribute/testing.rst) on how to run locally.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
14 changes: 14 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
docstr-coverage
myst-parser
nbsphinx
pandoc
sphinx
sphinx_togglebutton
sphinx-autoapi
sphinx-autoapi
sphinx-book-theme
sphinx-copybutton
sphinx-tabs
sphinx-togglebutton
sphinxcontrib-napoleon
sphinx-rtd-theme
Loading
Loading