From a4b71acc3b5623c1f47086163c78ca763962aeb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Martins=20Filho?= Date: Sun, 8 Dec 2024 22:32:14 -0300 Subject: [PATCH] update documentation with .rst --- .github/workflows/documentation.yml | 25 ------------------------- docs/Makefile | 28 ++++++++++++++++++++++++++++ docs/Project.toml | 4 ---- docs/conf.py | 17 +++++++++++++++++ docs/index.md | 6 ------ docs/index.rst | 18 ++++++++++++++++++ docs/make.jl | 11 ----------- docs/source/api.rst | 26 ++++++++++++++++++++++++++ docs/source/guide.rst | 6 ++++++ docs/src/api.md | 0 docs/src/guide.md | 0 11 files changed, 95 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/documentation.yml create mode 100644 docs/Makefile delete mode 100644 docs/Project.toml create mode 100644 docs/conf.py delete mode 100644 docs/index.md create mode 100644 docs/index.rst delete mode 100644 docs/make.jl create mode 100644 docs/source/api.rst create mode 100644 docs/source/guide.rst delete mode 100644 docs/src/api.md delete mode 100644 docs/src/guide.md diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index acbb1ca..0000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Build Documentation - -on: - push: - branches: - - main - -jobs: - build-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Julia - uses: julia-actions/setup-julia@v1 - with: - version: '1.8' - - - name: Install dependencies - run: | - julia --project=docs -e 'using Pkg; Pkg.instantiate()' - - - name: Build documentation - run: | - julia --project=docs docs/make.jl diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..35af93b --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,28 @@ +# Makefile for Sphinx documentation +# Adapted for Stressify.jl + +# Diretório de saída (build) +BUILDDIR = build + +# Comandos padrão +.PHONY: help clean html latexpdf + +help: + @echo "Makefile para documentação do Stressify.jl" + @echo "" + @echo "Opções disponíveis:" + @echo " make clean - Remove arquivos de build" + @echo " make html - Gera a documentação em HTML" + @echo " make latexpdf - Gera a documentação em PDF usando LaTeX" + @echo "" + +clean: + @echo "Limpando arquivos de build..." + rm -rf $(BUILDDIR)/* + +html: + @echo "Gerando documentação em HTML..." + sphinx-build -b html source $(BUILDDIR)/html + +latexpdf: + @echo "Gerand diff --git a/docs/Project.toml b/docs/Project.toml deleted file mode 100644 index 13fef71..0000000 --- a/docs/Project.toml +++ /dev/null @@ -1,4 +0,0 @@ -name = "StressifyDocs" -version = "0.1.0" -[deps] -Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..6a5c54d --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,17 @@ +# Configuration file for the Sphinx documentation builder. + +# -- Project information ----------------------------------------------------- +project = 'Stressify.jl' +copyright = '2024, JFilhoGN' +author = '@jfilhogn' + +# -- General configuration --------------------------------------------------- +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] + +# Paths for templates +templates_path = ['_templates'] +exclude_patterns = [] + +# -- Options for HTML output ------------------------------------------------- +html_theme = 'sphinx_rtd_theme' +html_static_path = ['_static'] diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index d8115c5..0000000 --- a/docs/index.md +++ /dev/null @@ -1,6 +0,0 @@ -# Stressify.jl - -Welcome to the **Stressify.jl** documentation! - -- **Guide**: Learn how to use Stressify.jl effectively. -- **API Reference**: Explore all public functions and modules. \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..754562b --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,18 @@ +Welcome to Stressify.jl's documentation! +======================================== + +Contents: + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + guide + api + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/make.jl b/docs/make.jl deleted file mode 100644 index 6e97cb5..0000000 --- a/docs/make.jl +++ /dev/null @@ -1,11 +0,0 @@ -using Documenter -using Stressify - -makedocs( - sitename = "Stressify.jl", - pages = [ - "Home" => "index.md", - "Guide" => "src/guide.md", - "API" => "src/api.md" - ] -) \ No newline at end of file diff --git a/docs/source/api.rst b/docs/source/api.rst new file mode 100644 index 0000000..10e04c8 --- /dev/null +++ b/docs/source/api.rst @@ -0,0 +1,26 @@ +.. _api: + +API Reference +============= + +This section provides detailed documentation of the Stressify.jl API. + +Functions +--------- + +.. function:: run_test(endpoint::String; payload::String, method::String, headers::Dict) + + Run a performance test against the specified API. + + :param endpoint: The API endpoint to test. + :param payload: The JSON payload to send with the request. + :param method: The HTTP method (e.g., "GET", "POST"). + :param headers: A dictionary of headers to include in the request. + :returns: A dictionary containing the test results. + +.. function:: generate_report(results::Dict) + + Generate a detailed report from test results. + + :param results: The results dictionary from a test run. + :returns: A JSON string representing the report. diff --git a/docs/source/guide.rst b/docs/source/guide.rst new file mode 100644 index 0000000..6e55fdf --- /dev/null +++ b/docs/source/guide.rst @@ -0,0 +1,6 @@ +.. _guide: + +User Guide +========== + +Welcome to the **Stressify.jl** User Guide. This document will walk you through the basic steps of using Stressify for performance testing. \ No newline at end of file diff --git a/docs/src/api.md b/docs/src/api.md deleted file mode 100644 index e69de29..0000000 diff --git a/docs/src/guide.md b/docs/src/guide.md deleted file mode 100644 index e69de29..0000000