From 35a53f5c1e854f7d0e26320d6e6e5925a1089a0d Mon Sep 17 00:00:00 2001 From: Britton Smith Date: Thu, 23 Apr 2020 13:39:40 +0100 Subject: [PATCH 1/5] Update yt requirements. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 29ec33f457..4d3210a440 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,7 @@ def get_version(filename): 'matplotlib', 'numpy!=1.14.0', 'requests', - 'yt>=3.4.0', + 'yt>=3.6.0,<4.0', 'yt_astro_analysis'], python_requires='>=3.5' ) From e5f52f708c1f7972d0ad8b3a0dea5dbcdad1279c Mon Sep 17 00:00:00 2001 From: Britton Smith Date: Thu, 23 Apr 2020 13:44:01 +0100 Subject: [PATCH 2/5] Remove future module. --- doc/source/conf.py | 1 - environment.yml | 1 - setup.py | 1 - tests/gold_standard_versions.py | 3 +-- tests/test_instrument.py | 2 -- tests/test_ion_balance.py | 1 - tests/test_line_database.py | 2 -- tests/test_lsf.py | 2 -- tests/test_plotting.py | 1 - tests/test_ray_generator.py | 1 - tests/test_spectrum_generator.py | 1 - trident/absorption_spectrum/absorption_spectrum.py | 2 -- 12 files changed, 1 insertion(+), 17 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 228fea5ef4..a0cb364b27 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,7 +12,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -from __future__ import absolute_import import sys import os import shlex diff --git a/environment.yml b/environment.yml index be3fd59ebe..69e809ccc1 100644 --- a/environment.yml +++ b/environment.yml @@ -11,7 +11,6 @@ dependencies: - cycler==0.10.0 - cython==0.29.13 - decorator==4.4.0 - - future==0.17.1 - h5py==2.9.0 - idna==2.8 - ipython==7.7.0 diff --git a/setup.py b/setup.py index 4d3210a440..17bc6f4c74 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,6 @@ def get_version(filename): }, install_requires=[ 'astropy', - 'future', 'h5py', 'matplotlib', 'numpy!=1.14.0', diff --git a/tests/gold_standard_versions.py b/tests/gold_standard_versions.py index 70af00fa75..4b56adf86b 100644 --- a/tests/gold_standard_versions.py +++ b/tests/gold_standard_versions.py @@ -11,12 +11,11 @@ # The full license is in the file LICENSE, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import print_function from trident import path as trident_path import os def get_gold_standard_version(): - f = open(os.path.join(trident_path, '../.travis.yml'), 'r') + f = open(os.path.join(trident_path, '../.circleci/config.yml'), 'r') for line in f: line = line.lstrip() if line.startswith('YT_GOLD'): diff --git a/tests/test_instrument.py b/tests/test_instrument.py index 5cdfce1f49..a999ceb858 100644 --- a/tests/test_instrument.py +++ b/tests/test_instrument.py @@ -11,8 +11,6 @@ # The full license is in the file LICENSE, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import absolute_import -from __future__ import print_function from trident.instrument import Instrument def test_instrument(): diff --git a/tests/test_ion_balance.py b/tests/test_ion_balance.py index 11d2971347..3eb8f18792 100644 --- a/tests/test_ion_balance.py +++ b/tests/test_ion_balance.py @@ -11,7 +11,6 @@ # The full license is in the file LICENSE, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import absolute_import from trident.ion_balance import \ add_ion_fraction_field, \ add_ion_number_density_field, \ diff --git a/tests/test_line_database.py b/tests/test_line_database.py index 7c75ec1f8b..d5436776b2 100644 --- a/tests/test_line_database.py +++ b/tests/test_line_database.py @@ -11,8 +11,6 @@ # The full license is in the file LICENSE, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import absolute_import -from __future__ import print_function from trident.line_database import \ uniquify, \ Line, \ diff --git a/tests/test_lsf.py b/tests/test_lsf.py index 124edef25d..ce000546fe 100644 --- a/tests/test_lsf.py +++ b/tests/test_lsf.py @@ -11,8 +11,6 @@ # The full license is in the file LICENSE, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import absolute_import -from __future__ import print_function import pytest from trident.lsf import LSF import numpy as np diff --git a/tests/test_plotting.py b/tests/test_plotting.py index 9b319c195d..ffc307b8b1 100644 --- a/tests/test_plotting.py +++ b/tests/test_plotting.py @@ -11,7 +11,6 @@ # The full license is in the file LICENSE, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import absolute_import from trident.plotting import plot_spectrum from trident.utilities import make_onezone_ray from trident.spectrum_generator import \ diff --git a/tests/test_ray_generator.py b/tests/test_ray_generator.py index 72189afc44..96a3d6cd93 100644 --- a/tests/test_ray_generator.py +++ b/tests/test_ray_generator.py @@ -11,7 +11,6 @@ # The full license is in the file LICENSE, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import absolute_import import trident as tri import tempfile import shutil diff --git a/tests/test_spectrum_generator.py b/tests/test_spectrum_generator.py index c912087d3e..1d0657516c 100644 --- a/tests/test_spectrum_generator.py +++ b/tests/test_spectrum_generator.py @@ -11,7 +11,6 @@ # The full license is in the file LICENSE, distributed with this software. #----------------------------------------------------------------------------- -from __future__ import absolute_import from trident.plotting import plot_spectrum from trident.utilities import make_onezone_ray from trident.spectrum_generator import \ diff --git a/trident/absorption_spectrum/absorption_spectrum.py b/trident/absorption_spectrum/absorption_spectrum.py index eb579d60e6..d1adf59d49 100644 --- a/trident/absorption_spectrum/absorption_spectrum.py +++ b/trident/absorption_spectrum/absorption_spectrum.py @@ -5,8 +5,6 @@ """ -from __future__ import absolute_import - #----------------------------------------------------------------------------- # Copyright (c) 2013-2017, yt Development Team. # Copyright (c) 2017, Trident Development Team. From 9e63f4d19361cc022f077ab480a110d76f0c193f Mon Sep 17 00:00:00 2001 From: Britton Smith Date: Thu, 23 Apr 2020 13:56:24 +0100 Subject: [PATCH 3/5] Update yt gold standard to latest stable release and do not test anything later than that. --- .circleci/config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9f5092a85e..2ecd0ee12f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ commands: echo 'TRIDENT_ION_DATA=$HOME/.trident' >> $BASH_ENV echo 'TRIDENT_ANSWER_DATA=$HOME/answer_test_data' >> $BASH_ENV echo 'TRIDENT_CONFIG=$HOME/.trident/config.tri' >> $BASH_ENV - echo 'YT_GOLD=6692802ea1bf7b4fbb6b0bc207aaea14730eec84' >> $BASH_ENV + echo 'YT_GOLD=yt-3.6.0' >> $BASH_ENV echo 'YT_HEAD=master' >> $BASH_ENV echo 'TRIDENT_GOLD=test-standard-v6' >> $BASH_ENV echo 'TRIDENT_HEAD=tip' >> $BASH_ENV @@ -45,7 +45,7 @@ commands: pushd $YT_DIR # return to yt tip before pulling git checkout ${YT_HEAD} - git pull origin ${YT_HEAD} + git pull origin ${YT_HEAD} --tag # checkout changeset we're actually testing git checkout ${<< parameters.yttag >>} pip install -e . @@ -166,7 +166,7 @@ jobs: - restore_cache: name: "Restore dependencies cache." - key: legacy-<< parameters.tag >>-dependencies-v2 + key: legacy-<< parameters.tag >>-dependencies-v3 - install-dependencies: yttag: << parameters.yttag >> @@ -174,7 +174,7 @@ jobs: - save_cache: name: "Save dependencies cache." - key: legacy-<< parameters.tag >>-dependencies-v2 + key: legacy-<< parameters.tag >>-dependencies-v3 paths: - ~/.cache/pip - ~/venv @@ -198,14 +198,14 @@ jobs: - restore_cache: name: "Restore answer tests cache." - key: legacy-results-<< parameters.tag >>-<< parameters.yttag >>-v4 + key: legacy-results-<< parameters.tag >>-<< parameters.yttag >>-v5 - run-tests: generate: 1 - save_cache: name: "Save answer tests cache." - key: legacy-results-<< parameters.tag >>-<< parameters.yttag >>-v4 + key: legacy-results-<< parameters.tag >>-<< parameters.yttag >>-v5 paths: - ~/answer_test_data/test_results @@ -259,7 +259,7 @@ workflows: - tests: name: "Python 3.8 tests with yt tip" tag: "3.8.1" - yttag: "YT_HEAD" + yttag: "YT_GOLD" coverage: 1 - docs-test: @@ -278,7 +278,7 @@ workflows: - tests: name: "Python 3.8 tests with yt tip" tag: "3.8.1" - yttag: "YT_HEAD" + yttag: "YT_GOLD" coverage: 0 - docs-test: @@ -297,7 +297,7 @@ workflows: - tests: name: "Python 3.8 tests with yt tip" tag: "3.8.1" - yttag: "YT_HEAD" + yttag: "YT_GOLD" coverage: 0 - docs-test: From 563ae595aae636ae7d40d84d934764d51367c09e Mon Sep 17 00:00:00 2001 From: Britton Smith Date: Thu, 23 Apr 2020 14:03:33 +0100 Subject: [PATCH 4/5] Update python versions and move intermediate versions to weekly tests only. --- .circleci/config.yml | 55 ++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ecd0ee12f..b11e6f7468 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -244,46 +244,15 @@ workflows: name: "Python 3.5 tests with yt gold" tag: "3.5.9" - - tests: - name: "Python 3.6 tests with yt gold" - tag: "3.6.9" - - - tests: - name: "Python 3.7 tests with yt gold" - tag: "3.7.6" - - tests: name: "Python 3.8 tests with yt gold" - tag: "3.8.1" - - - tests: - name: "Python 3.8 tests with yt tip" - tag: "3.8.1" + tag: "3.8.2" yttag: "YT_GOLD" coverage: 1 - docs-test: name: "Test docs build" - tag: "3.8.1" - - daily: - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - master - jobs: - - tests: - name: "Python 3.8 tests with yt tip" - tag: "3.8.1" - yttag: "YT_GOLD" - coverage: 0 - - - docs-test: - name: "Test docs build" - tag: "3.8.1" + tag: "3.8.2" weekly: triggers: @@ -295,11 +264,21 @@ workflows: - legacy jobs: - tests: - name: "Python 3.8 tests with yt tip" - tag: "3.8.1" - yttag: "YT_GOLD" - coverage: 0 + name: "Python 3.5 tests with yt gold" + tag: "3.5.9" + + - tests: + name: "Python 3.6 tests with yt gold" + tag: "3.6.10" + + - tests: + name: "Python 3.7 tests with yt gold" + tag: "3.7.7" + + - tests: + name: "Python 3.8 tests with yt gold" + tag: "3.8.2" - docs-test: name: "Test docs build" - tag: "3.8.1" + tag: "3.8.2" From 6eb2da6bda9a3d91451332359d3964e5266cd97a Mon Sep 17 00:00:00 2001 From: Britton Smith Date: Thu, 23 Apr 2020 14:17:08 +0100 Subject: [PATCH 5/5] Remove six module. --- environment.yml | 1 - tests/test_line_database.py | 1 - 2 files changed, 2 deletions(-) diff --git a/environment.yml b/environment.yml index 69e809ccc1..378e1fb504 100644 --- a/environment.yml +++ b/environment.yml @@ -29,7 +29,6 @@ dependencies: - pyparsing==2.4.2 - python-dateutil==2.8.0 - requests==2.22.0 - - six==1.12.0 - sympy==1.4 - traitlets==4.3.2 - urllib3==1.25.3 diff --git a/tests/test_line_database.py b/tests/test_line_database.py index d5436776b2..c52c26fece 100644 --- a/tests/test_line_database.py +++ b/tests/test_line_database.py @@ -20,7 +20,6 @@ import numpy as np from shutil import copyfile import os.path -from six.moves import range def test_uniquify(): """