Commit 64e524eb authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed app/api refactor changes in docs, docker-compose, api deployment, and other import.

parent 25829697
Pipeline #60553 canceled with stages
in 48 minutes and 34 seconds
API Documentation
=================
API(s) Documentation
====================
Summary
-------
.. qrefflask:: nomad.api:app
.. qrefflask:: nomad.app:app
:undoc-static:
API Details
-----------
API(s) Details
--------------
.. autoflask:: nomad.api:app
.. autoflask:: nomad.app:app
:undoc-static:
......@@ -42,9 +42,9 @@ nomad.coe_repo
--------------
.. automodule:: nomad.coe_repo
nomad.api
nomad.app
---------
.. automodule:: nomad.api
.. automodule:: nomad.app
nomad.cli
------------
......
......@@ -13,20 +13,9 @@
# limitations under the License.
"""
This module comprises the nomad@FAIRDI APIs.
The different APIs are upload, repository (raw data and search), and archive.
There is a separate documentation for the API endpoints from a client perspective.
.. autodata:: app
.. automodule:: nomad.api.app
.. automodule:: nomad.api.auth
.. automodule:: nomad.api.upload
.. automodule:: nomad.api.repo
.. automodule:: nomad.api.archive
.. automodule:: nomad.api.admin
This module comprises the nomad@FAIRDI APIs. Currently there is NOMAD's official api, and
we will soon at the optimade api. The app module also servers documentation, gui, and
alive.
"""
from flask import Flask, Blueprint, jsonify, url_for, abort, request
from flask_restplus import Api
......
......@@ -12,5 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
The official NOMAD API.
There is a separate documentation for the API endpoints from a client perspective.
.. automodule:: nomad.app.api.api
.. automodule:: nomad.app.api.auth
.. automodule:: nomad.app.api.upload
.. automodule:: nomad.app.api.repo
.. automodule:: nomad.app.api.archive
.. automodule:: nomad.app.api.admin
"""
from .api import blueprint
from . import info, auth, admin, upload, repo, archive, raw, mirror
......@@ -15,6 +15,9 @@
from flask import Blueprint
from flask_restplus import Api
"""
The optimade implementation of NOMAD.
"""
blueprint = Blueprint('optimade', __name__)
......
......@@ -17,7 +17,7 @@ This module contains classes that allow to represent the core
nomad data entities :class:`Upload` and :class:`Calc` on a high level of abstraction
independent from their representation in the different modules
:py:mod:`nomad.processing`, :py:mod:`nomad.coe_repo`, :py:mod:`nomad.parsing`,
:py:mod:`nomad.search`, :py:mod:`nomad.api`, :py:mod:`nomad.migration`.
:py:mod:`nomad.search`, :py:mod:`nomad.app`, :py:mod:`nomad.migration`.
It is not about representing every detail, but those parts that are directly involved in
api, processing, migration, mirroring, or other 'infrastructure' operations.
......
......@@ -98,7 +98,7 @@ services:
- mongo
volumes:
- nomad_files:/app/.volumes/fs
command: python -m gunicorn.app.wsgiapp -w 4 --log-config ops/gunicorn.log.conf -b 0.0.0.0:8000 --timeout 300 nomad.api:app
command: python -m gunicorn.app.wsgiapp -w 4 --log-config ops/gunicorn.log.conf -b 0.0.0.0:8000 --timeout 300 nomad.app:app
# nomad gui
gui:
......
......@@ -130,7 +130,7 @@ spec:
name: {{ .Values.api.adminPasswordSecret }}
key: password
{{ end }}
command: ["python", "-m", "gunicorn.app.wsgiapp", "--config", "gunicorn.conf", "--log-config", "gunicorn.log.conf", "-b 0.0.0.0:8000", "nomad.api:app"]
command: ["python", "-m", "gunicorn.app.wsgiapp", "--config", "gunicorn.conf", "--log-config", "gunicorn.log.conf", "-b 0.0.0.0:8000", "nomad.app:app"]
livenessProbe:
httpGet:
path: "{{ .Values.proxy.external.path }}/api/alive"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment