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 bf925f1
Show file tree
Hide file tree
Showing 24 changed files with 382 additions and 1,252 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.

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

import sys
import os
import shlex
import datetime

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"))

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

Expand All @@ -35,32 +33,27 @@
# ones.
# extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo']
extensions = [
"sphinxcontrib.httpdomain",
"myst_parser",
"sphinxcontrib.autohttp.flask",
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
]

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

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"
source_suffix = [".rst", ".md"]

# The encoding of source files.
# 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 +69,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 +142,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 All @@ -165,7 +158,13 @@
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
html_sidebars = {
"**": [
"about.html",
"globaltoc.html",
"searchbox.html",
],
}

# Additional templates that should be rendered to pages, maps page names to
# template names.
Expand Down Expand Up @@ -212,7 +211,7 @@
# html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = "MXCuBE3doc"
htmlhelp_basename = "MXCuBE-Web-doc"

# -- Options for LaTeX output ---------------------------------------------

Expand All @@ -233,9 +232,9 @@
latex_documents = [
(
master_doc,
"MXCuBE3.tex",
u"MXCuBE3 Documentation",
u"MXCuBE Collaboration",
"MXCuBE-Web.tex",
"MXCuBE Web Documentation",
"MXCuBE Collaboration",
"manual",
),
]
Expand Down Expand Up @@ -265,7 +264,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "mxcube3", u"MXCuBE3 Documentation", [author], 1)]
man_pages = [(master_doc, "mxcube-web", "MXCuBE web Documentation", [author], 1)]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand All @@ -279,11 +278,11 @@
texinfo_documents = [
(
master_doc,
"MXCuBE3",
u"MXCuBE3 Documentation",
"MXCuBE-web",
"MXCuBE Web Documentation",
author,
"MXCuBE3",
"One line description of project.",
"MXCuBE Web",
"This is the documentation for MXCuBE Web.",
"Miscellaneous",
),
]
Expand Down
13 changes: 13 additions & 0 deletions docs/source/contents.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#################
Table of contents
#################

Contents:

.. toctree::
:glob:
:titlesonly:

*
dev/index
rest-api/index
2 changes: 2 additions & 0 deletions docs/source/dev/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```{include} ../../../CONTRIBUTING.md
```
6 changes: 6 additions & 0 deletions docs/source/dev/dev-env.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
***********************
Development environment
***********************

See instructions to prepare a development environment
on the `MXCuBE Web wiki <https://github.com/mxcube/mxcubeweb/wiki>`_.
9 changes: 9 additions & 0 deletions docs/source/dev/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#######################
Developer documentation
#######################

.. toctree::
:glob:
:titlesonly:

*
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
2 changes: 2 additions & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```{include} ../../README.md
```
17 changes: 0 additions & 17 deletions docs/source/index.rst

This file was deleted.

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

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

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

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

.. toctree::
:glob:
:titlesonly:

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

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

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

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

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

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

0 comments on commit bf925f1

Please sign in to comment.