Skip to content

Commit 8c88f46

Browse files
committed
Closes UNB-2035, UNB-2014, and fixed autosummary vs. numpydoc method generation. Changed enums to classes and created separate pages for model types and task types
1 parent cbc32a7 commit 8c88f46

File tree

9 files changed

+262
-188
lines changed

9 files changed

+262
-188
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1515

1616
* Prevents dataset upload when `label_column_name` is also in `feature_names`.
1717
* Unbox server URL (<https://api.unbox.ai/>).
18+
* Parameter ordering for `add_model`, `add_dataset`, `add_dataframe` for clarity's sake.
1819

1920
### Fixed
2021

docs/_templates/class.rst

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
{% if methods %}
55

66
..
7-
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the
8-
pages.
9-
.. autosummary::
10-
:toctree:
11-
{% for item in all_methods %}
12-
{%- if not item.startswith('_') or item in ['__call__'] %}
13-
{{ name }}.{{ item }}
14-
{%- endif -%}
15-
{%- endfor %}
7+
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
8+
.. autosummary::
9+
:toctree:
10+
{% for item in all_methods %}
11+
{%- if not item.startswith('_') or item in ['__call__'] %}
12+
{{ name }}.{{ item }}
13+
{%- endif -%}
14+
{%- endfor %}
1615
1716
{% endif %}
1817
{% endblock %}
@@ -21,15 +20,14 @@ pages.
2120
{% if attributes %}
2221

2322
..
24-
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the
25-
pages.
26-
.. autosummary::
27-
:toctree:
28-
{% for item in all_attributes %}
29-
{%- if not item.startswith('_') %}
30-
{{ name }}.{{ item }}
31-
{%- endif -%}
32-
{%- endfor %}
23+
HACK -- the point here is that we don't want this to appear in the output, but the autosummary should still generate the pages.
24+
.. autosummary::
25+
:toctree:
26+
{% for item in all_attributes %}
27+
{%- if not item.startswith('_') %}
28+
{{ name }}.{{ item }}
29+
{%- endif -%}
30+
{%- endfor %}
3331
3432
{% endif %}
35-
{% endblock %}
33+
{% endblock %}

docs/source/_static/css/logo.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Need to resize the logo here somehow */
2+
a .navbar-brand {
3+
height: 100px;
4+
}

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134

135135
# Automatically extract typehints when specified and place them in
136136
# descriptions of the relevant function/method.
137-
# autosummary_generate = True
137+
# autosummary_generate = False
138138
autodoc_typehints = "none"
139139

140140
# -- Options for HTMLHelp output ---------------------------------------------
@@ -225,4 +225,4 @@
225225
epub_exclude_files = ["search.html"]
226226

227227

228-
# -- Extension configuration -------------------------------------------------
228+
# -- Extension configuration -------------------------------------------------

docs/source/reference/upload.rst

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,53 @@ Client constructor
99
------------------
1010
.. autosummary::
1111
:toctree: api/
12+
:template: class.rst
1213

1314
UnboxClient
1415

1516
Upload functions
1617
----------------
1718
.. autosummary::
1819
:toctree: api/
20+
:template: class.rst
1921

2022
UnboxClient.add_model
2123
UnboxClient.add_dataset
2224
UnboxClient.add_dataframe
2325

2426

25-
Types
26-
-----
27+
Model types
28+
-----------
2729
.. autosummary::
2830
:toctree: api/
31+
:template: class.rst
2932

30-
TaskType
3133
ModelType
34+
ModelType.fasttext
35+
ModelType.sklearn
36+
ModelType.pytorch
37+
ModelType.tensorflow
38+
ModelType.transformers
39+
ModelType.keras
40+
ModelType.rasa
41+
ModelType.custom
42+
43+
Task types
44+
-----------
45+
.. autosummary::
46+
:toctree: api/
47+
:template: class.rst
48+
49+
TaskType
50+
TaskType.TextClassification
51+
TaskType.TabularClassification
52+
TaskType.TabularRegression
3253

3354
Objects
3455
-------
3556
.. autosummary::
3657
:toctree: api/
58+
:template: class.rst
3759

3860
Model
3961
Dataset

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env python3
22

33
import pathlib
4+
from distutils.util import convert_path
45

56
import pkg_resources
67
from setuptools import find_packages, setup
7-
from distutils.util import convert_path
88

99
with pathlib.Path("requirements.txt").open() as requirements_txt:
1010
install_requires = [
@@ -13,13 +13,13 @@
1313
]
1414

1515
main_ns = {}
16-
ver_path = convert_path('unboxapi/version.py')
16+
ver_path = convert_path("unboxapi/version.py")
1717
with open(ver_path) as ver_file:
1818
exec(ver_file.read(), main_ns)
1919

2020
setup(
2121
name="unboxapi",
22-
version=main_ns['__version__'],
22+
version=main_ns["__version__"],
2323
description="The official Python client library for Unbox, the Testing and Debugging Platform for AI",
2424
url="https://github.com/unboxai/unboxapi-python-client",
2525
author="Unbox",

0 commit comments

Comments
 (0)