Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: create a documentation #6

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -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)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions docs/source/client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. module:: velum

Client
======

.. autoclass:: GatewayClient
:members:
:inherited-members:
37 changes: 37 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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

project = 'velum'
copyright = '2023, Chromosomologist'
author = 'Chromosomologist'
release = '0.2.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx.ext.viewcode',
'sphinx.ext.autodoc'
]

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 = 'furo'
html_theme_options = {
"source_repository": "https://github.com/eludris-community/velum",
"source_branch": "master"
}

html_static_path = ['_static']

20 changes: 20 additions & 0 deletions docs/source/events.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. module:: velum

Events
======

.. autoclass:: ExceptionEvent
:members:
:show-inheritance:

.. autoclass:: ConnectionEvent
:members:
:show-inheritance:

.. autoclass:: DisconnectEvent
:members:
:show-inheritance:

.. autoclass:: MessageCreateEvent
:members:
:show-inheritance:
23 changes: 23 additions & 0 deletions docs/source/exceptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. module:: velum

Exceptions
==========

.. autoclass:: VelumError
:members:

.. autoclass:: GatewayError
:members:
:show-inheritance:

.. autoclass:: GatewayConnectionError
:members:
:show-inheritance:

.. autoclass:: GatewayConnectionClosedError
:members:
:show-inheritance:

.. autoclass:: HTTPError
:members:
:show-inheritance:
2 changes: 2 additions & 0 deletions docs/source/files.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Files
=====
17 changes: 17 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
velum
=====
Velum is an opinionated wrapper for `Eludris <https://eludris.pages.dev>`_. API written in Python, very much inspired by `Hikari <https://github.com/hikari-py/hikari>`_.

API Reference
-------------
Detailed documentation of all the individual objects, functions and classes provided by velum.

.. toctree::
:maxdepth: 2
:caption: API Reference

client.rst
events.rst
exceptions.rst
files.rst
models.rst
7 changes: 7 additions & 0 deletions docs/source/models.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Models
======

<idk>

.. autoclass:: velum.Message
:members:
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ black = "^23.3.0"
slotscheck = "^0.16.1"
ruff = "^0.0.269"
pre-commit = "^2.20.0"
sphinx = "^6.1.3"
sphinx-autobuild = "^2021.3.14"
furo = "^2022.12.7"

[tool.poetry.group.speedups.dependencies]
aiohttp = { extras = ["speedups"], version = "^3.8.3" }
Expand Down