Skip to content

Commit

Permalink
Merge pull request #24 from jhamman/prep-for-v0.1-release
Browse files Browse the repository at this point in the history
doc updates for 0.1 release
  • Loading branch information
Joe Hamman authored Jul 29, 2021
2 parents 22084f9 + 613f72d commit d4be52d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
7 changes: 4 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

print('python exec:', sys.executable)
print('sys.path:', sys.path)
print('xbatcher.version:', xbatcher.version)
print('xbatcher.version:', xbatcher.__version__)


# -- General configuration ------------------------------------------------
Expand All @@ -50,6 +50,7 @@
'IPython.sphinxext.ipython_directive',
'IPython.sphinxext.ipython_console_highlighting',
'sphinx_autosummary_accessors',
'sphinx_copybutton',
]

# never execute notebooks: avoids lots of expensive imports on rtd
Expand Down Expand Up @@ -98,9 +99,9 @@ def setup(app):
# built documents.
#
# The short X.Y version.
version = '0.1'
version = xbatcher.__version__
# The full version, including alpha/beta/rc tags.
release = '0.1'
release = xbatcher.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
5 changes: 5 additions & 0 deletions doc/environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: xbatcher
channels:
- conda-forge
- nodefaults
dependencies:
- python=3.7
- dask
Expand All @@ -11,4 +14,6 @@ dependencies:
- pytest
- sphinx
- sphinx-autosummary-accessors
- sphinx-copybutton
- xarray
- pip
11 changes: 9 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ such as Keras_.
Installation
------------

No package yet. Install from git:
Xbatcher can be installed from PyPI as::

pip install git+https://github.com/rabernat/xbatcher.git
pip install xbatcher

Or via Conda as::

conda install -c conda-forge xbatcher

Or from source as::

pip install git+https://github.com/pangeo-data/xbatcher.git

Basic Usage
-----------
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ select = B,C,E,F,W,T4,B9

[isort]
known_first_party=xbatcher
known_third_party=numpy,pytest,setuptools,sphinx_autosummary_accessors,xarray
known_third_party=numpy,pkg_resources,pytest,setuptools,sphinx_autosummary_accessors,xarray
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from setuptools import find_packages, setup

VERSION = '0.1.0'
DISTNAME = 'xbatcher'
LICENSE = 'Apache'
AUTHOR = 'xbatcher Developers'
Expand Down Expand Up @@ -39,7 +38,6 @@

setup(
name=DISTNAME,
version=VERSION,
license=LICENSE,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
Expand All @@ -50,4 +48,9 @@
install_requires=install_requires,
url=URL,
packages=find_packages(),
use_scm_version={
'version_scheme': 'post-release',
'local_scheme': 'dirty-tag',
},
setup_requires=['setuptools_scm', 'setuptools>=30.3.0'],
)
8 changes: 8 additions & 0 deletions xbatcher/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
from pkg_resources import DistributionNotFound, get_distribution

from .accessors import BatchAccessor # noqa: F401
from .generators import BatchGenerator # noqa: F401

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound: # noqa: F401; pragma: no cover
# package is not installed
pass

0 comments on commit d4be52d

Please sign in to comment.