Skip to content

Commit 6517933

Browse files
authored
Merge pull request #1969 from Cadair/figure_hashes
Standardising Python 2.7 and Python 3.5 Figure Tests
2 parents eb3edba + 3c79388 commit 6517933

File tree

5 files changed

+18
-19
lines changed

5 files changed

+18
-19
lines changed

Diff for: .travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ matrix:
5555
env: JOB="Figures 2.7" PYTHON_VERSION=2.7 SETUP_CMD='test --figure' CONDA_DEPENDENCIES='' # conda env is loaded from a separate file
5656

5757
- os: linux
58-
env: JOB="Figures 3.5" PYTHON_VERSION=3.5 SETUP_CMD='test --figure' ASTROPY_VERSION=1.2.1 MATPLOTLIB_VERSION=1.5.3
58+
env: JOB="Figures 3.5" PYTHON_VERSION=3.5 SETUP_CMD='test --figure' CONDA_DEPENDENCIES='' # conda env is loaded from a separate file
5959

6060
- os: linux
6161
env: JOB="Online" PYTHON_VERSION=3.5 SETUP_CMD='test --online --coverage -V'
@@ -68,7 +68,6 @@ matrix:
6868

6969
# allow_failures has to repeat the environment from the matrix above to mark it as such
7070
allow_failures:
71-
- env: JOB="Figures 3.5" PYTHON_VERSION=3.5 SETUP_CMD='test --figure' ASTROPY_VERSION=1.2.1 MATPLOTLIB_VERSION=1.5.3
7271
- env: JOB="Doctest" PYTHON_VERSION=3.5 SETUP_CMD='build_sphinx -b doctest'
7372
- env: JOB="Numpy Dev" PYTHON_VERSION=3.5 SETUP_CMD='test' ASTROPY_VERSION='stable' NUMPY_VERSION='dev'
7473

@@ -80,7 +79,7 @@ install:
8079
before_script:
8180
# Download the sample data for the build of the documentation.
8281
- if [[ $SETUP_CMD == *sphinx* ]]; then python -c "import sunpy.data; sunpy.data.download_sample_data()"; fi
83-
- if [[ $SETUP_CMD == *figure* ]] && [[ $PYTHON_VERSION == 2.7 ]]; then wget https://raw.githubusercontent.com/sunpy/sunpy-figure-tests/master/conda_env.yml; conda env create --file conda_env.yml; source activate sunpy-figure-tests; fi
82+
- if [[ $SETUP_CMD == *figure* ]]; then wget https://raw.githubusercontent.com/sunpy/sunpy-figure-tests/master/conda_env_$PYTHON_VERSION.yml; conda env create --file conda_env_$PYTHON_VERSION.yml; source activate sunpy-figure-tests-$PYTHON_VERSION; fi
8483

8584
script:
8685
- $MAIN_CMD $SETUP_CMD
File renamed without changes.

Diff for: sunpy/tests/figure_hashes_py3.json

-15
This file was deleted.

Diff for: sunpy/tests/figure_hashes_py35.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"sunpy.map.tests.test_mapbase.test_draw_contours_aia": "c16936b44e56444b0764e2e1c9537f8e5593caae5b67cf4f5abf5de2fdb32eb2",
3+
"sunpy.map.tests.test_mapbase.test_peek_aia171": "6a043e91facd93818e0e5c74c958c4f76514c128a9c8378e9d3909b07efcb86f",
4+
"sunpy.map.tests.test_mapbase.test_peek_grid_aia171": "3bbc08b1dc8e337efdf957242094853cb12beed2dc731849d306dc802ca444db",
5+
"sunpy.map.tests.test_mapbase.test_peek_grid_limb_aia171": "a3b29a16745ed4907355b67df1fca77f3b08e538d2aa57bf4f7699de96851a79",
6+
"sunpy.map.tests.test_mapbase.test_peek_limb_aia171": "7487150aa673bbb748ad237ebbc90159bcc2642ee03329373eae26d2003dfb49",
7+
"sunpy.map.tests.test_mapbase.test_plot_aia171": "422993a931b27ce96ed73b0fa68ab8630c1c62b27680329ffce0760e7629c614",
8+
"sunpy.map.tests.test_mapbase.test_plot_aia171_nowcsaxes": "fa496606326ea9323b74383c7edcb6d77c28e5b959592e4091e7136f4e97dbca",
9+
"sunpy.map.tests.test_mapbase.test_plot_aia171_superpixel": "4dde4efcbf7e535632e3ad333258c99207616b7cb4f86cb5f4a43001d81f8eb8",
10+
"sunpy.map.tests.test_mapbase.test_plot_aia171_superpixel_nowcsaxes": "1482efbb307b887426485facba213654355249ed83e82d4f714c03a0234183ff",
11+
"sunpy.map.tests.test_mapbase.test_plot_masked_aia171": "70f57e4f293aec75548b16ed19eef4e651789e8ab88d4579d5ee236d5c447dfe",
12+
"sunpy.map.tests.test_mapbase.test_plot_masked_aia171_nowcsaxes": "32e06112f6841df1d102e2fc49b28cdc876f2836ed2aa1d887fb4c56c036f17d",
13+
"sunpy.map.tests.test_mapbase.test_plot_masked_aia171_superpixel": "d75073abc5220e1c68faf691338a87ad087d401eeb76a1328f5ea0acf9aff238",
14+
"sunpy.map.tests.test_mapbase.test_plot_masked_aia171_superpixel_nowcsaxes": "d80fe09b598d1d3140cb3ffd85fca9df71355ec5979c3e1df3cf2a3430512f1e"
15+
}

Diff for: sunpy/tests/hash.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import matplotlib.pyplot as plt
99

10-
HASH_LIBRARY_NAME = 'figure_hashes_py{0}.json'.format(version_info.major)
10+
HASH_LIBRARY_NAME = 'figure_hashes_py{0}{1}.json'.format(version_info.major, version_info.minor)
1111

1212
# Load the hash library if it exists
1313
try:

0 commit comments

Comments
 (0)