Skip to content

Commit

Permalink
documentation using sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
dom-inic committed Nov 4, 2024
1 parent e9087ab commit 32e5a5c
Show file tree
Hide file tree
Showing 9 changed files with 230 additions and 1 deletion.
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
6 changes: 6 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@



.. toctree::
:maxdepth: 4

28 changes: 28 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'conshareapiv3.0'
copyright = '2024, dominic'
author = 'dominic'
release = 'v3'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []

templates_path = ['_templates']
exclude_patterns = []



# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
20 changes: 20 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. conshareapiv3.0 documentation master file, created by
sphinx-quickstart on Mon Nov 4 18:09:46 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to conshareapiv3.0 documentation
=============================


**conshareapiv3** version 3 of conshareapi

Add your content using ``reStructuredText`` syntax. See the
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
documentation for details.


.. toctree::
:maxdepth: 2
:caption: Contents:

2 changes: 1 addition & 1 deletion feed/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_user(self, obj):

def get_original_feed(self, obj):
original = obj.refeed
if original != None:
if original is not None:
serializer = FeedSerializer(original, many=False)
return serializer.data
else:
Expand Down
57 changes: 57 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

alabaster==0.7.16
asgiref==3.4.1
babel==2.16.0
backports.zoneinfo==0.2.1
certifi==2021.10.8
charset-normalizer==2.0.9
coreapi==2.3.3
coreschema==0.0.4
# Django
Django==4.0
django-ckeditor==6.2.0
django-cors-headers==3.10.1
django-countries==7.3.2
django-heroku==0.0.0
django-js-asset==1.2.2
djangorestframework==3.13.0
djangorestframework-simplejwt==5.0.0

dnspython==2.1.0
docutils==0.21.2
email-validator==1.1.3
exceptiongroup==1.2.0
gunicorn==20.1.0
idna==3.3
imagesize==1.4.1
importlib_metadata==8.5.0
iniconfig==2.0.0
itypes==1.2.0
Jinja2==3.1.4
MarkupSafe==2.0.1
packaging==24.0
Pillow==8.4.0
pluggy==1.4.0
psycopg2-binary==2.9.9
Pygments==2.18.0
PyJWT==2.3.0
pytest==8.1.1
python-dotenv==1.0.1
pytz==2021.3
requests==2.32.3
sentry-sdk==1.5.1
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
sqlparse==0.4.2
tomli==2.0.1
typing_extensions==4.1.1
uritemplate==4.1.1
urllib3==1.26.7
whitenoise==5.3.0
zipp==3.20.2
58 changes: 58 additions & 0 deletions requirements/local.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
-r production.txt

alabaster==0.7.16
asgiref==3.4.1
babel==2.16.0
backports.zoneinfo==0.2.1
certifi==2021.10.8
charset-normalizer==2.0.9
coreapi==2.3.3
coreschema==0.0.4
dj-database-url==0.5.0
Django==4.0
django-ckeditor==6.2.0
django-cors-headers==3.10.1
django-countries==7.3.2
django-heroku==0.0.0
django-js-asset==1.2.2
django-storages==1.12.3
djangorestframework==3.13.0
djangorestframework-simplejwt==5.0.0
dnspython==2.1.0
docutils==0.21.2
email-validator==1.1.3
exceptiongroup==1.2.0
gunicorn==20.1.0
idna==3.3
imagesize==1.4.1
importlib_metadata==8.5.0
iniconfig==2.0.0
itypes==1.2.0
Jinja2==3.1.4
MarkupSafe==2.0.1
packaging==24.0
Pillow==8.4.0
pluggy==1.4.0
psycopg2-binary==2.9.9
Pygments==2.18.0
PyJWT==2.3.0
pytest==8.1.1
python-dotenv==1.0.1
pytz==2021.3
requests==2.32.3
sentry-sdk==1.5.1
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
sqlparse==0.4.2
tomli==2.0.1
typing_extensions==4.1.1
uritemplate==4.1.1
urllib3==1.26.7
whitenoise==5.3.0
zipp==3.20.2
5 changes: 5 additions & 0 deletions requirements/production.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-r base.txt

django-storages==1.12.3
whitenoise==5.3.0
sentry-sdk==1.5.1

0 comments on commit 32e5a5c

Please sign in to comment.