diff --git a/.gitignore b/.gitignore index 3adb92105636297e565207db72ef336bc5571d42..2745a91a9a63125ae015827c82d66829b157cdb3 100644 --- a/.gitignore +++ b/.gitignore @@ -81,7 +81,8 @@ instance/ .scrapy # Sphinx documentation -docs/_build/ +docs/build/ +/public # PyBuilder target/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e3a1d192d4bd156464f883203b87d334422f3244..6fc114c3a8e64334cc0d2b37d33c36f2b0229386 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,8 @@ cache: stages: - setup_and_format - lint # Does not modify code - - auto_commit + - deploy_docs + - auto_commit # Job 1: Install ${PROJECT} and its dependencies install_project: @@ -122,6 +123,28 @@ run_pylint: # - when: manual # allow_failure: true # Allow manual trigger to not fail overall pipeline if desired + + +# Job 6: Create documentation +# This defines a job named 'pages'. GitLab recognizes this special name +# and knows that its purpose is to deploy a website to GitLab Pages. +pages: + stage: deploy_docs + + # Commands to run before the main script. Perfect for installing dependencies. + before_script: + - pip install -r docs/requirements.txt + script: + - sphinx-apidoc -o docs/source noctua + - sphinx-build -b html docs/source public + artifacts: + paths: + - . # Pass the modified workspace + # - public + # rules: + # - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + +# Job 7: commit in branch commit_formatted_code: stage: auto_commit tags: @@ -148,4 +171,3 @@ commit_formatted_code: - Pipeline ID: $CI_PIPELINE_ID - [skip ci]" - git push --force https://davide.ricci:$GITLAB_TOKEN@www.ict.inaf.it/gitlab/davide.ricci/software-di-controllo.git ${FORMATTED_BRANCH_NAME} - diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d0c3cbf1020d5c292abdedf27627c6abe25e2293 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..747ffb7b3033659bdd2d1e6eae41ecb00358a45e --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..82133027c9eb6dd3ff20c82704ecf25650e474f5 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx +sphinx_rtd_theme diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..f3b7e9102ce6c29561627b402f5b93da2db4cbed --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,38 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +import os +import sys +# If your code is in the root directory or a 'src' directory +sys.path.insert(0, os.path.abspath('../../noctua')) + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'Noctua' +copyright = '2025, Davide Ricci' +author = 'Davide Ricci' +release = '0.1' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + 'sphinx.ext.autodoc', # Core library to pull in documentation from docstrings + 'sphinx.ext.napoleon', # Support for NumPy and Google style docstrings + 'sphinx.ext.viewcode', # Add links to highlighted source code +] + +templates_path = ['_templates'] +exclude_patterns = [] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +#html_theme = 'alabaster' +html_theme = 'sphinx_rtd_theme' +html_static_path = ['_static'] diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..5a4c5ad9234e2b21ca2d31a61e633444c2063946 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,18 @@ +.. Noctua documentation master file, created by + sphinx-quickstart on Wed Jun 18 18:01:00 2025. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Noctua documentation +==================== + +Add your content using ``reStructuredText`` syntax. See the +`reStructuredText `_ +documentation for details. + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + modules diff --git a/docs/source/modules.rst b/docs/source/modules.rst new file mode 100644 index 0000000000000000000000000000000000000000..01024eea756212010450dda977eac20351ddd226 --- /dev/null +++ b/docs/source/modules.rst @@ -0,0 +1,7 @@ +noctua +====== + +.. toctree:: + :maxdepth: 4 + + noctua diff --git a/docs/source/noctua.config.rst b/docs/source/noctua.config.rst new file mode 100644 index 0000000000000000000000000000000000000000..546f108423d369f2f64bec1af079fe7c2d3ecf54 --- /dev/null +++ b/docs/source/noctua.config.rst @@ -0,0 +1,21 @@ +noctua.config package +===================== + +Submodules +---------- + +noctua.config.constants module +------------------------------ + +.. automodule:: noctua.config.constants + :members: + :show-inheritance: + :undoc-members: + +Module contents +--------------- + +.. automodule:: noctua.config + :members: + :show-inheritance: + :undoc-members: diff --git a/docs/source/noctua.devices.rst b/docs/source/noctua.devices.rst new file mode 100644 index 0000000000000000000000000000000000000000..f97b1cb320763a2639b37fa72f73bb689bcc3853 --- /dev/null +++ b/docs/source/noctua.devices.rst @@ -0,0 +1,85 @@ +noctua.devices package +====================== + +Submodules +---------- + +noctua.devices.alpaca module +---------------------------- + +.. automodule:: noctua.devices.alpaca + :members: + :show-inheritance: + :undoc-members: + +noctua.devices.astelco module +----------------------------- + +.. automodule:: noctua.devices.astelco + :members: + :show-inheritance: + :undoc-members: + +noctua.devices.basedevice module +-------------------------------- + +.. automodule:: noctua.devices.basedevice + :members: + :show-inheritance: + :undoc-members: + +noctua.devices.domotics module +------------------------------ + +.. automodule:: noctua.devices.domotics + :members: + :show-inheritance: + :undoc-members: + +noctua.devices.ipcam module +--------------------------- + +.. automodule:: noctua.devices.ipcam + :members: + :show-inheritance: + :undoc-members: + +noctua.devices.meteo module +--------------------------- + +.. automodule:: noctua.devices.meteo + :members: + :show-inheritance: + :undoc-members: + +noctua.devices.siemens module +----------------------------- + +.. automodule:: noctua.devices.siemens + :members: + :show-inheritance: + :undoc-members: + +noctua.devices.stx module +------------------------- + +.. automodule:: noctua.devices.stx + :members: + :show-inheritance: + :undoc-members: + +noctua.devices.stx2 module +-------------------------- + +.. automodule:: noctua.devices.stx2 + :members: + :show-inheritance: + :undoc-members: + +Module contents +--------------- + +.. automodule:: noctua.devices + :members: + :show-inheritance: + :undoc-members: diff --git a/docs/source/noctua.rst b/docs/source/noctua.rst new file mode 100644 index 0000000000000000000000000000000000000000..5e574ab1109f738b6c7a54f58d9ac137b2d397e2 --- /dev/null +++ b/docs/source/noctua.rst @@ -0,0 +1,32 @@ +noctua package +============== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + noctua.config + noctua.devices + noctua.templates + noctua.utils + +Submodules +---------- + +noctua.sequencer module +----------------------- + +.. automodule:: noctua.sequencer + :members: + :show-inheritance: + :undoc-members: + +Module contents +--------------- + +.. automodule:: noctua + :members: + :show-inheritance: + :undoc-members: diff --git a/docs/source/noctua.templates.rst b/docs/source/noctua.templates.rst new file mode 100644 index 0000000000000000000000000000000000000000..fa96d7bbebf07c3c3b13c8e064f553c3fe303903 --- /dev/null +++ b/docs/source/noctua.templates.rst @@ -0,0 +1,133 @@ +noctua.templates package +======================== + +Submodules +---------- + +noctua.templates.acquisition module +----------------------------------- + +.. automodule:: noctua.templates.acquisition + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.basetemplate module +------------------------------------ + +.. automodule:: noctua.templates.basetemplate + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.bias module +---------------------------- + +.. automodule:: noctua.templates.bias + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.box module +--------------------------- + +.. automodule:: noctua.templates.box + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.fillheader module +---------------------------------- + +.. automodule:: noctua.templates.fillheader + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.flat module +---------------------------- + +.. automodule:: noctua.templates.flat + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.focus module +----------------------------- + +.. automodule:: noctua.templates.focus + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.focus2 module +------------------------------ + +.. automodule:: noctua.templates.focus2 + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.lampsoff module +-------------------------------- + +.. automodule:: noctua.templates.lampsoff + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.observation module +----------------------------------- + +.. automodule:: noctua.templates.observation + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.skyflat module +------------------------------- + +.. automodule:: noctua.templates.skyflat + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.testlamp module +-------------------------------- + +.. automodule:: noctua.templates.testlamp + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.testoutput module +---------------------------------- + +.. automodule:: noctua.templates.testoutput + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.testpause module +--------------------------------- + +.. automodule:: noctua.templates.testpause + :members: + :show-inheritance: + :undoc-members: + +noctua.templates.testsonoff module +---------------------------------- + +.. automodule:: noctua.templates.testsonoff + :members: + :show-inheritance: + :undoc-members: + +Module contents +--------------- + +.. automodule:: noctua.templates + :members: + :show-inheritance: + :undoc-members: diff --git a/docs/source/noctua.utils.rst b/docs/source/noctua.utils.rst new file mode 100644 index 0000000000000000000000000000000000000000..b34970a5c8ea6f681a2c41951951ad553efb1495 --- /dev/null +++ b/docs/source/noctua.utils.rst @@ -0,0 +1,69 @@ +noctua.utils package +==================== + +Submodules +---------- + +noctua.utils.analysis module +---------------------------- + +.. automodule:: noctua.utils.analysis + :members: + :show-inheritance: + :undoc-members: + +noctua.utils.check module +------------------------- + +.. automodule:: noctua.utils.check + :members: + :show-inheritance: + :undoc-members: + +noctua.utils.coordinates module +------------------------------- + +.. automodule:: noctua.utils.coordinates + :members: + :show-inheritance: + :undoc-members: + +noctua.utils.data\_access\_object module +---------------------------------------- + +.. automodule:: noctua.utils.data_access_object + :members: + :show-inheritance: + :undoc-members: + +noctua.utils.logger module +-------------------------- + +.. automodule:: noctua.utils.logger + :members: + :show-inheritance: + :undoc-members: + +noctua.utils.structure module +----------------------------- + +.. automodule:: noctua.utils.structure + :members: + :show-inheritance: + :undoc-members: + +noctua.utils.url\_stuff module +------------------------------ + +.. automodule:: noctua.utils.url_stuff + :members: + :show-inheritance: + :undoc-members: + +Module contents +--------------- + +.. automodule:: noctua.utils + :members: + :show-inheritance: + :undoc-members: diff --git a/noctua/config/devices.ini b/noctua/config/devices.ini index f2228c21c58634ac0b299099ee9c03a33f852da1..5a5614103e201dd3d5af61ee476b07119bc99a58 100644 --- a/noctua/config/devices.ini +++ b/noctua/config/devices.ini @@ -61,7 +61,7 @@ node = ASCOM_REMOTE outlet = 3 [cam] -module = stx3 +module = stx2 class = Camera node = STX