Skip to content

Commit 1391406

Browse files
authored
[DE-7207] Fix sphinx doc build errors and warnings (#453)
* Remove deprecated pkg_resources package * Remove unsupported doc configs * Fix Explicit markup ends without a blank line warning * Fix toctree contains reference to nonexisting document warning * Fix title too short warning * Cleanup sphynx doc syntax * Lint fixes * Lint fixes * Lint fix * Isort fixes * Use package that's compatible with older python versions * Update poetry.lock * Isort * Remove deprecated poetry.dev-dependencies section
1 parent 878ca05 commit 1391406

20 files changed

+1037
-400
lines changed

.pylintrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
[tool.pylint.MESSAGE_CONTROL]
22
disable=
3-
bad-continuation,
43
no-else-return,
54
no-name-in-module,
65
too-few-public-methods,
76
line-too-long,
87
duplicate-code,
98
import-error,
109
unused-argument,
11-
no-self-use,
1210
import-outside-toplevel,
1311
too-many-instance-attributes,
1412
no-member,
@@ -19,6 +17,7 @@ disable=
1917
C0111,
2018
C0103,
2119
R0904,
20+
R0201,
2221
wrong-import-position
2322

2423
[tool.pylint.REPORTS]

docs/_templates/python/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{% endif %}
55
{{ obj.name }}
6-
=============
6+
{{ "=" * obj.name|length }}
77

88
.. py:module:: {{ obj.name }}
99

docs/conf.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import os
1414
import sys
1515

16-
import pkg_resources
16+
from importlib_metadata import version as get_version
1717

1818
sys.path.insert(0, os.path.abspath("../../"))
1919

@@ -26,7 +26,7 @@
2626

2727

2828
# The full version, including alpha/beta/rc tags
29-
release = "v" + str(pkg_resources.get_distribution("scale-nucleus").version)
29+
release = "v" + get_version("scale-nucleus")
3030

3131

3232
# -- General configuration ---------------------------------------------------
@@ -68,11 +68,6 @@
6868
html_favicon = "favicon.ico"
6969

7070
html_logo = "nucleus-logo.svg"
71-
html_theme_options = {
72-
"logo_only": True,
73-
"display_version": True,
74-
}
75-
7671

7772
# -- autogen configuration ---------------------------------------------------
7873
autoapi_type = "python"

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Scale Nucleus helps you:
1313
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.
1414

1515
.. _installation:
16+
1617
Installation
1718
------------
1819

@@ -24,6 +25,7 @@ To use Nucleus, first install it using `pip`:
2425
2526
2627
.. _api:
28+
2729
Sections
2830
--------
2931

nucleus/__init__.py

Lines changed: 139 additions & 114 deletions
Large diffs are not rendered by default.

nucleus/async_job.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ def result_urls(self, wait_for_completion=True) -> List[str]:
182182
Returns:
183183
A list of signed Scale URLs which contain batches of embeddings.
184184
185-
The files contain a JSON array of embedding records with the following schema:
185+
The files contain a JSON array of embedding records with the
186+
following schema::
187+
186188
[{
187189
"reference_id": str,
188190
"embedding_vector": List[float]

0 commit comments

Comments
 (0)