Skip to content

Commit 3675a7c

Browse files
Add dependencies for building docs (#1613)
1 parent 463e2ce commit 3675a7c

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ CI runtime. For local use, pick a version suitable for you.
5151
mamba create -n fsspec -c conda-forge python=3.9 -y
5252
conda activate fsspec
5353

54-
# Standard dev test install.
55-
pip install -e ".[dev,test]"
54+
# Standard dev install with docs and tests.
55+
pip install -e ".[dev,doc,test]"
5656

5757
# Full tests except for downstream
5858
pip install s3fs
5959
pip uninstall s3fs
60-
pip install -e .[dev,test_full]
60+
pip install -e .[dev,doc,test_full]
6161
pip install s3fs --no-deps
6262
pytest -v
6363

docs/environment.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,3 @@ channels:
33
- defaults
44
dependencies:
55
- python=3.9
6-
- docutils<0.17
7-
- numpydoc
8-
- sphinx_rtd_theme
9-
- yarl
10-
- pip:
11-
- sphinx-design

docs/source/developer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ The following can be used to install ``fsspec`` in development mode
107107
108108
git clone https://github.com/fsspec/filesystem_spec
109109
cd filesystem_spec
110-
pip install -e .
110+
pip install -e .[dev,doc,test]
111111
112-
A number of additional dependencies are required to run tests, see "ci/environment*.yml", as
112+
A number of additional dependencies are required to run tests in full, see "ci/environment*.yml", as
113113
well as Docker. Most implementation-specific tests should skip if their requirements are
114114
not met.
115115

fsspec/implementations/tests/test_reference.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515

1616
def test_simple(server): # noqa: F811
17+
# The dictionary in refs may be dumped with a different separator
18+
# depending on whether json or ujson is imported
19+
from fsspec.implementations.reference import json as json_impl
20+
1721
refs = {
1822
"a": b"data",
1923
"b": (realfile, 0, 5),
@@ -28,12 +32,16 @@ def test_simple(server): # noqa: F811
2832
assert fs.cat("b") == data[:5]
2933
assert fs.cat("c") == data[1 : 1 + 5]
3034
assert fs.cat("d") == b"hello"
31-
assert fs.cat("e") == b'{"key": "value"}'
35+
assert fs.cat("e") == json_impl.dumps(refs["e"]).encode("utf-8")
3236
with fs.open("d", "rt") as f:
3337
assert f.read(2) == "he"
3438

3539

3640
def test_simple_ver1(server): # noqa: F811
41+
# The dictionary in refs may be dumped with a different separator
42+
# depending on whether json or ujson is imported
43+
from fsspec.implementations.reference import json as json_impl
44+
3745
in_data = {
3846
"version": 1,
3947
"refs": {
@@ -51,7 +59,7 @@ def test_simple_ver1(server): # noqa: F811
5159
assert fs.cat("b") == data[:5]
5260
assert fs.cat("c") == data[1 : 1 + 5]
5361
assert fs.cat("d") == b"hello"
54-
assert fs.cat("e") == b'{"key": "value"}'
62+
assert fs.cat("e") == json_impl.dumps(in_data["refs"]["e"]).encode("utf-8")
5563
with fs.open("d", "rt") as f:
5664
assert f.read(2) == "he"
5765

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ adl = ["adlfs"]
2929
arrow = ["pyarrow >= 1"]
3030
dask = ["dask", "distributed"]
3131
dev = ["ruff", "pre-commit"]
32+
doc = ["sphinx", "numpydoc", "sphinx-design", "sphinx-rtd-theme", "yarl"]
3233
dropbox = ["dropbox", "dropboxdrivefs", "requests"]
3334
entrypoints = []
3435
full = [

readthedocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ python:
1212
install:
1313
- method: pip
1414
path: .
15+
extra_requirements:
16+
- doc
1517

1618
sphinx:
1719
configuration: docs/source/conf.py

0 commit comments

Comments
 (0)