Skip to content

Commit 4469b5b

Browse files
authored
Merge branch 'master' into travis
2 parents 030dc87 + 25da6f9 commit 4469b5b

20 files changed

+9000
-284
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ os:
88
script:
99
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi
1010
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install -y miniconda3; fi
11-
# - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install -y anaconda3; fi
1211
- make repository-test-data-all

CHANGES.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,7 @@ v0.1.5b1:
5151
2020-07-30 -- Use threadsafe plots
5252
v0.1.5b2:
5353
2020-07-31 -- Handle all NaN timeseries
54-
v0.1.5b3:
54+
v0.1.5b4:
55+
2020-12-11 -- Chunked requests
56+
v0.1.5b5:
57+

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2019 R.S. Weigel
1+
Copyright 2019, 2020 R.S. Weigel
22

33
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
44

Makefile

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
# Default Python version to use for tests
2-
PYTHON=python3.6
2+
PYTHON=python3.8
33
PYTHON_VER=$(subst python,,$(PYTHON))
44

55
# Python versions to test
66
# TODO: Use tox.
7-
PYTHONVERS=python2.7 python3.5 python3.6 python3.7 python3.8
7+
PYTHONVERS=python3.8 python3.7 python3.6 python3.5 python2.7
88

99
# VERSION is updated in "make version-update" step and derived
1010
# from CHANGES.txt. Do not edit.
1111
VERSION=0.1.5b4
1212
SHELL:= /bin/bash
1313

14+
LONG_TESTS=false
15+
1416
# Select this to have anaconda installed for you.
1517
CONDA=./anaconda3
1618
# CONDA=/opt/anaconda3
1719
# CONDA=~/anaconda3
1820

1921
# ifeq ($(shell uname -s),MINGW64_NT-10.0-18362)
2022
ifeq ($(TRAVIS_OS_NAME),windows)
21-
# CONDA=/c/tools/anaconda3
23+
# CONDA=/c/tools/anaconda3
2224
CONDA=/c/tools/miniconda3
2325
endif
2426

@@ -95,13 +97,15 @@ else
9597
make $(CONDA)/envs/$(PYTHON) PYTHON=$(PYTHON)
9698
endif
9799

98-
$(CONDA)/envs/$(PYTHON): /tmp/$(CONDA_PKG)
100+
$(CONDA)/envs/$(PYTHON): ./anaconda3
99101
$(CONDA_ACTIVATE); \
100102
$(CONDA)/bin/conda create -y --name $(PYTHON) python=$(PYTHON_VER)
101103

104+
./anaconda3: /tmp/$(CONDA_PKG)
105+
bash /tmp/$(CONDA_PKG) -b -p $(CONDA)
106+
102107
/tmp/$(CONDA_PKG):
103108
curl https://repo.anaconda.com/miniconda/$(CONDA_PKG) > /tmp/$(CONDA_PKG)
104-
bash /tmp/$(CONDA_PKG) -b -p $(CONDA)
105109

106110
pythonw=$(PYTHON)
107111

@@ -118,28 +122,34 @@ ifeq ($(UNAME_S),Darwin)
118122
pythonw=$(subst bin/$(PYTHON),bin/pythonw,$(a))
119123
endif
120124

121-
# 'python setup.py develop' creates symlinks in system package directory.
122125
repository-test-data:
123126
@make clean
124127

125128
make condaenv PYTHON=$(PYTHON)
126129

127-
#https://stackoverflow.com/questions/30306099/pip-install-editable-vs-python-setup-py-develop
130+
# https://stackoverflow.com/questions/30306099/pip-install-editable-vs-python-setup-py-develop
128131
$(CONDA_ACTIVATE) $(PYTHON); pip install pytest deepdiff; pip install --editable .
129-
#$(CONDA_ACTIVATE) $(PYTHON); $(PYTHON) setup.py develop | grep "Best"
132+
# 'python setup.py develop' creates symlinks in system package directory.
133+
# $(CONDA_ACTIVATE) $(PYTHON); $(PYTHON) setup.py develop | grep "Best"
130134

131-
$(CONDA_ACTIVATE) $(PYTHON); $(pythonw) -m pytest -v -m 'not long' hapiclient/test/test_hapi.py
135+
ifeq (LONG_TESTS,true)
132136
$(CONDA_ACTIVATE) $(PYTHON); $(pythonw) -m pytest -v -m 'long' hapiclient/test/test_hapi.py
137+
else
138+
$(CONDA_ACTIVATE) $(PYTHON); $(pythonw) -m pytest -v -m 'short' hapiclient/test/test_hapi.py
139+
endif
140+
141+
$(CONDA_ACTIVATE) $(PYTHON); $(pythonw) -m pytest -v hapiclient/test/test_chunking.py
133142
$(CONDA_ACTIVATE) $(PYTHON); $(pythonw) -m pytest -v hapiclient/test/test_hapitime2datetime.py
143+
$(CONDA_ACTIVATE) $(PYTHON); $(pythonw) -m pytest -v hapiclient/test/test_hapitime_reformat.py
134144

135145
# These require visual inspection.
136146
repository-test-plots:
137147
@make clean
138148
make condaenv PYTHON=$(PYTHON)
139149
$(CONDA_ACTIVATE) $(PYTHON); $(PYTHON) setup.py develop | grep "Best"
140-
# Run using pythonw instead of python only so plot windows always work
141-
# for programs called from command line. This is needed for
142-
# OS-X, Python 3.5, and matplotlib instaled from pip.
150+
# Run using pythonw instead of python only so plot windows always work
151+
# for programs called from command line. This is needed for
152+
# OS-X, Python 3.5, and matplotlib instaled from pip.
143153
$(CONDA_ACTIVATE) $(PYTHON); $(pythonw) hapi_demo.py
144154

145155
repository-test-plots-other:
@@ -228,7 +238,7 @@ version-tag:
228238
# Install package in local directory (symlinks made to local dir)
229239
install-local:
230240
# python setup.py -e .
231-
source ~/.bashrc; $(CONDA_ACTIVATE) $(PYTHON); pip install --editable .
241+
$(CONDA_ACTIVATE) $(PYTHON); pip install --editable .
232242

233243
install:
234244
pip install 'hapiclient==$(VERSION)' --index-url $(URL)/simple

README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.. image:: https://travis-ci.org/hapi-server/client-python.svg?branch=master
2+
:target: https://travis-ci.org/hapi-server/client-python
3+
14
HAPI client for Python 2/3
25
==============================
36

@@ -41,7 +44,7 @@ Basic Example
4144
Documentation
4245
-------------
4346

44-
Basic usage examples for various HAPI servers are given in `hapi_demo.py <https://github.com/hapi-server/client-python-notebooks/blob/master/hapi_demo.py>`__
47+
Basic usage examples for various HAPI servers are given in `hapi_demo.py <https://github.com/hapi-server/client-python/blob/master/hapi_demo.py>`__
4548

4649
All of the features are extensively demonstrated in the `hapi_demo.ipynb <https://github.com/hapi-server/client-python-notebooks/blob/master/hapi_demo.ipynb>`__ Jupyter Notebook.
4750

hapiclient/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
except:
2222
print('Problem importing Matplotlib. hapiplot function will not work.')
2323

24+
from hapiclient.util import HAPIError
25+
2426
# Allow "from hapiclient import autoplot"
2527
from hapiclient.autoplot.autoplot import autoplot
2628

2729
# Allow "from hapiclient import gallery"
2830
from hapiclient.gallery.gallery import gallery
2931

30-
__version__ = '0.1.5b3'
32+
__version__ = '0.1.5b4'

0 commit comments

Comments
 (0)