-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Added sphinx docs and github workflow to build gh-pages Reviewed By: HapeMask Differential Revision: D63498319 fbshipit-source-id: 401aabb6dc1624a26c2c9231ab2a1e6b98458190
- Loading branch information
1 parent
6ee7229
commit b6e471d
Showing
28 changed files
with
882 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Doc Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_docs_job: | ||
runs-on: ubuntu-latest | ||
# Grant write permission here so that the doc can be pushed to gh-pages branch | ||
permissions: | ||
contents: write | ||
strategy: | ||
matrix: | ||
python-version: [3.10] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Dependencies | ||
run: | | ||
echo `python3 --version` | ||
sudo apt-get install -y python-setuptools | ||
sudo apt-get install -y python3-sphinx | ||
sudo apt-get install -y pandoc | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install setuptools | ||
python3 -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu | ||
id: build | ||
- name: Build the docset | ||
run: | | ||
cd docs | ||
pip install -r requirements.txt | ||
make html | ||
- name: Get output time | ||
run: echo "The time was ${{ steps.build.outputs.time }}" | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@releases/v3 | ||
with: | ||
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: ./docs/build/html # The folder the action should deploy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
recursive-include src/ *.h *.cpp *.cu *.cuh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
SPHINXOPTS ?= | ||
SPHINXAPIDOC ?= sphinx-apidoc | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
autodoc: | ||
@$(SPHINXAPIDOC) -o "$(SOURCEDIR)" "../drtk" $(SPHINXOPTS) $(O) | ||
|
||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
sphinx | ||
sphinx_markdown_builder | ||
sphinx-panels | ||
sphinxcontrib-katex | ||
pydata_sphinx_theme | ||
accessible-pygments | ||
myst_parser | ||
sphinx_design | ||
nbsphinx | ||
ipython |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#rtd-footer-container { | ||
margin-top: 0px !important; | ||
margin-bottom: 0px !important; | ||
} | ||
|
||
.sig-name { | ||
font-size: 1.0em; | ||
color: var(--pst-color-inline-code); | ||
} | ||
|
||
article.bd-article .function dt.sig { | ||
position: relative; | ||
background: var(--sig_nkg); | ||
padding: 0.8rem; | ||
border-left: 3px solid #ee4c2c; | ||
word-wrap: break-word; | ||
padding-right: 100px; | ||
font-weight: 400; | ||
font-size: 0.9em; | ||
font-family: IBMPlexMono,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New", monospace, var(--pst-font-family-monospace-system); | ||
} | ||
|
||
html[data-theme="dark"] { | ||
--sig_nkg: #2b2b2b; | ||
--pst-color-inline-code: #e16969; | ||
--pst-color-surface: #2b2b2b; | ||
} | ||
|
||
html[data-theme="light"] { | ||
--sig_nkg: #f2f2f2; | ||
--pst-color-inline-code: #912525; | ||
--pst-color-surface: #f2f2f2; | ||
} | ||
|
||
html { | ||
--pst-color-inline-code: #912525; | ||
--pst-font-size-icon: 2.0rem; | ||
--bs-nav-link-font-size: 1.5rem; | ||
--pst-color-surface: #f2f2f2; | ||
} | ||
|
||
a.headerlink { | ||
font-size: 1.0em; | ||
} | ||
|
||
ul.bd-breadcrumbs { | ||
font-size: 1.5rem; | ||
li.breadcrumb-item { | ||
&:not(.breadcrumb-home)::before { | ||
font-size: 1.5rem; | ||
} | ||
} | ||
} | ||
|
||
.navbar-brand { | ||
font-size: 2.5em; | ||
} | ||
.bd-main .bd-content .bd-article-container { | ||
max-width: 80em; | ||
} | ||
.bd-page-width { | ||
max-width: 96rem; | ||
} | ||
|
||
.bd-sidebar-primary { | ||
width: 16rem; | ||
} | ||
|
||
p.bd-links__title { | ||
visibility: collapse; | ||
} |
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
drtk.edge_grad_estimator | ||
======================== | ||
|
||
.. automodule:: drtk.edge_grad_estimator | ||
:no-index: | ||
|
||
.. currentmodule:: drtk | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
edge_grad_estimator | ||
edge_grad_estimator_ref | ||
|
||
.. autofunction:: edge_grad_estimator | ||
|
||
.. autofunction:: edge_grad_estimator_ref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.. currentmodule:: drtk.utils | ||
|
||
Geometry utils | ||
============== | ||
.. automodule:: drtk.utils.geometry | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
face_info | ||
vert_binormals | ||
vert_normals | ||
|
||
.. autofunction:: face_info | ||
.. autofunction:: vert_binormals | ||
.. autofunction:: vert_normals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
drtk.grid_scatter | ||
================= | ||
|
||
.. automodule:: drtk.grid_scatter | ||
:no-index: | ||
|
||
.. currentmodule:: drtk | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
grid_scatter | ||
grid_scatter_ref | ||
|
||
.. autofunction:: grid_scatter | ||
|
||
.. autofunction:: grid_scatter_ref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
:github_url: https://github.com/facebookresearch/DRTK | ||
|
||
DRTK API | ||
=================================== | ||
|
||
DRTK is a PyTorch library that provides functionality for differentiable rasterization. | ||
|
||
The package consists of five main modules: | ||
|
||
* :doc:`transform` | ||
* :doc:`rasterize` | ||
* :doc:`render` | ||
* :doc:`interpolate` | ||
* :doc:`edge_grad_estimator` | ||
|
||
|
||
.. toctree:: | ||
:glob: | ||
:maxdepth: 3 | ||
:caption: Main API | ||
|
||
transform | ||
rasterize | ||
render | ||
interpolate | ||
edge_grad_estimator | ||
mipmap_grid_sample | ||
grid_scatter | ||
msi | ||
|
||
|
||
.. toctree:: | ||
:glob: | ||
:maxdepth: 3 | ||
:caption: Utils | ||
|
||
projection | ||
geometry | ||
indexing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. currentmodule:: drtk.utils | ||
|
||
Indexing utils | ||
============== | ||
.. automodule:: drtk.utils.indexing | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
index | ||
|
||
.. autofunction:: index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
drtk.interpolate | ||
================ | ||
|
||
.. automodule:: drtk.interpolate | ||
:no-index: | ||
|
||
.. currentmodule:: drtk | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
interpolate | ||
interpolate_ref | ||
|
||
.. autofunction:: interpolate | ||
|
||
.. autofunction:: interpolate_ref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
drtk.mipmap_grid_sample | ||
======================= | ||
|
||
.. automodule:: drtk.mipmap_grid_sample | ||
:no-index: | ||
|
||
.. currentmodule:: drtk | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
mipmap_grid_sample | ||
mipmap_grid_sample_ref | ||
|
||
.. autofunction:: mipmap_grid_sample | ||
|
||
.. autofunction:: mipmap_grid_sample_ref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
drtk.msi | ||
======== | ||
|
||
.. automodule:: drtk.msi | ||
:no-index: | ||
|
||
.. currentmodule:: drtk | ||
|
||
.. .. autosummary:: | ||
.. :nosignatures: | ||
.. | ||
.. msi | ||
.. autofunction:: msi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.. currentmodule:: drtk.utils | ||
|
||
Projection functions | ||
==================== | ||
.. automodule:: drtk.utils.projection | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
project_points | ||
project_points_grad | ||
|
||
.. autofunction:: project_points | ||
.. autofunction:: project_points_grad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
drtk.rasterize | ||
============== | ||
|
||
.. automodule:: drtk.rasterize | ||
:no-index: | ||
|
||
.. currentmodule:: drtk | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
rasterize | ||
rasterize_with_depth | ||
|
||
.. autofunction:: rasterize | ||
|
||
.. autofunction:: rasterize_with_depth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
drtk.render | ||
============ | ||
|
||
.. automodule:: drtk.render | ||
:no-index: | ||
|
||
.. currentmodule:: drtk | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
render | ||
render_ref | ||
|
||
.. autofunction:: render | ||
|
||
.. autofunction:: render_ref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
drtk.transform | ||
============== | ||
|
||
.. automodule:: drtk.transform | ||
:no-index: | ||
|
||
.. currentmodule:: drtk | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
transform | ||
transform_with_v_cam | ||
|
||
.. autofunction:: transform | ||
|
||
.. autofunction:: transform_with_v_cam |
Oops, something went wrong.