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

Initial setup for documentation #8

Merged
merged 3 commits into from
May 31, 2024
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ __pycache__/
*.so

*.blend
*.swp

.DS_Store

Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Blender-Soft-Arm-Simulation

## How to build documentation

We will provide external link for documentation once the repository is public.
For now, use the following command to build the documentation:
```sh
cd docs
make clean
make html
open build/html/index.html
```

## How setup development environment

We are using `poetry` to maintain the dependency trees for this project. To install `poetry` run the following command:
Expand Down
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)
5 changes: 5 additions & 0 deletions docs/api/geometry.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Geometry
========

.. automodule:: bsr.geometry
:members:
49 changes: 49 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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 os
import sys

sys.path.insert(0, os.path.abspath("../src"))
from bsr import version

project = "Blender SoftRod Tools"
copyright = "2024, Seung Hyun Kim"
author = "Seung Hyun Kim"
release = version

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

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.mathjax",
"sphinx_autodoc_typehints",
"numpydoc",
]


# -- Options for autodoc -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#module-sphinx.ext.autodoc
autodoc_default_flags = [
"members",
"undoc-members",
"private-members",
"special-members",
]
source_suffix = [".rst", ".md"]

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 = "sphinx_rtd_theme"
html_static_path = ["_static"]
27 changes: 27 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.. Blender SoftRod Tools documentation master file, created by
sphinx-quickstart on Fri May 31 02:44:43 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to Blender SoftRod Tools's documentation!
=================================================

Python software for integrating soft-rods visualization into blender for rendering and analysis.

TODO: Description of the project.


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

api/geometry



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
374 changes: 373 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 @@ -43,6 +43,10 @@ isort = {extras = ["colors"], version = "^5.13.2"}
mypy = "^1.10.0"
mypy-extensions = "^1.0.0"
pyupgrade = "^3.15.2"
sphinx = "^7.3.7"
sphinx-rtd-theme = "^2.0.0"
numpydoc = "^1.7.0"
sphinx-autodoc-typehints = "^2.1.0"

[tool.black]
# https://github.com/psf/black
Expand Down
2 changes: 0 additions & 2 deletions src/bsr/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
__doc__ = """Python software for integrating soft-rods visualization into blender for rendering and analysis."""

import sys
from importlib import metadata as importlib_metadata

Expand Down
Loading