From 3a1e0c7ffd1ad0bb023bcb43a2d0d24c0b8fef91 Mon Sep 17 00:00:00 2001 From: Neda Moeini <neda.moeini@geant.org> Date: Fri, 11 Apr 2025 11:14:13 +0200 Subject: [PATCH] Add gitignore file and sphinx docs --- .gitignore | 45 +++++++++++++++++++++++++++++++++ .idea/.gitignore | 53 ++++++--------------------------------- docs/Makefile | 20 +++++++++++++++ docs/conf.py | 30 ++++++++++++++++++++++ docs/index.rst | 17 +++++++++++++ docs/make.bat | 35 ++++++++++++++++++++++++++ docs/mapping_provider.rst | 21 ++++++++++++++++ docs/modules.rst | 7 ++++++ requirements.txt | 3 ++- 9 files changed, 185 insertions(+), 46 deletions(-) create mode 100644 .gitignore create mode 100644 docs/Makefile create mode 100644 docs/conf.py create mode 100644 docs/index.rst create mode 100644 docs/make.bat create mode 100644 docs/mapping_provider.rst create mode 100644 docs/modules.rst diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..abf174d --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +build/ +dist/ +*.egg-info/ + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Virtual environments +venv/ +.env +.venv/ + +# PyInstaller +*.manifest +*.spec + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +coverage.xml +.cache +.pytest_cache/ + +# Sphinx documentation +docs/_build/ + +# Editor / OS junk +.DS_Store +Thumbs.db +.idea/ +.vscode/ +*.swp +*.swo \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore index abf174d..13566b8 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -1,45 +1,8 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -build/ -dist/ -*.egg-info/ - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Virtual environments -venv/ -.env -.venv/ - -# PyInstaller -*.manifest -*.spec - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -coverage.xml -.cache -.pytest_cache/ - -# Sphinx documentation -docs/_build/ - -# Editor / OS junk -.DS_Store -Thumbs.db -.idea/ -.vscode/ -*.swp -*.swo \ No newline at end of file +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d4bb2cb --- /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 = . +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/conf.py b/docs/conf.py new file mode 100644 index 0000000..1e02268 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,30 @@ +# 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 +sys.path.insert(0, os.path.abspath("../mapping_provider")) +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'Mapping Provider' +copyright = '2025, GÉANT' +author = 'GÉANT' +release = '0.1' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = ['sphinx.ext.autodoc'] + +templates_path = ['_templates'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'alabaster' +html_static_path = ['_static'] diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..314d233 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,17 @@ +.. Mapping Provider documentation master file, created by + sphinx-quickstart on Fri Apr 11 11:07:12 2025. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Mapping Provider documentation +============================== + +Add your content using ``reStructuredText`` syntax. See the +`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_ +documentation for details. + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..954237b --- /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=. +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/mapping_provider.rst b/docs/mapping_provider.rst new file mode 100644 index 0000000..cd9a21f --- /dev/null +++ b/docs/mapping_provider.rst @@ -0,0 +1,21 @@ +mapping\_provider package +========================= + +Submodules +---------- + +mapping\_provider.main module +----------------------------- + +.. automodule:: mapping_provider.main + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: mapping_provider + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/modules.rst b/docs/modules.rst new file mode 100644 index 0000000..abfd948 --- /dev/null +++ b/docs/modules.rst @@ -0,0 +1,7 @@ +mapping_provider +================ + +.. toctree:: + :maxdepth: 4 + + mapping_provider diff --git a/requirements.txt b/requirements.txt index 8e0578a..590f2f4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ fastapi -uvicorn[standard] \ No newline at end of file +uvicorn[standard] +sphinx \ No newline at end of file -- GitLab