Skip to content

Commit 19f0ae2

Browse files
author
Joseph Hamman
committed
doc updates for 0.1 release
1 parent 22084f9 commit 19f0ae2

File tree

6 files changed

+28
-8
lines changed

6 files changed

+28
-8
lines changed

doc/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
print('python exec:', sys.executable)
2929
print('sys.path:', sys.path)
30-
print('xbatcher.version:', xbatcher.version)
30+
print('xbatcher.version:', xbatcher.__version__)
3131

3232

3333
# -- General configuration ------------------------------------------------
@@ -50,6 +50,7 @@
5050
'IPython.sphinxext.ipython_directive',
5151
'IPython.sphinxext.ipython_console_highlighting',
5252
'sphinx_autosummary_accessors',
53+
'sphinx_copybutton',
5354
]
5455

5556
# never execute notebooks: avoids lots of expensive imports on rtd
@@ -98,9 +99,9 @@ def setup(app):
9899
# built documents.
99100
#
100101
# The short X.Y version.
101-
version = '0.1'
102+
version = xbatcher.__version__
102103
# The full version, including alpha/beta/rc tags.
103-
release = '0.1'
104+
release = xbatcher.__version__
104105

105106
# The language for content autogenerated by Sphinx. Refer to documentation
106107
# for a list of supported languages.

doc/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ dependencies:
1111
- pytest
1212
- sphinx
1313
- sphinx-autosummary-accessors
14+
- sphinx-copybutton
1415
- xarray

doc/index.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,17 @@ such as Keras_.
1010
Installation
1111
------------
1212

13-
No package yet. Install from git:
13+
Xbatcher can be installed from PyPI as::
1414

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

17+
Or via Conda as::
18+
19+
conda install -c conda-forge xbatcher
20+
21+
Or from source as::
22+
23+
pip install git+https://github.com/pangeo-data/xbatcher.git
1724

1825
Basic Usage
1926
-----------

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ select = B,C,E,F,W,T4,B9
77

88
[isort]
99
known_first_party=xbatcher
10-
known_third_party=numpy,pytest,setuptools,sphinx_autosummary_accessors,xarray
10+
known_third_party=numpy,pkg_resources,pytest,setuptools,sphinx_autosummary_accessors,xarray
1111
multi_line_output=3
1212
include_trailing_comma=True
1313
force_grid_wrap=0

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from setuptools import find_packages, setup
55

6-
VERSION = '0.1.0'
76
DISTNAME = 'xbatcher'
87
LICENSE = 'Apache'
98
AUTHOR = 'xbatcher Developers'
@@ -39,7 +38,6 @@
3938

4039
setup(
4140
name=DISTNAME,
42-
version=VERSION,
4341
license=LICENSE,
4442
author=AUTHOR,
4543
author_email=AUTHOR_EMAIL,
@@ -50,4 +48,9 @@
5048
install_requires=install_requires,
5149
url=URL,
5250
packages=find_packages(),
51+
use_scm_version={
52+
'version_scheme': 'post-release',
53+
'local_scheme': 'dirty-tag',
54+
},
55+
setup_requires=['setuptools_scm', 'setuptools>=30.3.0'],
5356
)

xbatcher/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1+
from pkg_resources import DistributionNotFound, get_distribution
2+
13
from .accessors import BatchAccessor # noqa: F401
24
from .generators import BatchGenerator # noqa: F401
5+
6+
try:
7+
__version__ = get_distribution(__name__).version
8+
except DistributionNotFound: # noqa: F401; pragma: no cover
9+
# package is not installed
10+
pass

0 commit comments

Comments
 (0)