-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
168 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,7 @@ instance/ | |
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/generated/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.. currentmodule:: xarray | ||
|
||
API reference | ||
============= | ||
This page contains a auto-generated summary of ``pint-xarray``'s API. | ||
|
||
|
||
Dataset | ||
------- | ||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: autosummary/accessor_method.rst | ||
|
||
Dataset.pint.quantify | ||
Dataset.pint.dequantify | ||
Dataset.pint.to_base_units | ||
Dataset.pint.to_system | ||
|
||
DataArray | ||
--------- | ||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: autosummary/accessor_property.rst | ||
|
||
DataArray.pint.magnitude | ||
DataArray.pint.units | ||
DataArray.pint.dimensionality | ||
DataArray.pint.registry | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: autosummary/accessor_method.rst | ||
|
||
DataArray.pint.quantify | ||
DataArray.pint.dequantify | ||
DataArray.pint.to | ||
DataArray.pint.to_base_units |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
# import os | ||
# import sys | ||
# sys.path.insert(0, os.path.abspath('.')) | ||
|
||
# -- Imports ----------------------------------------------------------------- | ||
|
||
import datetime as dt | ||
|
||
import sphinx_autosummary_accessors | ||
|
||
# need to import so accessors get registered | ||
import pintxarray # noqa: F401 | ||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
year = dt.datetime.now().year | ||
project = "pint-xarray" | ||
author = f"{project} developers" | ||
copyright = f"{year}, {author}" | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.autosummary", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.napoleon", | ||
"sphinx_autosummary_accessors", | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ["_templates", sphinx_autosummary_accessors.templates_path] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = "sphinx_rtd_theme" | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
# html_static_path = ["_static"] | ||
|
||
|
||
# -- Extension configuration ------------------------------------------------- | ||
|
||
autosummary_generate = True | ||
autodoc_typehints = "none" | ||
|
||
napoleon_use_param = True | ||
napoleon_use_rtype = True | ||
|
||
# -- Options for intersphinx extension --------------------------------------- | ||
|
||
# Example configuration for intersphinx: refer to the Python standard library. | ||
intersphinx_mapping = {"https://docs.python.org/3/": None} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. accessors documentation master file, created by | ||
sphinx-quickstart on Thu Jul 2 01:49:50 2020. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to accessors's documentation! | ||
===================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pint>=0.13 | ||
xarray>=0.15.1 | ||
sphinx>=3.0 | ||
sphinx_rtd_theme | ||
nbsphinx | ||
git+https://github.com/keewis/sphinx-autosummary-accessors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
try: | ||
from importlib.metadata import version | ||
except ImportError: | ||
from importlib_metadata import version | ||
|
||
from .accessors import PintDataArrayAccessor, PintDatasetAccessor # noqa | ||
|
||
try: | ||
__version__ = version("pint-xarray") | ||
except Exception: | ||
# Local copy or not installed with setuptools. | ||
# Disable minimum version checks on downstream libraries. | ||
__version__ = "999" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
[build-system] | ||
requires = ["setuptools >= 41", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["setuptools >= 42", "wheel", "setuptools_scm[toml] >= 3.4"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
|
||
build: | ||
image: latest | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
- method: pip | ||
path: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
[metadata] | ||
name = pint-xarray | ||
version = 0.0.1 | ||
author = Tom Nicholas | ||
author_email = [email protected] | ||
description = Physical units interface to xarray using Pint | ||
|
@@ -9,7 +8,11 @@ url = https://github.com/TomNicholas/pint-xarray | |
[options] | ||
packages = find: | ||
python_requires = >=3.6 | ||
install_requires = numpy>=1.17.1; xarray>=0.15.1; pint>=0.13 | ||
install_requires = | ||
numpy >= 1.17.1 | ||
xarray >= 0.15.1 | ||
pint >= 0.13 | ||
importlib-metadata; python_version < "3.8" | ||
|
||
[flake8] | ||
ignore = | ||
|