Skip to content

Commit

Permalink
Merge pull request #12 from Dr-Blank/documents
Browse files Browse the repository at this point in the history
Documents for project
  • Loading branch information
Dr-Blank authored Nov 9, 2023
2 parents 149ba00 + 4b4f571 commit 04d8e49
Show file tree
Hide file tree
Showing 9 changed files with 520 additions and 1 deletion.
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 = .
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)
28 changes: 28 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 = 'lrclibapi'
copyright = '2023, Dr-Blank'
author = 'Dr-Blank'
release = '0.0.1'

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

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

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 = 'sphinx_rtd_theme'
html_static_path = ['_static']
13 changes: 13 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. lrclib documentation master file, created by
sphinx-quickstart on Wed Nov 8 19:58:15 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to lrclib's documentation!
==================================

.. toctree::
:maxdepth: 2
:caption: Contents:

lrclib
45 changes: 45 additions & 0 deletions docs/lrclib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
lrclib package
==============

Submodules
----------

lrclib.api module
-----------------

.. automodule:: lrclib.api
:members:
:undoc-members:
:show-inheritance:

lrclib.cryptographic\_challenge\_solver module
----------------------------------------------

.. automodule:: lrclib.cryptographic_challenge_solver
:members:
:undoc-members:
:show-inheritance:

lrclib.exceptions module
------------------------

.. automodule:: lrclib.exceptions
:members:
:undoc-members:
:show-inheritance:

lrclib.models module
--------------------

.. automodule:: lrclib.models
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: lrclib
:members:
:undoc-members:
:show-inheritance:
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO ON

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
7 changes: 7 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
lrclib
======

.. toctree::
:maxdepth: 4

lrclib
351 changes: 350 additions & 1 deletion poetry.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ types-requests = "^2.31.0"




[tool.poetry.group.docs.dependencies]
sphinx = "^6"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
18 changes: 18 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Docs:
# https://docs.readthedocs.io/en/stable/config-file/v2.html
# https://docs.readthedocs.io/en/stable/build-customization.html
#
version: 2

build:
os: ubuntu-20.04
tools:
python: "3.11"
jobs:
post_install:
- pip install poetry
- poetry config virtualenvs.create false
- poetry install --with docs

sphinx:
configuration: docs/conf.py

0 comments on commit 04d8e49

Please sign in to comment.