Skip to content

Commit

Permalink
Fix documentation pages
Browse files Browse the repository at this point in the history
  • Loading branch information
fabcor-maxiv committed Sep 22, 2023
1 parent 9cc9e9e commit 6c3addc
Show file tree
Hide file tree
Showing 19 changed files with 90 additions and 70 deletions.
6 changes: 0 additions & 6 deletions docs/source/Beamline.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/Collection.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/Queue.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/Sample.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/SampleCentring.rst

This file was deleted.

30 changes: 17 additions & 13 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import shlex
import datetime
# TODO import os
# TODO import sys

import mxcube3

mxcube3.build_server_and_config(argv=[])

# 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.
# sys.path.insert(0, os.path.abspath('.'))
sys.path.append(os.path.abspath("../../"))
sys.path.append(os.path.abspath("../../mxcube3/"))
sys.path.append(os.path.abspath("../../mxcube3/HardwareObjects"))
sys.path.append(os.path.abspath("../../mxcube3/HardwareRepository"))
# TODO sys.path.append(os.path.abspath("../../"))
# TODO sys.path.append(os.path.abspath("../../mxcube3/"))
# TODO sys.path.append(os.path.abspath("../../mxcube3/HardwareObjects"))
# TODO sys.path.append(os.path.abspath("../../mxcube3/HardwareRepository"))

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

Expand Down Expand Up @@ -55,12 +59,12 @@
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = "index"
master_doc = "contents"

# General information about the project.
project = u"MXCuBE3"
copyright = u"2015, MXCuBE Collaboration"
author = u"MXCuBE Collaboration"
project = "MXCuBE web"
copyright = f"{datetime.datetime.today().year}, MXCuBE Collaboration"
author = "MXCuBE Collaboration"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -76,7 +80,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down Expand Up @@ -149,7 +153,7 @@
# 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"]
# html_static_path = ["_static"]

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down
12 changes: 12 additions & 0 deletions docs/source/contents.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#################
Table of contents
#################

Contents:

.. toctree::
:glob:

*
dev/index
rest-api/index
8 changes: 8 additions & 0 deletions docs/source/dev/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#######################
Developer documentation
#######################

.. toctree::
:glob:

*
10 changes: 2 additions & 8 deletions docs/source/Login.rst → docs/source/dev/login.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*****
Login
=====
*****

MXCuBE web sessions are meant to expire when there is no activity,
as opposed to a typical web session that expires when the browser is closed.
Expand All @@ -23,10 +24,3 @@ Every time the *refresh* endpoint is called,
the browser session cookie is refreshed,
meaning its expiration timestamp is pushed back in the future
for as much as the value stored in ``PERMANENT_SESSION_LIFETIME``.


Login API
---------

.. autoflask:: mxcube3.routes.Login:mxcube
:endpoints: login, signout, loginInfo, get_initial_state, proposal_samples
20 changes: 3 additions & 17 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
.. MXCuBE3 documentation master file, created by
sphinx-quickstart on Tue Nov 10 16:07:35 2015.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to MXCuBE3's documentation!
===================================

Contents:

.. toctree::
:maxdepth: 2

SampleCentring
Queue
Login

##########
MXCuBE web
##########
5 changes: 5 additions & 0 deletions docs/source/rest-api/beamline.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Beamline REST API
=================

.. autoflask:: mxcube3:server.flask
:blueprints: beamline
5 changes: 5 additions & 0 deletions docs/source/rest-api/detector.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Detector REST API
=================

.. autoflask:: mxcube3:server.flask
:blueprints: detector
5 changes: 5 additions & 0 deletions docs/source/rest-api/diffractometer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Diffractometer REST API
=======================

.. autoflask:: mxcube3:server.flask
:blueprints: diffractometer
8 changes: 8 additions & 0 deletions docs/source/rest-api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
########
REST API
########

.. toctree::
:glob:

*
5 changes: 5 additions & 0 deletions docs/source/rest-api/lims.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
LIMS REST API
=============

.. autoflask:: mxcube3:server.flask
:blueprints: lims
5 changes: 5 additions & 0 deletions docs/source/rest-api/login.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Login REST API
==============

.. autoflask:: mxcube3:server.flask
:blueprints: login
5 changes: 5 additions & 0 deletions docs/source/rest-api/queue.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Queue REST API
==============

.. autoflask:: mxcube3:server.flask
:blueprints: queue
5 changes: 5 additions & 0 deletions docs/source/rest-api/remote-access.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Remote access REST API
======================

.. autoflask:: mxcube3:server.flask
:blueprints: remote_access
5 changes: 5 additions & 0 deletions docs/source/rest-api/sample-view.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Sample view REST API
====================

.. autoflask:: mxcube3:server.flask
:blueprints: sampleview

0 comments on commit 6c3addc

Please sign in to comment.