Skip to content

Commit

Permalink
docs: added sphinx documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
drageelr committed Nov 25, 2022
1 parent 6127584 commit b6c612c
Show file tree
Hide file tree
Showing 15 changed files with 204 additions and 0 deletions.
Binary file removed .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docs/build
dist
*.DS_Store
Binary file removed dist/manim_data_structures-0.1.0-py3-none-any.whl
Binary file not shown.
Binary file removed dist/manim_data_structures-0.1.0.tar.gz
Binary file not shown.
Binary file removed dist/manim_data_structures-0.1.1-py3-none-any.whl
Binary file not shown.
Binary file removed dist/manim_data_structures-0.1.1.tar.gz
Binary file not shown.
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
32 changes: 32 additions & 0 deletions docs/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{ name | escape | underline}}

Qualified name: ``{{ fullname | escape }}``

.. currentmodule:: {{ module }}

.. autoclass:: {{ name }}
:show-inheritance:
:members:

{% block methods %}
{%- if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
:nosignatures:
{% for item in methods if item != '__init__' and item not in inherited_members %}
~{{ name }}.{{ item }}
{%- endfor %}
{%- endif %}
{%- endblock %}

{% block attributes %}
{%- if attributes %}
.. rubric:: {{ _('Attributes') }}

.. autosummary::
{% for item in attributes %}
~{{ name }}.{{ item }}
{%- endfor %}
{%- endif %}
{% endblock %}
43 changes: 43 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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
from pathlib import Path

import manim_data_structures

# -- Path setup --------------------------------------------------------------

sys.path.insert(0, os.path.abspath("."))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Manim Data Structures'
copyright = '2022, Hammad Nasir (aka DrageelR)'
author = 'Hammad Nasir (aka DrageelR)'
release = '0.1.1'

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

extensions = [
'sphinx.ext.duration',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
]

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_static_path = ['_static']
html_title = f'Manim Data Structures v{manim_data_structures.__version__}'
4 changes: 4 additions & 0 deletions docs/source/guides/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Guides
======

TODO: Complete this
43 changes: 43 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.. Manim Data Structures documentation master file, created by
sphinx-quickstart on Fri Nov 25 19:14:42 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Manim Data Structures
=====================

A plugin for Manim Community Edition that provides Manim objects for common data structures.

Installation
------------

Simply execute the following command to install the package:

.. code-block:: console
$ pip install manim-data-structures
Usage
-----

To import the package in your script, add the following import statement:

.. code-block:: python
from manim_data_structures import *
Next Steps
----------

- Visit the `Guides <guides/index>` section to learn how to use the library.
- Also check out the `Reference Manual <reference/index>` to view detailed documentation of the classes.


Index
-----

.. toctree::
:maxdepth: 2

guides/index
reference/index
10 changes: 10 additions & 0 deletions docs/source/reference/arrays.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Arrays
======

.. currentmodule:: manim_data_structures

.. autosummary::
:toctree: generated

~array.MArrayElement
~array.MArray
12 changes: 12 additions & 0 deletions docs/source/reference/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Reference Manual
================

Contains a detailed documentation of all classes in the plugin.

Module Index
------------

.. toctree::
:maxdepth: 2

arrays
2 changes: 2 additions & 0 deletions src/manim_data_structures/array.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contains classes to construct an array."""

from manim import *


Expand Down

0 comments on commit b6c612c

Please sign in to comment.