From 87fae9a3674f36d8533ebb160938e2fe08c35a82 Mon Sep 17 00:00:00 2001 From: Florencia-97 Date: Wed, 17 Jan 2024 14:20:03 -0300 Subject: [PATCH] Adds basic doc for api --- .gitignore | 3 ++- README.md | 4 ++-- docs/Makefile | 20 ++++++++++++++++++++ docs/api.rst | 11 +++++++++++ docs/conf.py | 32 ++++++++++++++++++++++++++++++++ docs/contributing.rst | 13 +++++++++++++ docs/index.rst | 30 ++++++++++++++++++++++++++++++ docs/make.bat | 35 +++++++++++++++++++++++++++++++++++ 8 files changed, 145 insertions(+), 3 deletions(-) create mode 100644 docs/Makefile create mode 100644 docs/api.rst create mode 100644 docs/conf.py create mode 100644 docs/contributing.rst create mode 100644 docs/index.rst create mode 100644 docs/make.bat diff --git a/.gitignore b/.gitignore index c0ed67f..7fe7631 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ /node_modules # ide -.idea/* \ No newline at end of file +.idea/* +docs/_build/* \ No newline at end of file diff --git a/README.md b/README.md index 4224150..68eb009 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![test workflow](https://github.com/github/docs/actions/workflows/test.yml/badge.svg) +![test workflow](https://github.com/github/docs/actions/workflows/test.yml/badge.svg) [![npm version](https://badge.fury.io/js/@eryxcoop%2Fappyx-comm.svg)](https://badge.fury.io/js/@eryxcoop%2Fappyx-comm) # Appyx-Comm @@ -20,6 +20,6 @@ In order to update npm package a new release must be created. Any new release mu # Work to be done - [x] Deploy library as a package in npm -- [ ] Create sample project to show how the package works +- [ ] Complete documentation - [x] Add ApiClient - [x] Add tests 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/api.rst b/docs/api.rst new file mode 100644 index 0000000..ba31eaa --- /dev/null +++ b/docs/api.rst @@ -0,0 +1,11 @@ + +``Requesters`` +------------- + +Information about the requester. + + +``Responses`` +------------- + +Information about the responses. \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..95473a9 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,32 @@ +# 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 + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +import sphinx_rtd_theme + +project = 'appyx-comm' +copyright = '2024, Eryx' +author = 'Eryx' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ +"sphinx_rtd_theme", +] + + +templates_path = ['_templates'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + +# html_theme = "sphinx_rtd_theme" + +# -- 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/contributing.rst b/docs/contributing.rst new file mode 100644 index 0000000..4fe8807 --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1,13 @@ +Contributing +============ + +To help speed up the review process please ensure the following: + +- The PR addresses an open issue. +- All tests are passing locally with ``npm test``. +- If adding a new feature you also add documentation. + +Developing +---------- + +Code! \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..ab04b93 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,30 @@ +appyx-comm +========= + +.. image:: https://github.com/github/docs/actions/workflows/test.yml/badge.svg + :alt: GitHub Actions - CI + + +.. image:: https://badge.fury.io/js/@eryxcoop%2Fappyx-comm.svg + :target: https://badge.fury.io/js/@eryxcoop%2Fappyx-comm + +Appy-Comm +----- + +Un texto profundo y filosófico sobre la librería. + + +.. toctree:: + :maxdepth: 2 + :caption: Usage + + api + + +.. toctree:: + :maxdepth: 2 + :caption: Developer + + contributing + maintaining + branding \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..32bb245 --- /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