Skip to content

Commit

Permalink
Documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysyngsun committed Jan 3, 2022
1 parent c06f9f6 commit 4c70287
Show file tree
Hide file tree
Showing 25 changed files with 1,115 additions and 194 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Documentation
on:
push:
branches:
- main
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
name: Publish Documentation
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install ghp-import
run: pip install ghp-import
- name: Build documentation
run: "./pants docs ::"
- name: Publish Documentation
run: ghp-import --push --force --no-history --no-jekyll dist/sphinx/
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,9 @@ webpack-stats.json

# Celery Beat
celerybeat-schedule

# pants
/.pants.d/
/dist/
/.pids
/.pants.workdir.file_lock*
Empty file added BUILD
Empty file.
6 changes: 6 additions & 0 deletions docs/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


sphinx_docs(
name="sphinx-docs",
source_directory="source"
)
194 changes: 0 additions & 194 deletions docs/configure_open_edx.md

This file was deleted.

25 changes: 25 additions & 0 deletions docs/source/assets/authentication-flow.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
sequenceDiagram
participant MO as MITx Online
participant OE as Open edX

par Create Account in Open edx
MO->>OE: POST /user_api/v1/account/registration/
OE-->>MO: Success
end

par Create Open edX Access Token
Note right of MO: Create in-memory requests session
par Establish an Open edX session
MO->>OE: GET /auth/login/mitxpro-oauth2/?auth_entry=login
OE->>MO: Redirect to GET /oauth2/authorize
MO->>OE: Redirect to GET /auth/complete/mitxpro-oauth2/
end

par Link MITx Online account to Open edX Account
MO->>OE: GET /oauth2/authorize
OE-->>MO: Redirect to GET /login/_private/complete
MO->>OE: POST /oauth2/access_token
OE-->>MO: OAuth access and refresh tokens
end

end
4 changes: 4 additions & 0 deletions docs/source/authentication.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Authentication
==============

.. mermaid:: assets/authentication-flow.mm
54 changes: 54 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'MITx Online'
copyright = '2021, OL Engineering'
author = 'OL Engineering'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinxcontrib.mermaid',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_permalinks_icon = '§'
html_theme = 'insipid'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
7 changes: 7 additions & 0 deletions docs/source/configuration/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Configuration
=============

.. toctree::
:maxdepth: 2

open_edx
Loading

0 comments on commit 4c70287

Please sign in to comment.