11# Default Python version to use for tests
2- PYTHON =python3.6
2+ PYTHON =python3.8
33PYTHON_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.
11- VERSION =0.1.5b4
11+ VERSION =0.1.5b3
1212SHELL: = /bin/bash
1313
14+ LONG_TESTS =false
15+
1416# Select this to have anaconda installed for you.
1517CONDA =./anaconda3
1618# CONDA=/opt/anaconda3
9597 make $(CONDA)/envs/$(PYTHON) PYTHON=$(PYTHON)
9698endif
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
106110pythonw =$(PYTHON )
107111
@@ -118,28 +122,34 @@ ifeq ($(UNAME_S),Darwin)
118122 pythonw=$(subst bin/$(PYTHON),bin/pythonw,$(a))
119123endif
120124
121- # 'python setup.py develop' creates symlinks in system package directory.
122125repository-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.
136146repository-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
145155repository-test-plots-other :
@@ -228,7 +238,7 @@ version-tag:
228238# Install package in local directory (symlinks made to local dir)
229239install-local :
230240# python setup.py -e .
231- source ~/.bashrc; $(CONDA_ACTIVATE) $(PYTHON); pip install --editable .
241+ $(CONDA_ACTIVATE) $(PYTHON); pip install --editable .
232242
233243install :
234244 pip install ' hapiclient==$(VERSION)' --index-url $(URL ) /simple
0 commit comments