diff --git a/README.rst b/README.rst index 9921fb6089..56302ea948 100644 --- a/README.rst +++ b/README.rst @@ -78,7 +78,9 @@ Install ======= The easiest method for installing Py-ART is to use the conda packages from -the latest release. To do this you must download and install +the latest release and use Python 3, as Python 2 support ended January 1st, +2020 and many packages including Py-ART no longer support Python 2. +To do this you must download and install `Anaconda `_ or `Miniconda `_. With Anaconda or Miniconda install, it is recommended to create a new conda diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index ef91719503..9ca38702b1 100644 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -17,7 +17,6 @@ conda update -q conda ## Create a testenv with the correct Python version conda env create -f continuous_integration/environment-$PYTHON_VERSION.yml source activate testenv -# TODO install cylp and glpk in Python 2.7 # upgrade pip pip install --upgrade pip diff --git a/guides/CI_SETUP.rst b/guides/CI_SETUP.rst index 11a0d3a05d..b3af5b0d2e 100644 --- a/guides/CI_SETUP.rst +++ b/guides/CI_SETUP.rst @@ -13,7 +13,7 @@ Services Py-ART's CI setup is hosted on two services, `Travis CI`_ and `AppVeyor`_. Both of these are hosted continuous integration services that are free for open source projects. Travis CI runs the tests on a Linux platform and AppVeyor -runs on Windows. Currently no tests are run on macOS although Travis CI does +runs on Windows. Currently no tests are run on macOS although Travis CI does support this platform. .. _Travis CI : https://travis-ci.org/ @@ -24,8 +24,8 @@ Travis CI --------- The CI setup on Travis CI is controlled by the ``.travis.yml`` file in the -repository root. This file contains multiple sections which define the steps -taken in a CI run. The `Travis CI documentation`_ provide details on these +repository root. This file contains multiple sections which define the steps +taken in a CI run. The `Travis CI documentation`_ provide details on these sections and Travis CI in general. Briefly the sections in the file include: @@ -33,26 +33,26 @@ Briefly the sections in the file include: - An encrypted environment variable used to push the documentation built upon each merge to the master branch to the `pyart-docs-travis`_ repo. - A matrix section which defines the various combinations of Python versions - and other parameters which will be tested. Currently Python 2.7, 3.4, 3.5 - and 3.6 are tested with a second Python 2.7 run also testing that the + and other parameters which will be tested. Currently Python 3.6, 3.7 + and 3.8 are tested with a second Python 3.8 run also testing that the package can be built from a conda recipe and that the docs build. - An install section which executes the ``install.sh`` script in the continuous_integration directory. -- A script section which runs the tests using ``nosetests`` +- A script section which runs the tests using ``pytest`` - A after_success section which reports test coverage to `Coveralls`_. Currently nothing is done with this information but it may be useful later to view how test coverage has changed over time. - The after_success section also runs the ``build_docs.sh`` script in the - continuous_integration directory for the appropriate matrix element. On - non-merge commits this tests that the documentation can be build. On merge + continuous_integration directory for the appropriate matrix element. On + non-merge commits this tests that the documentation can be build. On merge commits this builds the docs and uploads them to the `pyart-docs-travis`_ repository which makes them available on the `Py-ART documentation page`_. The bulk of the test environment setup is done by the ``install.sh`` script in -the continuous_integration directory. This script downloads, installs and +the continuous_integration directory. This script downloads, installs and configures the latest version of Miniconda3, creates a conda environment for the Python version being tested with the various requirements specified in the -environment-XXX.yml file, and builds Py-ART in that environment. For the +environment-XXX.yml file, and builds Py-ART in that environment. For the matrix element where Py-ART is build from a conda recipe, the if/then block installs conda-build, builds Py-ART from the recipe in the repository and installs this conda package into the test conda environment. @@ -73,12 +73,12 @@ enviroment-X.X.yml files in the continuous_integration directory. Over time these may need to be updated. To debug Travis CI issue use the logs provided for the builds themselves to see -where the issues are occurring. Un-commenting the ``set -x`` line in the -``install.sh`` script may be helpful when debugging Travis CI issue. With this +where the issues are occurring. Un-commenting the ``set -x`` line in the +``install.sh`` script may be helpful when debugging Travis CI issue. With this line uncommented the commands being executed are echoed in the log. Additionally, it can be helpful to run the CI builds locally to quickly test -out changes to the setup and try out specific commands. Travis CI provides +out changes to the setup and try out specific commands. Travis CI provides the docker `images`_ used by their service and instructions on how to `run these locally`_. @@ -89,14 +89,14 @@ the docker `images`_ used by their service and instructions on how to AppVeyor -------- -The second CI service used by Py-ART is `AppVeyor_`. This setup is controlled +The second CI service used by Py-ART is `AppVeyor_`. This setup is controlled by the ``appveyor.yml`` file in the repository and builds and runs the unit -tests on a Windows platform. This services is slower than Travis CI so only -two Python versions are tested (2.7 and 3.5). All setup and configuration is +tests on a Windows platform. This services is slower than Travis CI so only +two Python versions are tested (3.7 and 3.8). All setup and configuration is done in the ``appveyor.yml`` file besides a setup function used by many projects which can be found in the ``run_with_env.cmd`` file in the -continuous_integration/appveyor directory. This file contains comments which -explain the steps being performed and some debugging details. Refer to the +continuous_integration/appveyor directory. This file contains comments which +explain the steps being performed and some debugging details. Refer to the `AppVeyor documentation`_ for details. .. _AppVeyor : https://www.appveyor.com/ diff --git a/guides/HOWTO_RELEASE.rst b/guides/HOWTO_RELEASE.rst index 758931e865..865dc12593 100644 --- a/guides/HOWTO_RELEASE.rst +++ b/guides/HOWTO_RELEASE.rst @@ -9,9 +9,9 @@ Make the tagged git release --------------------------- Change the ``ISRELEASE`` line in the **setup.py** file in the root directory to -True. Check this change into git and create a tagged commit with the version -string. The commit message should be "REL: Release X.X.X" with the proper -version filled in. This commit and the tag should be pushed directly to the +True. Check this change into git and create a tagged commit with the version +string. The commit message should be "REL: Release X.X.X" with the proper +version filled in. This commit and the tag should be pushed directly to the ARM-DOE repository on GitHub. This can be done using the following, assuming upstream points to https://github.com/ARM-DOE/pyart.git. @@ -42,7 +42,7 @@ that this file can be used to install a working version of Py-ART. Once tested the tar.gz source distribution file can be uploaded to PyPI using `twine `_, installing if needed, with the -command ``twine upload dist/*``. This command will prompt the user for their +command ``twine upload dist/*``. This command will prompt the user for their PyPI credentials. After uploading check that this file is available for download from `pypi.python.org/pypi/arm_pyart `_. @@ -66,7 +66,7 @@ Prepare the release notes ------------------------- Prepare a short description of the changes, improvements and deprecations in -the new release. The format used in previous releases makes a good template +the new release. The format used in previous releases makes a good template for this text. The following git commands can be used to list all merge commits and the contributors to a particular version which may be helpful when drafting these notes. @@ -91,11 +91,11 @@ Create and upload version specific documentation ------------------------------------------------ The Py-ART documentation page contains links to documentation and examples from -the latest release. These pages must be updated when a new release is made. +the latest release. These pages must be updated when a new release is made. To build the documentation for a release, go to the doc directory and run the -``rebuild_full_docs.sh`` shell script. Note that this should be done while the +``rebuild_full_docs.sh`` shell script. Note that this should be done while the release commit is checked out and on a system with all optional requirements -for the examples and sphinx install. Additionally, the files needed for the +for the examples and sphinx install. Additionally, the files needed for the examples must be copied into the correct locations in the examples directory. Once the documentation has been built, the contents of the doc/build/html @@ -104,9 +104,9 @@ in the dev directory. Typically this process is best done in a directory where the ARM-DOE repository has been cloned and the gh-pages branch checked out. First, the current dev directory should be moved to a versioned directory using -``git mv dev v1_7`` and a commit made. Then create an empty ``dev`` directory -and copy all the files from the doc/build/html directory. Check these new -files into git and create a commit. Finally, push these changes to the ARM-DOE +``git mv dev v1_7`` and a commit made. Then create an empty ``dev`` directory +and copy all the files from the doc/build/html directory. Check these new +files into git and create a commit. Finally, push these changes to the ARM-DOE repository. After a few minutes check that the new documentation is available at `http://arm-doe.github.io/pyart/dev/ `_. @@ -117,8 +117,8 @@ Prepare the repository for the next version To begin the development of the next version of Py-ART the ``MINOR`` variable should be incremented and ``ISRELEASED`` should be changed back to False. Make this change to the ``setup.py`` file in the root directory and create a -commit with the message ``MAINT: start v1.9+dev``. See the commit for the -`start of the 1.8+dev`_ as an example. Push this commit directly to the +commit with the message ``MAINT: start v1.9+dev``. See the commit for the +`start of the 1.8+dev`_ as an example. Push this commit directly to the ARM-DOE repository. .. _start of the 1.8+dev : https://github.com/ARM-DOE/pyart/commit/e3d01232ac3787da38456152da6b9db3ab46d4d7 @@ -130,17 +130,17 @@ to remove them. Create conda packages on conda-forge ------------------------------------ -Conda package for Py-ART are created using the conda-forge feedstock. To +Conda package for Py-ART are created using the conda-forge feedstock. To create a new release first fork the `arm_pyart-feedstock`_ repository or update -your fork. Then clone the fork and checkout a new branch. Update the first +your fork. Then clone the fork and checkout a new branch. Update the first few lines of the ``recipe/meta.yaml`` with the new version number and a sha256 -hash of the file on PyPI. Check this change in as a new commit. Next rerender +hash of the file on PyPI. Check this change in as a new commit. Next rerender the feedstock using ``conda smithy rerender``, installing ``conda-smithy`` if needed. Finally, push the branch up to your fork and create a pull request against the conda-forge feedstock. The CI services will test the recipe by building conda -packages on all three platforms and Python+NumPy combinations. Once these +packages on all three platforms and Python+NumPy combinations. Once these pass the pull request can be merged and the CI services will again build the packages and uploaded them to the conda-forge Anaconda cloud channel. @@ -153,7 +153,7 @@ process works. Announce the release on the pyart-user mailing list --------------------------------------------------- -Announce the new release on the `Py-ART mailing list`_. Use a previous +Announce the new release on the `Py-ART mailing list`_. Use a previous announcement as a template and include the release notes written above. .. _Py-ART mailing list : http://groups.google.com/group/pyart-users/ diff --git a/guides/contributors_guide.rst b/guides/contributors_guide.rst index 36911236ca..da81f69647 100644 --- a/guides/contributors_guide.rst +++ b/guides/contributors_guide.rst @@ -38,7 +38,7 @@ please cite: DOI: http://doi.org/10.5334/jors.119 Py-ART implements many published scientific methods which should *also* be -cited if you make use of them. Refer to the **References** section in the +cited if you make use of them. Refer to the **References** section in the documentation of the functions used for information on these citations. @@ -46,7 +46,9 @@ Install ------- The easiest method for installing Py-ART is to use the conda packages from -the latest release. To do this you must download and install +the latest release and use Python 3, as Python 2 support ended January 1st, +2020 and many packages including Py-ART no longer support Python 2. +To do this you must download and install `Anaconda `_ or `Miniconda `_. Then use the following command in a terminal or command prompt to install diff --git a/guides/setting_up_an_environment.rst b/guides/setting_up_an_environment.rst index 814d32ab14..19299a99de 100644 --- a/guides/setting_up_an_environment.rst +++ b/guides/setting_up_an_environment.rst @@ -73,7 +73,7 @@ if you want Jupyter Notebook to run in that enviroment with those packages:: while that environment is activated. Another way to create a conda environment is by doing it from scratch using the conda create command. An example of this:: - conda create -n pyart_env -c conda-forge python=3.6 arm_pyart netCDF4 + conda create -n pyart_env -c conda-forge python=3.8 arm_pyart netCDF4 cartopy scipy numpy matplotlib This will also create an environment called pyart_env that can be activate the diff --git a/pyart/__init__.py b/pyart/__init__.py index e5e6d70960..1097e19c51 100644 --- a/pyart/__init__.py +++ b/pyart/__init__.py @@ -4,8 +4,6 @@ """ -from __future__ import print_function - # Detect if we're being called as part of Py-ART's setup procedure try: __PYART_SETUP__ diff --git a/pyart/_debug_info.py b/pyart/_debug_info.py index d37c14ccc8..da51daa201 100644 --- a/pyart/_debug_info.py +++ b/pyart/_debug_info.py @@ -6,7 +6,6 @@ """ -from __future__ import print_function import os import sys diff --git a/pyart/aux_io/sinarame_h5.py b/pyart/aux_io/sinarame_h5.py index cf08fb38e3..719d69a450 100644 --- a/pyart/aux_io/sinarame_h5.py +++ b/pyart/aux_io/sinarame_h5.py @@ -14,8 +14,6 @@ """ -from __future__ import print_function - from datetime import datetime import glob import os diff --git a/pyart/core/grid.py b/pyart/core/grid.py index 39d19e17f0..f17b00712e 100644 --- a/pyart/core/grid.py +++ b/pyart/core/grid.py @@ -21,7 +21,12 @@ import numpy as np from netCDF4 import num2date -import xarray + +try: + import xarray + _XARRAY_AVAILABLE = True +except ImportError: + _XARRAY_AVAILABLE = False try: import pyproj @@ -300,6 +305,12 @@ def to_xarray(self): in a one dimensional array. """ + + if not _XARRAY_AVAILABLE: + raise MissingOptionalDependency( + 'Xarray is required to use Grid.to_xarray but is not ' + + 'installed!') + lon, lat = self.get_point_longitude_latitude() z = self.z['data'] y = self.y['data'] diff --git a/pyart/core/radar.py b/pyart/core/radar.py index 0693f67d06..ddcd0d693a 100644 --- a/pyart/core/radar.py +++ b/pyart/core/radar.py @@ -20,7 +20,6 @@ """ -from __future__ import print_function import copy import sys diff --git a/pyart/core/tests/test_grid.py b/pyart/core/tests/test_grid.py index f47864b219..80000dfc38 100644 --- a/pyart/core/tests/test_grid.py +++ b/pyart/core/tests/test_grid.py @@ -1,7 +1,5 @@ """ Unit Tests for Py-ART's core/grid.py module. """ -from __future__ import print_function - import functools import pickle diff --git a/pyart/core/tests/test_wind_profile.py b/pyart/core/tests/test_wind_profile.py index 2c8c5aadc4..dfbaf087f0 100644 --- a/pyart/core/tests/test_wind_profile.py +++ b/pyart/core/tests/test_wind_profile.py @@ -1,7 +1,5 @@ """ Unit Tests for Py-ART's core/wind_profile.py module. """ -from __future__ import print_function - import numpy as np from numpy.testing import assert_almost_equal import pytest diff --git a/pyart/correct/despeckle.py b/pyart/correct/despeckle.py index 6e0213a8f9..c58b3adae3 100644 --- a/pyart/correct/despeckle.py +++ b/pyart/correct/despeckle.py @@ -21,7 +21,6 @@ """ -from __future__ import division import numpy as np from scipy.ndimage import label from scipy.signal import convolve2d diff --git a/pyart/correct/phase_proc.py b/pyart/correct/phase_proc.py index 541fefc76d..759e4f612b 100644 --- a/pyart/correct/phase_proc.py +++ b/pyart/correct/phase_proc.py @@ -38,8 +38,6 @@ """ -from __future__ import print_function, division - import copy from time import time diff --git a/pyart/correct/tests/test_region_dealias.py b/pyart/correct/tests/test_region_dealias.py index ef72516310..0e12fad956 100644 --- a/pyart/correct/tests/test_region_dealias.py +++ b/pyart/correct/tests/test_region_dealias.py @@ -4,8 +4,6 @@ # to recreate a dealias_plot.png file showing the before and after doppler # velocities -from __future__ import print_function - import warnings import pyart diff --git a/pyart/correct/tests/test_unwrap.py b/pyart/correct/tests/test_unwrap.py index fd831cd03d..9a7374da30 100644 --- a/pyart/correct/tests/test_unwrap.py +++ b/pyart/correct/tests/test_unwrap.py @@ -4,8 +4,6 @@ # to recreate a dealias_plot.png file showing the before and after doppler # velocities -from __future__ import print_function - import numpy as np from numpy.testing import assert_allclose, assert_almost_equal import pytest diff --git a/pyart/correct/unwrap.py b/pyart/correct/unwrap.py index 8dd80a7287..e2f1fe587f 100644 --- a/pyart/correct/unwrap.py +++ b/pyart/correct/unwrap.py @@ -19,8 +19,6 @@ """ -from __future__ import print_function - import numpy as np from ..config import get_metadata, get_fillvalue diff --git a/pyart/graph/cm.py b/pyart/graph/cm.py index 36230887de..a899636344 100644 --- a/pyart/graph/cm.py +++ b/pyart/graph/cm.py @@ -60,7 +60,6 @@ # http://matplotlib.org/. # Copyright (c) 2012-2013 Matplotlib Development Team; All Rights Reserved -from __future__ import print_function, division import warnings import matplotlib as mpl diff --git a/pyart/graph/gridmapdisplay_basemap.py b/pyart/graph/gridmapdisplay_basemap.py index f876560900..4a306c70bf 100644 --- a/pyart/graph/gridmapdisplay_basemap.py +++ b/pyart/graph/gridmapdisplay_basemap.py @@ -12,8 +12,6 @@ """ -from __future__ import print_function - import warnings import numpy as np diff --git a/pyart/graph/tests/test_radardisplay.py b/pyart/graph/tests/test_radardisplay.py index adda7bf7b0..f3105822e6 100644 --- a/pyart/graph/tests/test_radardisplay.py +++ b/pyart/graph/tests/test_radardisplay.py @@ -5,8 +5,6 @@ # in baseline_images directory. Current this test only determines if files can # be created, not that they are correct. -from __future__ import print_function - import warnings import datetime diff --git a/pyart/io/_sigmetfile.pyx b/pyart/io/_sigmetfile.pyx index 8164ddfc32..414531b91f 100644 --- a/pyart/io/_sigmetfile.pyx +++ b/pyart/io/_sigmetfile.pyx @@ -23,8 +23,6 @@ A class and supporting functions for reading Sigmet (raw format) files. _unpack_ingest_header """ -from __future__ import print_function - import struct import datetime import warnings diff --git a/pyart/io/mdv_common.py b/pyart/io/mdv_common.py index c7bc0bec81..0ed83c36f2 100644 --- a/pyart/io/mdv_common.py +++ b/pyart/io/mdv_common.py @@ -13,8 +13,6 @@ """ -from __future__ import print_function - # Code is adapted from Nitin Bharadwaj's Matlab code import struct diff --git a/pyart/io/nexrad_level3.py b/pyart/io/nexrad_level3.py index fb7a12ac5d..c6c4b406f4 100644 --- a/pyart/io/nexrad_level3.py +++ b/pyart/io/nexrad_level3.py @@ -23,8 +23,6 @@ """ -from __future__ import division - # This file is part of the Py-ART, the Python ARM Radar Toolkit # https://github.com/ARM-DOE/pyart diff --git a/pyart/io/output_to_geotiff.py b/pyart/io/output_to_geotiff.py index 5e23eab994..f9a939feee 100644 --- a/pyart/io/output_to_geotiff.py +++ b/pyart/io/output_to_geotiff.py @@ -13,8 +13,6 @@ """ -from __future__ import division - import os import shutil diff --git a/pyart/io/sigmet.py b/pyart/io/sigmet.py index 420686db6e..e1a6edcc38 100644 --- a/pyart/io/sigmet.py +++ b/pyart/io/sigmet.py @@ -18,7 +18,6 @@ """ -from __future__ import division import datetime import warnings diff --git a/pyart/io/tests/test_cfradial.py b/pyart/io/tests/test_cfradial.py index 652be8189c..dc427bbc74 100644 --- a/pyart/io/tests/test_cfradial.py +++ b/pyart/io/tests/test_cfradial.py @@ -1,7 +1,5 @@ """ Unit Tests for Py-ART's io/cfradial.py module. """ -from __future__ import print_function - import warnings import numpy as np diff --git a/pyart/io/tests/test_grid_io.py b/pyart/io/tests/test_grid_io.py index 721335600e..96138da42b 100644 --- a/pyart/io/tests/test_grid_io.py +++ b/pyart/io/tests/test_grid_io.py @@ -1,7 +1,5 @@ """ Unit Tests for Py-ART's io/grid_io.py module. """ -from __future__ import print_function - import netCDF4 import numpy as np from numpy.testing import assert_almost_equal, assert_warns diff --git a/pyart/io/tests/test_mdv_common.py b/pyart/io/tests/test_mdv_common.py index 360ce08987..d294684fae 100644 --- a/pyart/io/tests/test_mdv_common.py +++ b/pyart/io/tests/test_mdv_common.py @@ -1,7 +1,5 @@ """ Unit Tests for Py-ART's io/mdv_common.py module. """ -from __future__ import print_function - import warnings from datetime import datetime from io import BytesIO diff --git a/pyart/io/tests/test_mdv_grid.py b/pyart/io/tests/test_mdv_grid.py index 6b51748916..a290aa8791 100644 --- a/pyart/io/tests/test_mdv_grid.py +++ b/pyart/io/tests/test_mdv_grid.py @@ -1,7 +1,5 @@ """ Unit Tests for Py-ART's io/mdv_grid.py module. """ -from __future__ import print_function - import datetime from io import BytesIO diff --git a/pyart/io/tests/test_uf_write.py b/pyart/io/tests/test_uf_write.py index 573a2f6c00..47a02c217f 100644 --- a/pyart/io/tests/test_uf_write.py +++ b/pyart/io/tests/test_uf_write.py @@ -1,7 +1,5 @@ """ Unit Tests for Py-ART's uf_write module. """ -from __future__ import unicode_literals - try: from StringIO import StringIO except ImportError: diff --git a/pyart/io/uf_write.py b/pyart/io/uf_write.py index c8de7fdd4c..c55b4e726f 100644 --- a/pyart/io/uf_write.py +++ b/pyart/io/uf_write.py @@ -19,8 +19,6 @@ """ -from __future__ import division, unicode_literals - import math import struct import warnings diff --git a/pyart/io/uffile.py b/pyart/io/uffile.py index ebb79a016d..38c5a9c57d 100644 --- a/pyart/io/uffile.py +++ b/pyart/io/uffile.py @@ -20,8 +20,6 @@ """ -from __future__ import division - # This file is part of the Py-ART, the Python ARM Radar Toolkit # https://github.com/ARM-DOE/pyart diff --git a/pyart/lazydict.py b/pyart/lazydict.py index 791554c06c..7ed602c38a 100644 --- a/pyart/lazydict.py +++ b/pyart/lazydict.py @@ -12,12 +12,7 @@ """ -try: - # Python 3 - from collections.abc import MutableMapping -except ImportError: - # Python 2.7, will be removed in next release after Py-ART Impressionism. - from collections import MutableMapping +from collections.abc import MutableMapping import itertools diff --git a/pyart/map/tests/test_gates_to_grid.py b/pyart/map/tests/test_gates_to_grid.py index 677664f445..20e2fef83f 100644 --- a/pyart/map/tests/test_gates_to_grid.py +++ b/pyart/map/tests/test_gates_to_grid.py @@ -1,7 +1,5 @@ """ Unit Tests for Py-ART's map/gates_to_grid.py. """ -from __future__ import print_function - import numpy as np from numpy.testing import assert_almost_equal import pytest diff --git a/pyart/map/tests/test_grid_mapper.py b/pyart/map/tests/test_grid_mapper.py index 848fce7a90..699bd7de3b 100644 --- a/pyart/map/tests/test_grid_mapper.py +++ b/pyart/map/tests/test_grid_mapper.py @@ -1,7 +1,5 @@ """ Unit Tests for Py-ART's map/grid_mapper.py module. """ -from __future__ import print_function - import numpy as np from numpy.testing import assert_almost_equal import pytest diff --git a/pyart/testing/data/check_nexrad_dummy.py b/pyart/testing/data/check_nexrad_dummy.py index 2f3122ebd3..ce343e3d92 100644 --- a/pyart/testing/data/check_nexrad_dummy.py +++ b/pyart/testing/data/check_nexrad_dummy.py @@ -1,6 +1,5 @@ # check that the dummy NEXRAD file is simlar to non-dummy file. -from __future__ import print_function import numpy as np from numpy.testing import assert_array_equal, assert_allclose diff --git a/pyart/testing/tmpdirs.py b/pyart/testing/tmpdirs.py index 45bc6bcdbb..f80c16710e 100644 --- a/pyart/testing/tmpdirs.py +++ b/pyart/testing/tmpdirs.py @@ -45,8 +45,6 @@ """ -from __future__ import division, print_function, absolute_import - # emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## diff --git a/pyart/tests/test_config.py b/pyart/tests/test_config.py index 9d10fb8d46..c79776b5d8 100644 --- a/pyart/tests/test_config.py +++ b/pyart/tests/test_config.py @@ -1,15 +1,11 @@ """ Unit Tests for Py-ART's config.py module. """ +from importlib import reload import os import warnings import pyart -try: - from importlib import reload -except ImportError: - from imp import reload - dirname = os.path.dirname(__file__) CUSTOM_CONFIG_FILE = os.path.join(dirname, 'custom_config.py') diff --git a/pyart/util/radar_utils.py b/pyart/util/radar_utils.py index b5f7e2feb6..03024cbbe7 100644 --- a/pyart/util/radar_utils.py +++ b/pyart/util/radar_utils.py @@ -13,8 +13,6 @@ """ -from __future__ import print_function - import copy import numpy as np diff --git a/pyart/util/sigmath.py b/pyart/util/sigmath.py index a60c8697d4..4570348080 100644 --- a/pyart/util/sigmath.py +++ b/pyart/util/sigmath.py @@ -14,7 +14,6 @@ """ -from __future__ import print_function import numpy as np from scipy import signal diff --git a/scripts/convert_legacy_grid b/scripts/convert_legacy_grid index 0502525082..409e2ecf1a 100755 --- a/scripts/convert_legacy_grid +++ b/scripts/convert_legacy_grid @@ -1,7 +1,6 @@ #! /usr/bin/env python """ Convert a legacy Py-ART grid NetCDF file to a modern NetCDF file. """ -from __future__ import print_function import argparse import warnings diff --git a/scripts/radar_plot b/scripts/radar_plot index f6dbd1bc4a..b3238c0a04 100755 --- a/scripts/radar_plot +++ b/scripts/radar_plot @@ -1,6 +1,4 @@ #! /usr/bin/env python -from __future__ import print_function - import argparse import matplotlib.pyplot as plt