diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9e200969..e7a4698f 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -125,7 +125,7 @@ Code of Conduct Pyspectral follows the same code of conduct as the Pytroll project. For reference it is copied to this repository in -`CODE_OF_CONDUCT.md `_. +`CODE_OF_CONDUCT.md `_. As stated in the Pytroll home page, this code of conduct applies to the project space (GitHub) as well as the public space online and offline when @@ -148,4 +148,4 @@ determined by the maintainers and may include one or more of the following: - Temporary or permanent ban from online communication (Slack, mailing list, etc) For details see the official -`code of conduct document `_. +`code of conduct document `_. diff --git a/README.md b/README.md index fc7e07ae..d2f77a1e 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ Pyspectral ========== -[![Build status](https://github.com/pytroll/pyspectral/workflows/CI/badge.svg?branch=master)](https://github.com/pytroll/pyspectral/workflows/CI/badge.svg?branch=master) +[![Build status](https://github.com/pytroll/pyspectral/workflows/CI/badge.svg?branch=main)](https://github.com/pytroll/pyspectral/workflows/CI/badge.svg?branch=main) [![Anaconda-Server Badge](https://anaconda.org/conda-forge/pyspectral/badges/version.svg)](https://anaconda.org/conda-forge/pyspectral) [![Build status](https://ci.appveyor.com/api/projects/status/5lm42n0l65l5o9xn?svg=true)](https://ci.appveyor.com/project/pytroll/pyspectral) -[![Coverage Status](https://coveralls.io/repos/github/pytroll/pyspectral/badge.svg?branch=master)](https://coveralls.io/github/pytroll/pyspectral?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/pytroll/pyspectral/badge.svg?branch=main)](https://coveralls.io/github/pytroll/pyspectral?branch=main) [![PyPI version](https://badge.fury.io/py/pyspectral.svg)](https://badge.fury.io/py/pyspectral) Given a passive sensor on a meteorological satellite Pyspectral provides the @@ -22,4 +22,4 @@ scattering of molecules, absorption by atmospheric gases and aerosols, and Mie scattering of aerosols. Adam Dybbroe -March 2018, Norrkoping, Sweden +May 2021, Norrkoping, Sweden diff --git a/RELEASING.md b/RELEASING.md index 64a30348..1da8c619 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -3,7 +3,7 @@ prerequisites: `pip install setuptools twine` -1. checkout master +1. checkout main 2. pull from repo 3. run the unittests 4. run `loghub` and update the `CHANGELOG.md` file: @@ -25,4 +25,13 @@ See [semver.org](http://semver.org/) on how to write a version number. 6. push changes to github `git push --follow-tags` -7. Verify travis tests passed and deployed sdist and wheel to PyPI +7. Verify the Github actions unit tests passed + +8. Create a "Release" on GitHub by going to + https://github.com/pytroll/pyspectral/releases and clicking "Draft a new + release". On the next page enter the newly created tag in the "Tag version" + field, "Version X.Y.Z" in the "Release title" field, and paste the markdown + from the changelog (the portion under the version section header) in the + "Describe this release" box. Finally click "Publish release". + +9. Verify the GitHub actions for deployment succeed and the release is on PyPI diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 0a586595..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,44 +0,0 @@ -environment: - global: - PYTHON: "C:\\conda" - MINICONDA_VERSION: "latest" - CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd" - CONDA_DEPENDENCIES: "scipy coveralls coverage h5py mock requests six appdirs python-geotiepoints dask docutils pyaml xlrd pytest" - PIP_DEPENDENCIES: "" - CONDA_CHANNELS: "conda-forge" - CONDA_CHANNEL_PRIORITY: "True" - - matrix: - - PYTHON: "C:\\Python37_64" - PYTHON_VERSION: "3.7" - PYTHON_ARCH: "64" - NUMPY_VERSION: "stable" - - PYTHON: "C:\\Python38_64" - PYTHON_VERSION: "3.8" - PYTHON_ARCH: "64" - NUMPY_VERSION: "stable" - -install: -# - "git clone --depth 1 git://github.com/astropy/ci-helpers.git" - - "git clone --depth 1 -b all-the-fixes git://github.com/djhoese/ci-helpers.git" - - "powershell ci-helpers/appveyor/install-miniconda.ps1" - - "conda activate test" - -build: false # Not a C# project, build stuff at the test step instead. - -test_script: - # Build the compiled extension and run the project tests - - "%CMD_IN_ENV% python setup.py test" - -after_test: - # If tests are successful, create a whl package for the project. - - "%CMD_IN_ENV% python setup.py bdist_wheel bdist_wininst" - - ps: "ls dist" - -artifacts: - # Archive the generated wheel package in the ci.appveyor.com build report. - - path: dist\* - -#on_success: -# - TODO: upload the content of dist/*.whl to a public wheelhouse -# diff --git a/appveyor/install.ps1 b/appveyor/install.ps1 deleted file mode 100644 index aa65cd42..00000000 --- a/appveyor/install.ps1 +++ /dev/null @@ -1,71 +0,0 @@ -# Sample script to install anaconda under windows -# Authors: Stuart Mumford -# Borrwed from: Olivier Grisel and Kyle Kastner -# License: BSD 3 clause - -$MINICONDA_URL = "http://repo.continuum.io/miniconda/" - -function DownloadMiniconda ($miniconda_version, $platform_suffix) { - $webclient = New-Object System.Net.WebClient - $filename = "Miniconda" + $miniconda_version + "-latest" + "-Windows-" + $platform_suffix + ".exe" - - $url = $MINICONDA_URL + $filename - - $basedir = $pwd.Path + "\" - $filepath = $basedir + $filename - if (Test-Path $filename) { - Write-Host "Reusing" $filepath - return $filepath - } - - # Download and retry up to 3 times in case of network transient errors. - Write-Host "Downloading" $filename "from" $url - $retry_attempts = 2 - for($i=0; $i -lt $retry_attempts; $i++){ - try { - $webclient.DownloadFile($url, $filepath) - break - } - Catch [Exception]{ - Start-Sleep 1 - } - } - if (Test-Path $filepath) { - Write-Host "File saved at" $filepath - } else { - # Retry once to get the error message if any at the last try - $webclient.DownloadFile($url, $filepath) - } - return $filepath -} - -function InstallMiniconda ($miniconda_version, $architecture, $python_home) { - Write-Host "Installing miniconda" $miniconda_version "for" $architecture "bit architecture to" $python_home - if (Test-Path $python_home) { - Write-Host $python_home "already exists, skipping." - return $false - } - if ($architecture -eq "32") { - $platform_suffix = "x86" - } else { - $platform_suffix = "x86_64" - } - $filepath = DownloadMiniconda $miniconda_version $platform_suffix - Write-Host "Installing" $filepath "to" $python_home - $args = "/InstallationType=AllUsers /S /AddToPath=1 /RegisterPython=1 /D=" + $python_home - Write-Host $filepath $args - Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru - #Start-Sleep -s 15 - if (Test-Path $python_home) { - Write-Host "Miniconda $miniconda_version ($architecture) installation complete" - } else { - Write-Host "Failed to install Python in $python_home" - Exit 1 - } -} - -function main () { - InstallMiniconda $env:MINICONDA_VERSION $env:PYTHON_ARCH $env:PYTHON -} - -main diff --git a/appveyor/run_with_compiler.cmd b/appveyor/run_with_compiler.cmd deleted file mode 100644 index 3b39e662..00000000 --- a/appveyor/run_with_compiler.cmd +++ /dev/null @@ -1,60 +0,0 @@ -:: To build extensions for 64 bit Python 3, we need to configure environment -:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1) -:: -:: To build extensions for 64 bit Python 2, we need to configure environment -:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0) -:: -:: 32 bit builds do not require specific environment configurations. -:: -:: Note: this script needs to be run with the /E:ON and /V:ON flags for the -:: cmd interpreter, at least for (SDK v7.0) -:: -:: More details at: -:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows -:: http://stackoverflow.com/a/13751649/163740 -:: -:: Author: Olivier Grisel -:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ -@ECHO OFF - -SET COMMAND_TO_RUN=%* -SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows - -SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%" -SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1% -IF %MAJOR_PYTHON_VERSION% == "2" ( - SET WINDOWS_SDK_VERSION="v7.0" - SET SET_SDK_64=Y -) ELSE IF %MAJOR_PYTHON_VERSION% == "3" ( - SET WINDOWS_SDK_VERSION="v7.1" - IF %MINOR_PYTHON_VERSION% LEQ 4 ( - SET SET_SDK_64=Y - ) ELSE ( - SET SET_SDK_64=N - ) -) ELSE ( - ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" - EXIT 1 -) - -IF "%PYTHON_ARCH%"=="64" ( - IF %SET_SDK_64% == Y ( - ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture - SET DISTUTILS_USE_SDK=1 - SET MSSdk=1 - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 - ) ELSE ( - ECHO Using default MSVC build environment for 64 bit architecture - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 - ) - ) ELSE ( - ECHO Using default MSVC build environment for 32 bit architecture - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 -) diff --git a/compare2rsrfiles.py b/compare2rsrfiles.py deleted file mode 100644 index a2de2a0a..00000000 --- a/compare2rsrfiles.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# Copyright (c) 2017 Adam.Dybbroe - -# Author(s): - -# Adam.Dybbroe - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -"""Compare the content of two hdf5 files with rsr data -""" - -import pdb -import numpy as np -from pyspectral.rsr_reader import RelativeSpectralResponse - -#FILE1 = '/home/a000680/data/pyspectral/rsr_viirs_Suomi-NPP.h5' -#FILE2 = '/home/a000680/data/pyspectral/BACKUP_rsr_viirs_Suomi-NPP.h5' -FILE1 = "/home/a000680/data/pyspectral/OLDrsr_ahi_Himawari-8.h5" -FILE2 = "/home/a000680/data/pyspectral/rsr_ahi_Himawari-8.h5" - -rsr_a = RelativeSpectralResponse(filename=FILE1) -rsr_b = RelativeSpectralResponse(filename=FILE2) - -for band in rsr_a.rsr: - for det in rsr_a.rsr[band]: - wvl1 = rsr_a.rsr[band][det]['wavelength'] - wvl2 = rsr_b.rsr[band][det]['wavelength'] - try: - if not np.allclose(wvl1, wvl2): - pdb.set_trace() - except ValueError: - pdb.set_trace() - resp1 = rsr_a.rsr[band][det]['response'] - resp2 = rsr_b.rsr[band][det]['response'] - try: - if not np.allclose(resp1, resp2): - pdb.set_trace() - except ValueError: - pdb.set_trace() - cw1 = rsr_a.rsr[band][det]['central_wavelength'] - cw2 = rsr_b.rsr[band][det]['central_wavelength'] - if np.abs(cw1 - cw2) > 0.00001: - pdb.set_trace() diff --git a/doc/conf.py b/doc/conf.py index fa5b78bd..f9a744e6 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -106,7 +106,7 @@ def __getattr__(cls, name): # General information about the project. project = u'Pyspectral' -copyright = u'2013-2018, PyTroll' +copyright = u'2013-2021, Pytroll' # The language for content autogenerated by Sphinx. Refer to documentation diff --git a/doc/index.rst b/doc/index.rst index ef1f03fb..0ff2690b 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,4 +1,4 @@ -.. Pyspectral documentation master file, created by +.. Pyspectral documentation main file, created by sphinx-quickstart on Tue Oct 15 13:31:45 2013. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. diff --git a/pyspectral/near_infrared_reflectance.py b/pyspectral/near_infrared_reflectance.py index 8dfe9101..be98980f 100644 --- a/pyspectral/near_infrared_reflectance.py +++ b/pyspectral/near_infrared_reflectance.py @@ -33,9 +33,9 @@ import logging import numpy as np try: - from dask.array import where, logical_or, asanyarray, array, isnan + from dask.array import where, logical_or, asanyarray, isnan except ImportError: - from numpy import where, logical_or, asanyarray, array, isnan + from numpy import where, logical_or, asanyarray, isnan from pyspectral.solar import (SolarIrradianceSpectrum, TOTAL_IRRADIANCE_SPECTRUM_2000ASTM) diff --git a/pyspectral/rayleigh.py b/pyspectral/rayleigh.py index 6870d825..d90e4019 100644 --- a/pyspectral/rayleigh.py +++ b/pyspectral/rayleigh.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# Copyright (c) 2016-2020 Pytroll developers +# Copyright (c) 2016-2021 Pytroll developers # # Author(s): # @@ -65,6 +65,7 @@ class BandFrequencyOutOfRange(ValueError): """Exception when the band frequency is out of the visible range.""" + pass @@ -184,7 +185,7 @@ def get_effective_wavelength(self, bandname): """Get the effective wavelength with Rayleigh scattering in mind.""" try: rsr = RelativeSpectralResponse(self.platform_name, self.sensor) - except(IOError, OSError): + except OSError: LOG.exception( "No spectral responses for this platform and sensor: %s %s", self.platform_name, self.sensor) if isinstance(bandname, (float, integer_types)): @@ -215,12 +216,13 @@ def get_effective_wavelength(self, bandname): def get_reflectance_lut(self): """Get reflectance LUT. - Read the LUT with reflectances as a function of wavelength, satellite zenith + If not already cached (read previously) read the file with Look-Up + Tables of reflectances as a function of wavelength, satellite zenith secant, azimuth difference angle, and sun zenith secant. """ if self._rayl is None: - lut_vars = get_reflectance_lut(self.reflectance_lut_filename) + lut_vars = get_reflectance_lut_from_file(self.reflectance_lut_filename) self._rayl = lut_vars[0] self._wvl_coord = lut_vars[1] self._azid_coord = lut_vars[2] @@ -322,12 +324,12 @@ def get_reflectance(self, sun_zenith, sat_zenith, azidiff, bandname, redband=Non return res -def get_reflectance_lut(filename): - """ - Get reflectance LUT. +def get_reflectance_lut_from_file(filename): + """Get reflectance LUT. - Read the LUT with reflectances as a function of wavelength, satellite - zenith secant, azimuth difference angle, and sun zenith secant + Read the Look-Up Tables from file with reflectances as a function of + wavelength, satellite zenith secant, azimuth difference angle, and sun + zenith secant """ h5f = h5py.File(filename, 'r') diff --git a/pyspectral/tests/test_rayleigh.py b/pyspectral/tests/test_rayleigh.py index 8ee9b2c9..08980d86 100644 --- a/pyspectral/tests/test_rayleigh.py +++ b/pyspectral/tests/test_rayleigh.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# Copyright (c) 2016-2019 Pytroll developers +# Copyright (c) 2016-2019, 2021 Pytroll developers # # Author(s): # @@ -166,11 +166,11 @@ def test_rayleigh_init(self, download_luts, exists): @patch('pyspectral.rayleigh.HAVE_DASK', False) @patch('os.path.exists') @patch('pyspectral.utils.download_luts') - @patch('pyspectral.rayleigh.get_reflectance_lut') + @patch('pyspectral.rayleigh.get_reflectance_lut_from_file') @patch('pyspectral.rsr_reader.RelativeSpectralResponse._get_rsr_data_version') @patch('pyspectral.rayleigh.Rayleigh.get_effective_wavelength') def test_get_reflectance(self, get_effective_wvl, - get_rsr_version, get_reflectance_lut, download_luts, exists): + get_rsr_version, get_reflectance_lut_from_file, download_luts, exists): """Test getting the reflectance correction.""" rayl = TEST_RAYLEIGH_LUT wvl_coord = TEST_RAYLEIGH_WVL_COORD @@ -178,8 +178,8 @@ def test_get_reflectance(self, get_effective_wvl, sunz_sec_coord = TEST_RAYLEIGH_SUNZ_COORD satz_sec_coord = TEST_RAYLEIGH_SATZ_COORD - get_reflectance_lut.return_value = (rayl, wvl_coord, azid_coord, - satz_sec_coord, sunz_sec_coord) + get_reflectance_lut_from_file.return_value = (rayl, wvl_coord, azid_coord, + satz_sec_coord, sunz_sec_coord) download_luts.return_code = None exists.return_code = True get_rsr_version.return_code = RSR_DATA_VERSION @@ -203,25 +203,24 @@ def test_get_reflectance(self, get_effective_wvl, @patch('os.path.exists') @patch('pyspectral.utils.download_luts') - @patch('pyspectral.rayleigh.get_reflectance_lut') + @patch('pyspectral.rayleigh.get_reflectance_lut_from_file') @patch('pyspectral.rsr_reader.RelativeSpectralResponse.' '_get_rsr_data_version') @patch('pyspectral.rayleigh.Rayleigh.get_effective_wavelength') def test_get_reflectance_dask(self, get_effective_wvl, - get_rsr_version, get_reflectance_lut, + get_rsr_version, get_reflectance_lut_from_file, download_luts, exists): """Test getting the reflectance correction with dask inputs.""" rayl = da.from_array(TEST_RAYLEIGH_LUT, chunks=(10, 10, 10, 10)) - wvl_coord = da.from_array(TEST_RAYLEIGH_WVL_COORD, - chunks=(100,)).persist() + wvl_coord = TEST_RAYLEIGH_WVL_COORD azid_coord = da.from_array(TEST_RAYLEIGH_AZID_COORD, chunks=(1000,)) sunz_sec_coord = da.from_array(TEST_RAYLEIGH_SUNZ_COORD, chunks=(1000,)) satz_sec_coord = da.from_array(TEST_RAYLEIGH_SATZ_COORD, chunks=(1000,)) - get_reflectance_lut.return_value = (rayl, wvl_coord, azid_coord, - satz_sec_coord, sunz_sec_coord) + get_reflectance_lut_from_file.return_value = (rayl, wvl_coord, azid_coord, + satz_sec_coord, sunz_sec_coord) download_luts.return_code = None exists.return_code = True get_rsr_version.return_code = RSR_DATA_VERSION @@ -245,25 +244,24 @@ def test_get_reflectance_dask(self, get_effective_wvl, @patch('os.path.exists') @patch('pyspectral.utils.download_luts') - @patch('pyspectral.rayleigh.get_reflectance_lut') + @patch('pyspectral.rayleigh.get_reflectance_lut_from_file') @patch('pyspectral.rsr_reader.RelativeSpectralResponse.' '_get_rsr_data_version') @patch('pyspectral.rayleigh.Rayleigh.get_effective_wavelength') def test_get_reflectance_numpy_dask(self, get_effective_wvl, - get_rsr_version, get_reflectance_lut, + get_rsr_version, get_reflectance_lut_from_file, download_luts, exists): """Test getting the reflectance correction with dask inputs.""" rayl = da.from_array(TEST_RAYLEIGH_LUT, chunks=(10, 10, 10, 10)) - wvl_coord = da.from_array(TEST_RAYLEIGH_WVL_COORD, - chunks=(100,)).persist() + wvl_coord = TEST_RAYLEIGH_WVL_COORD azid_coord = da.from_array(TEST_RAYLEIGH_AZID_COORD, chunks=(1000,)) sunz_sec_coord = da.from_array(TEST_RAYLEIGH_SUNZ_COORD, chunks=(1000,)) satz_sec_coord = da.from_array(TEST_RAYLEIGH_SATZ_COORD, chunks=(1000,)) - get_reflectance_lut.return_value = (rayl, wvl_coord, azid_coord, - satz_sec_coord, sunz_sec_coord) + get_reflectance_lut_from_file.return_value = (rayl, wvl_coord, azid_coord, + satz_sec_coord, sunz_sec_coord) download_luts.return_code = None exists.return_code = True get_rsr_version.return_code = RSR_DATA_VERSION @@ -288,8 +286,8 @@ def test_get_reflectance_numpy_dask(self, get_effective_wvl, @patch('pyspectral.rayleigh.HAVE_DASK', False) @patch('os.path.exists') @patch('pyspectral.utils.download_luts') - @patch('pyspectral.rayleigh.get_reflectance_lut') - def test_get_reflectance_no_rsr(self, get_reflectance_lut, download_luts, exists): + @patch('pyspectral.rayleigh.get_reflectance_lut_from_file') + def test_get_reflectance_no_rsr(self, get_reflectance_lut_from_file, download_luts, exists): """Test getting the reflectance correction, simulating that we have no RSR data.""" rayl = TEST_RAYLEIGH_LUT wvl_coord = TEST_RAYLEIGH_WVL_COORD @@ -297,8 +295,8 @@ def test_get_reflectance_no_rsr(self, get_reflectance_lut, download_luts, exists sunz_sec_coord = TEST_RAYLEIGH_SUNZ_COORD satz_sec_coord = TEST_RAYLEIGH_SATZ_COORD - get_reflectance_lut.return_value = (rayl, wvl_coord, azid_coord, - satz_sec_coord, sunz_sec_coord) + get_reflectance_lut_from_file.return_value = (rayl, wvl_coord, azid_coord, + satz_sec_coord, sunz_sec_coord) download_luts.return_code = None exists.return_code = True diff --git a/setup.py b/setup.py index cb4a0f0c..3d966da6 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (c) 2013-2020 Pytroll +# Copyright (c) 2013-2021 Pytroll # Author(s): @@ -20,10 +20,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import sys -from setuptools import setup, find_packages -import os.path +"""Setup for the Pyspectral package.""" +import os.path +from setuptools import setup, find_packages try: # HACK: https://github.com/pypa/setuptools_scm/issues/190#issuecomment-351181286 @@ -50,14 +50,6 @@ dask_extra = ['dask[array]'] test_requires = ['pyyaml', 'dask[array]', 'xlrd', 'pytest', 'xarray'] -if sys.version < '3.0': - test_requires.append('mock') - try: - # This is needed in order to let the unittests pass - # without complaining at the end on certain systems - import multiprocessing - except ImportError: - pass NAME = 'pyspectral'