From 540fa833d54457671c3ddac5c811da90c2e1553b Mon Sep 17 00:00:00 2001 From: Etienne Pallier Date: Thu, 24 Mar 2022 15:26:16 +0100 Subject: [PATCH] New requirements.in file for the Sphinx RST doc (managed via pip-tools) --- Dockerfile | 9 +++++++++ doc/doc_rst/requirements.in | 34 ++++++++++++++++++++++++++++++++++ doc/doc_rst/requirements.txt | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------ docker/PYROS_DOCKER_BUILD.bat | 2 ++ pyros_api.py | 1 + 5 files changed, 167 insertions(+), 30 deletions(-) create mode 100644 doc/doc_rst/requirements.in diff --git a/Dockerfile b/Dockerfile index a7ccaa4..c1a8ddb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -109,6 +109,15 @@ ENV PATH "$PATH:/home/pyros_user/.local/bin" # Installing click on the image to prevent error on the first execution of the installation script RUN pip install --user click +# (EP 23/3/2022) Installing pip-tools for the management of all the requirements*.txt files (python dependencies packages) +# NB : +# - pip-tools generates a smarter and smaller requirements.txt file than the traditional "pip freeze" +# - pip-tools is also better than the traditional "pip install -r" for installing the python packages +# - Unfortunatly, it is difficult to use with several requirements*.txt files as it is the case for this software : pyros + sphinx + guitastro... +# - So we cannot yet use it completely and still have to use the traditional "pip install -r" anyway ... +# - But we can at least use it to generate all the requirements*.txt files in a far better format +RUN pip install --user pip-tools + # Installing packages required for PyROS RUN pip install --user -r ./install/requirements.txt RUN pip install --user -r ./install/requirements_dev.txt diff --git a/doc/doc_rst/requirements.in b/doc/doc_rst/requirements.in new file mode 100644 index 0000000..7da7b26 --- /dev/null +++ b/doc/doc_rst/requirements.in @@ -0,0 +1,34 @@ + +# Main Sphinx package (called "Sphinx" or "sphinx") +Sphinx==4.4.0 + +sphinx-autodoc-typehints==1.17.0 + +# Extensions +autodocsumm==0.2.7 + +# Themes +#alabaster +sphinx-rtd-theme==1.0.0 + +# Builder (pdf) +rst2pdf==0.99 +#rstcheck + +# For pyreverse (included in pylint) +pylint==2.12.2 +graphviz==0.19.1 +pygraphviz==1.9 +sphinx-pyreverse==0.0.17 + +# Graphviz : for generating png diagrams from pyreverse +# Par défaut, seuls deux formats de sortie sont possibles : dot et vcg. +# Il est possible d'augmenter la quantité des formats de sortie avec l'installation de GraphViz +# See https://graphviz.org/download +# - Ubuntu & Debian : +#sudo apt install graphviz +# - Fedora & CentOS : +#sudo yum install graphviz +# - Mac : +#brew install graphviz + diff --git a/doc/doc_rst/requirements.txt b/doc/doc_rst/requirements.txt index 3885b70..f0b00e9 100644 --- a/doc/doc_rst/requirements.txt +++ b/doc/doc_rst/requirements.txt @@ -1,31 +1,122 @@ -Sphinx -sphinx-autodoc-typehints - -# Extensions -autodocsumm - -# Themes -#alabaster -sphinx-rtd-theme - -# Builder (pdf) -rst2pdf -#rstcheck - -# For pyreverse (included in pylint) -pylint -graphviz -pygraphviz -sphinx_pyreverse - -# Graphviz : for generating png diagrams from pyreverse -# Par défaut, seuls deux formats de sortie sont possibles : dot et vcg. -# Il est possible d'augmenter la quantité des formats de sortie avec l'installation de GraphViz -# See https://graphviz.org/download -# - Ubuntu & Debian : -#sudo apt install graphviz -# - Fedora & CentOS : -#sudo yum install graphviz -# - Mac : -#brew install graphviz +# +# This file is autogenerated by pip-compile with python 3.8 +# To update, run: +# +# pip-compile requirements.in +# +alabaster==0.7.12 + # via sphinx +astroid==2.9.3 + # via + # pylint + # sphinx-pyreverse +autodocsumm==0.2.7 + # via -r requirements.in +babel==2.9.1 + # via sphinx +certifi==2021.10.8 + # via requests +charset-normalizer==2.0.12 + # via requests +docutils==0.17.1 + # via + # rst2pdf + # sphinx + # sphinx-pyreverse + # sphinx-rtd-theme +graphviz==0.19.1 + # via -r requirements.in +idna==3.3 + # via requests +imagesize==1.3.0 + # via sphinx +importlib-metadata==4.11.3 + # via + # rst2pdf + # sphinx +isort==5.10.1 + # via pylint +jinja2==3.0.3 + # via + # rst2pdf + # sphinx +lazy-object-proxy==1.7.1 + # via astroid +markupsafe==2.1.1 + # via jinja2 +mccabe==0.6.1 + # via pylint +packaging==21.3 + # via + # rst2pdf + # sphinx +pillow==9.0.1 + # via reportlab +platformdirs==2.5.1 + # via pylint +pygments==2.11.2 + # via + # rst2pdf + # sphinx +pygraphviz==1.9 + # via -r requirements.in +pylint==2.12.2 + # via + # -r requirements.in + # sphinx-pyreverse +pyparsing==3.0.7 + # via packaging +pytz==2022.1 + # via babel +pyyaml==6.0 + # via rst2pdf +reportlab==3.6.8 + # via rst2pdf +requests==2.27.1 + # via sphinx +rst2pdf==0.99 + # via -r requirements.in +smartypants==2.0.1 + # via rst2pdf +snowballstemmer==2.2.0 + # via sphinx +sphinx==4.4.0 + # via + # -r requirements.in + # autodocsumm + # sphinx-autodoc-typehints + # sphinx-pyreverse + # sphinx-rtd-theme +sphinx-autodoc-typehints==1.17.0 + # via -r requirements.in +sphinx-pyreverse==0.0.17 + # via -r requirements.in +sphinx-rtd-theme==1.0.0 + # via -r requirements.in +sphinxcontrib-applehelp==1.0.2 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.0 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx +toml==0.10.2 + # via pylint +typing-extensions==4.1.1 + # via + # astroid + # pylint +urllib3==1.26.9 + # via requests +wrapt==1.13.3 + # via astroid +zipp==3.7.0 + # via importlib-metadata +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/docker/PYROS_DOCKER_BUILD.bat b/docker/PYROS_DOCKER_BUILD.bat index c531dbe..4f27abd 100755 --- a/docker/PYROS_DOCKER_BUILD.bat +++ b/docker/PYROS_DOCKER_BUILD.bat @@ -1,2 +1,4 @@ +#git pull + CURRENT_UID=$(id -u) docker-compose build diff --git a/pyros_api.py b/pyros_api.py index 2fd898a..f0ff158 100755 --- a/pyros_api.py +++ b/pyros_api.py @@ -13,6 +13,7 @@ class PyrosAPI: Request Pyros API with an PyrosUser account linked to the username and password """ BASE_PYROS_URL = "http://localhost:8000/api/" + #BASE_PYROS_URL = "http://pyros.irap.omp.eu/api/" def __init__(self) -> None: """ -- libgit2 0.21.2