Skip to content

Commit

Permalink
Add dependencies for building docs (#1613)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLight1337 committed May 30, 2024
1 parent 463e2ce commit 3675a7c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ CI runtime. For local use, pick a version suitable for you.
mamba create -n fsspec -c conda-forge python=3.9 -y
conda activate fsspec

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

# Full tests except for downstream
pip install s3fs
pip uninstall s3fs
pip install -e .[dev,test_full]
pip install -e .[dev,doc,test_full]
pip install s3fs --no-deps
pytest -v

Expand Down
6 changes: 0 additions & 6 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@ channels:
- defaults
dependencies:
- python=3.9
- docutils<0.17
- numpydoc
- sphinx_rtd_theme
- yarl
- pip:
- sphinx-design
4 changes: 2 additions & 2 deletions docs/source/developer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ The following can be used to install ``fsspec`` in development mode
git clone https://github.com/fsspec/filesystem_spec
cd filesystem_spec
pip install -e .
pip install -e .[dev,doc,test]
A number of additional dependencies are required to run tests, see "ci/environment*.yml", as
A number of additional dependencies are required to run tests in full, see "ci/environment*.yml", as
well as Docker. Most implementation-specific tests should skip if their requirements are
not met.

Expand Down
12 changes: 10 additions & 2 deletions fsspec/implementations/tests/test_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@


def test_simple(server): # noqa: F811
# The dictionary in refs may be dumped with a different separator
# depending on whether json or ujson is imported
from fsspec.implementations.reference import json as json_impl

refs = {
"a": b"data",
"b": (realfile, 0, 5),
Expand All @@ -28,12 +32,16 @@ def test_simple(server): # noqa: F811
assert fs.cat("b") == data[:5]
assert fs.cat("c") == data[1 : 1 + 5]
assert fs.cat("d") == b"hello"
assert fs.cat("e") == b'{"key": "value"}'
assert fs.cat("e") == json_impl.dumps(refs["e"]).encode("utf-8")
with fs.open("d", "rt") as f:
assert f.read(2) == "he"


def test_simple_ver1(server): # noqa: F811
# The dictionary in refs may be dumped with a different separator
# depending on whether json or ujson is imported
from fsspec.implementations.reference import json as json_impl

in_data = {
"version": 1,
"refs": {
Expand All @@ -51,7 +59,7 @@ def test_simple_ver1(server): # noqa: F811
assert fs.cat("b") == data[:5]
assert fs.cat("c") == data[1 : 1 + 5]
assert fs.cat("d") == b"hello"
assert fs.cat("e") == b'{"key": "value"}'
assert fs.cat("e") == json_impl.dumps(in_data["refs"]["e"]).encode("utf-8")
with fs.open("d", "rt") as f:
assert f.read(2) == "he"

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ adl = ["adlfs"]
arrow = ["pyarrow >= 1"]
dask = ["dask", "distributed"]
dev = ["ruff", "pre-commit"]
doc = ["sphinx", "numpydoc", "sphinx-design", "sphinx-rtd-theme", "yarl"]
dropbox = ["dropbox", "dropboxdrivefs", "requests"]
entrypoints = []
full = [
Expand Down
2 changes: 2 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ python:
install:
- method: pip
path: .
extra_requirements:
- doc

sphinx:
configuration: docs/source/conf.py
Expand Down

0 comments on commit 3675a7c

Please sign in to comment.