Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
44 changes: 44 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy A+ Documentation

on:
push:
branches:
- master # or the branch you want to trigger the deployment

jobs:
build-and-deploy:
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10' # specify your Python version

- name: Install dependencies
run: |
sudo apt-get install libxml2-dev libxslt-dev
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install -r requirements_testing.txt
pip install sphinx sphinx-rtd-theme

- name: Set environment variables
run: echo "BASE_URL=http://localhost:8000/" >> $GITHUB_ENV

- name: Build documentation
env:
APLUS_BASE_URL: ${{ env.BASE_URL }}
run: |
sphinx-build -b html docs/source docs/build/_build/html

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/_build/html
force_orphan: true
10 changes: 5 additions & 5 deletions authorization/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class RemoteAuthenticationView(RemoteAuthenticator, APIView):
Relevant payload fields:

- exp: expiration time. If present, either a NumericDate integer, or a string
in ISO calendar format (expire at) or HH:MM:SS format (expire in)
in ISO calendar format (expire at) or HH:MM:SS format (expire in)
- turl/taud: taud is the public key of the target service (with whom this token
is supposed to be used), alternatively, one can give turl which is the target's
alias or URL known by A+.
is supposed to be used), alternatively, one can give turl which is the target's
alias or URL known by A+.
- permissions: list of permissions to be included.
See [AUTH.md](https://github.com/apluslms/a-plus/blob/master/doc/AUTH.md#permission-claims).
For example, [["instance", 1, {"id": 5}]] where "5" is the id of the course instance.
See [AUTH.md](https://github.com/apluslms/a-plus/blob/master/doc/AUTH.md#permission-claims).
For example, [["instance", 1, {"id": 5}]] where "5" is the id of the course instance.

GET assumes the payload is sent as a part of a JWT token.

Expand Down
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
21 changes: 21 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
api package
===========

Submodules
----------

api.urls\_v2 module
-------------------

.. automodule:: api.urls_v2
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: api
:members:
:undoc-members:
:show-inheritance:
10 changes: 10 additions & 0 deletions docs/source/aplus.api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
aplus.api package
=================

Module contents
---------------

.. automodule:: aplus.api
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/source/aplus.en.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
aplus.en package
================

Submodules
----------

aplus.en.formats module
-----------------------

.. automodule:: aplus.en.formats
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: aplus.en
:members:
:undoc-members:
:show-inheritance:
21 changes: 21 additions & 0 deletions docs/source/aplus.fi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
aplus.fi package
================

Submodules
----------

aplus.fi.formats module
-----------------------

.. automodule:: aplus.fi.formats
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: aplus.fi
:members:
:undoc-members:
:show-inheritance:
71 changes: 71 additions & 0 deletions docs/source/aplus.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
aplus package
=============

Subpackages
-----------

.. toctree::
:maxdepth: 4

aplus.api
aplus.en
aplus.fi

Submodules
----------

aplus.celery module
-------------------

.. automodule:: aplus.celery
:members:
:undoc-members:
:show-inheritance:

aplus.local\_settings module
----------------------------

.. automodule:: aplus.local_settings
:members:
:undoc-members:
:show-inheritance:

aplus.settings module
---------------------

.. automodule:: aplus.settings
:members:
:undoc-members:
:show-inheritance:

aplus.urls module
-----------------

.. automodule:: aplus.urls
:members:
:undoc-members:
:show-inheritance:

aplus.views module
------------------

.. automodule:: aplus.views
:members:
:undoc-members:
:show-inheritance:

aplus.wsgi module
-----------------

.. automodule:: aplus.wsgi
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: aplus
:members:
:undoc-members:
:show-inheritance:
45 changes: 45 additions & 0 deletions docs/source/apps.migrations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
apps.migrations package
=======================

Submodules
----------

apps.migrations.0001\_initial module
------------------------------------

.. automodule:: apps.migrations.0001_initial
:members:
:undoc-members:
:show-inheritance:

apps.migrations.0002\_auto\_20150527\_1004 module
-------------------------------------------------

.. automodule:: apps.migrations.0002_auto_20150527_1004
:members:
:undoc-members:
:show-inheritance:

apps.migrations.0003\_auto\_20210701\_1730 module
-------------------------------------------------

.. automodule:: apps.migrations.0003_auto_20210701_1730
:members:
:undoc-members:
:show-inheritance:

apps.migrations.0004\_auto\_20210812\_1536 module
-------------------------------------------------

.. automodule:: apps.migrations.0004_auto_20210812_1536
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: apps.migrations
:members:
:undoc-members:
:show-inheritance:
70 changes: 70 additions & 0 deletions docs/source/apps.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
apps package
============

Subpackages
-----------

.. toctree::
:maxdepth: 4

apps.migrations
apps.templatetags

Submodules
----------

apps.admin module
-----------------

.. automodule:: apps.admin
:members:
:undoc-members:
:show-inheritance:

apps.app\_renderers module
--------------------------

.. automodule:: apps.app_renderers
:members:
:undoc-members:
:show-inheritance:

apps.models module
------------------

.. automodule:: apps.models
:members:
:undoc-members:
:show-inheritance:

apps.tests module
-----------------

.. automodule:: apps.tests
:members:
:undoc-members:
:show-inheritance:

apps.urls module
----------------

.. automodule:: apps.urls
:members:
:undoc-members:
:show-inheritance:

apps.views module
-----------------

.. automodule:: apps.views
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: apps
:members:
:undoc-members:
:show-inheritance:
Loading
Loading