From 350d806d3cc2267604475320a4841274c1b53bc6 Mon Sep 17 00:00:00 2001 From: Raphael Hagen Date: Sun, 17 Mar 2024 14:03:43 -0600 Subject: [PATCH] lint + doc.yml & readthedocs.yml --- .readthedocs.yml | 23 +++++++++++++++++++++++ ci/doc.yml | 15 +++++++++++++++ pyproject.toml | 14 -------------- virtualizarr/__init__.py | 6 ++---- 4 files changed, 40 insertions(+), 18 deletions(-) create mode 100644 .readthedocs.yml create mode 100644 ci/doc.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..08a0fa94 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,23 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-20.04 + tools: + python: "mambaforge-4.10" + +# Build documentation in the doc/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Optionally declare the Python requirements required to build your docs +conda: + environment: ci/doc.yml +python: + install: + - method: pip + path: . diff --git a/ci/doc.yml b/ci/doc.yml new file mode 100644 index 00000000..075d2cfd --- /dev/null +++ b/ci/doc.yml @@ -0,0 +1,15 @@ +name: virtualizarr-docs +channels: + - conda-forge + - nodefaults +dependencies: + - python>=3.9 + - "sphinx" + - "pydata_sphinx_theme" + - "sphinx-autodoc-typehints" + - "sphinx_copybutton" + - "sphinx_togglebutton" + - "sphinx_design" + - "myst_nb" + - pip: + - -e .. diff --git a/pyproject.toml b/pyproject.toml index 1d3c0719..6a45df11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,6 @@ dynamic = ["version"] dependencies = [ "xarray", "kerchunk", - "ujson", "pydantic", "packaging", ] @@ -35,22 +34,9 @@ test = [ "pytest", ] -docs = [ - "sphinx", - "pydata_sphinx_theme", - "sphinx-autodoc-typehints", - "sphinx_copybutton", - "sphinx_togglebutton", - "sphinx_design", - "myst_nb" -] -[project.optional-dependencies] -test = [ - "pytest" -] [project.urls] Home = "https://github.com/TomNicholas/VirtualiZarr" diff --git a/virtualizarr/__init__.py b/virtualizarr/__init__.py index 790ff02c..485fd87e 100644 --- a/virtualizarr/__init__.py +++ b/virtualizarr/__init__.py @@ -1,5 +1,3 @@ from .manifests import ManifestArray # type: ignore # noqa -from .xarray import ( # type: ignore # noqa - VirtualiZarrDatasetAccessor, - open_dataset_via_kerchunk, -) +from .xarray import VirtualiZarrDatasetAccessor # type: ignore # noqa +from .xarray import open_dataset_via_kerchunk # noqa: F401