Skip to content

Commit ab4b3f5

Browse files
committed
sphinx skeleton
1 parent 02683eb commit ab4b3f5

20 files changed

+732
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ instance/
7070

7171
# Sphinx documentation
7272
docs/_build/
73+
docs/source/_autosummary/
7374

7475
# PyBuilder
7576
target/
@@ -136,4 +137,4 @@ dmypy.json
136137
poetry.lock
137138

138139
# vscode
139-
.vscode/
140+
.vscode/

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.https://www.sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/_templates/class.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{{ objname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autoclass:: {{ objname }}
6+
:members:
7+
:show-inheritance:
8+
:inherited-members:
9+
10+
{% block methods %}
11+
.. automethod:: __init__
12+
13+
{% if methods %}
14+
.. rubric:: {{ _('Methods') }}
15+
16+
.. autosummary::
17+
{% for item in methods %}
18+
~{{ fullname }}.{{ item }}
19+
{%- endfor %}
20+
{% endif %}
21+
{% endblock %}
22+
23+
{% block attributes %}
24+
{% if attributes %}
25+
.. rubric:: {{ _('Attributes') }}
26+
27+
.. autosummary::
28+
:no-undoc-members:
29+
{% for item in attributes %}
30+
~{{ name }}.{{ item }}
31+
{%- endfor %}
32+
{% endif %}
33+
{% endblock %}

docs/source/_templates/module.rst

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{{ objname | escape | underline}}
2+
3+
.. automodule:: {{ objname }}
4+
5+
{% block attributes %}
6+
{% if attributes %}
7+
.. rubric:: Module Attributes
8+
9+
.. autosummary::
10+
:toctree:
11+
{% for item in attributes %}
12+
{{ item }}
13+
{%- endfor %}
14+
{% endif %}
15+
{% endblock %}
16+
17+
{% block functions %}
18+
{% if functions %}
19+
.. rubric:: {{ _('Functions') }}
20+
21+
.. autosummary::
22+
:toctree:
23+
{% for item in functions %}
24+
{{ item }}
25+
{%- endfor %}
26+
{% endif %}
27+
{% endblock %}
28+
29+
{% block classes %}
30+
{% if classes %}
31+
.. rubric:: {{ _('Classes') }}
32+
33+
.. autosummary::
34+
:toctree:
35+
:template: class.rst
36+
{% for item in classes %}
37+
{{ item }}
38+
{%- endfor %}
39+
{% endif %}
40+
{% endblock %}
41+
42+
{% block exceptions %}
43+
{% if exceptions %}
44+
.. rubric:: {{ _('Exceptions') }}
45+
46+
.. autosummary::
47+
:toctree:
48+
{% for item in exceptions %}
49+
{{ item }}
50+
{%- endfor %}
51+
{% endif %}
52+
{% endblock %}
53+
54+
{% block modules %}
55+
{% if modules %}
56+
.. rubric:: Modules
57+
58+
.. autosummary::
59+
:toctree:
60+
:template: module.rst
61+
:recursive:
62+
{% for item in modules %}
63+
{{ item }}
64+
{%- endfor %}
65+
{% endif %}
66+
{% endblock %}

docs/source/api.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
API
2+
===
3+
4+
.. autosummary::
5+
:toctree: _autosummary
6+
:template: module.rst
7+
:recursive:
8+
9+
nucleus

docs/source/conf.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import sys
15+
sys.path.insert(0, os.path.abspath('../..'))
16+
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = 'Nucleus'
21+
copyright = '2021, Scale'
22+
author = 'Scale'
23+
24+
# The full version, including alpha/beta/rc tags
25+
from nucleus import __version__
26+
release = "v" + str(__version__)
27+
28+
29+
# -- General configuration ---------------------------------------------------
30+
31+
# Add any Sphinx extension module names here, as strings. They can be
32+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33+
# ones.
34+
extensions = [
35+
'sphinx.ext.autodoc',
36+
'sphinx.ext.autosummary',
37+
]
38+
39+
# Add any paths that contain templates here, relative to this directory.
40+
templates_path = ['_templates']
41+
42+
# List of patterns, relative to source directory, that match files and
43+
# directories to ignore when looking for source files.
44+
# This pattern also affects html_static_path and html_extra_path.
45+
exclude_patterns = []
46+
47+
48+
# -- Options for HTML output -------------------------------------------------
49+
50+
# The theme to use for HTML and HTML Help pages. See the documentation for
51+
# a list of builtin themes.
52+
#
53+
html_theme = 'furo'
54+
55+
# Add any paths that contain custom static files (such as style sheets) here,
56+
# relative to this directory. They are copied after the builtin static files,
57+
# so a file named "default.css" will overwrite the builtin "default.css".
58+
html_static_path = ['_static']
59+
60+
autosummary_generate = True
61+
autosummary_imported_members = True

docs/source/index.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.. Nucleus documentation master file, created by
2+
sphinx-quickstart on Mon Oct 18 13:08:57 2021.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to Nucleus's documentation!
7+
===================================
8+
9+
Aggregate metrics in ML are not good enough. To improve production ML, you need to understand their qualitative failure modes, fix them by gathering more data, and curate diverse scenarios.
10+
11+
Scale Nucleus helps you:
12+
13+
* Visualize your data
14+
* Curate interesting slices within your dataset
15+
* Review and manage annotations
16+
* Measure and debug your model performance
17+
18+
Nucleus is a new way—the right way—to develop ML models, helping us move away from the concept of one dataset and towards a paradigm of collections of scenarios.
19+
20+
Check out the :doc:`usage` section for further information, including how to :ref:`install <installation>` the client.
21+
22+
23+
Contents
24+
--------
25+
26+
.. toctree::
27+
:maxdepth: 4
28+
29+
usage
30+
api
31+
32+
Indices and tables
33+
==================
34+
35+
* :ref:`genindex`
36+
* :ref:`modindex`
37+
* :ref:`search`

docs/source/nucleus.annotation.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
nucleus.annotation
2+
==================
3+
4+
.. automodule:: nucleus.annotation
5+
6+
7+
8+
9+
10+
11+
12+
.. rubric:: Functions
13+
14+
.. autosummary::
15+
16+
check_all_mask_paths_remote
17+
dataclass
18+
is_local_path
19+
urlparse
20+
21+
22+
23+
24+
25+
.. rubric:: Classes
26+
27+
.. autosummary::
28+
29+
Annotation
30+
AnnotationTypes
31+
BoxAnnotation
32+
CategoryAnnotation
33+
CuboidAnnotation
34+
Enum
35+
MultiCategoryAnnotation
36+
Point
37+
Point3D
38+
PolygonAnnotation
39+
Segment
40+
SegmentationAnnotation
41+
42+
43+
44+
45+
46+
47+
48+
49+

docs/source/nucleus.autocurate.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
nucleus.autocurate
2+
==================
3+
4+
.. automodule:: nucleus.autocurate
5+
6+
7+
8+
9+
10+
11+
12+
.. rubric:: Functions
13+
14+
.. autosummary::
15+
16+
entropy
17+
18+
19+
20+
21+
22+
.. rubric:: Classes
23+
24+
.. autosummary::
25+
26+
AsyncJob
27+
28+
29+
30+
31+
32+
33+
34+
35+

0 commit comments

Comments
 (0)