diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c9280b02d8e78919d3025bf5b0e9f0a0ddda5706..e6fe6598640321a8250e5fce9d5b035e76ccb79f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,7 +24,7 @@ test: - git submodule update --init --recursive - conda env update -f environment.yml -n earthdiagnostics3 python=3.7 - source activate earthdiagnostics3 - - pip install . + - pip install .[develop] - python setup.py test report_codacy: diff --git a/VERSION b/VERSION index 1795fa298afa13cb5ecd1d8e3d594da6cc9abefc..94ff29cc4de4fe0be04331a1eb51f5c515b728a9 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1 @@ 3.1.1 - diff --git a/setup.py b/setup.py index 735932bf8131a9c3d4a4a0b05748acf2c868cdd8..44c44346cb561aaaf6e4db468ce7eb1b7a385e6a 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,7 @@ here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'VERSION')) as f: version = f.read().strip() + class RunTests(Command): """Class to run tests and generate reports.""" @@ -45,40 +46,54 @@ class RunTests(Command): errno = pytest.main(args) sys.exit(errno) -setup( - name='earthdiagnostics', - license='GNU GPL v3', - platforms=['GNU/Linux Debian'], - version=version, - description='EarthDiagnostics', - author='BSC-CNS Earth Sciences Department', - author_email='javier.vegas@bsc.es', - url='http://www.bsc.es/projects/earthsciences/autosubmit/', - keywords=['climate', 'weather', 'diagnostic'], - setup_requires=['pyproj'], - install_requires=[ + +REQUIREMENTS = { + 'setup': [ + 'pyproj', + ], + 'install': [ 'bscearth.utils', 'cdo>=1.3.4', 'cfgrib', - 'coverage', 'dask[array]', + 'diagonals', 'exrex', - 'mock', 'netCDF4', 'nco>=0.0.3', 'numba', 'numpy', 'psutil', 'openpyxl', - 'pycodestyle', - 'pytest', - 'pytest-cov', - 'pytest-html', 'scitools-iris>=2.2', 'six', 'xxhash', - 'diagonals' ], + 'test': [ + 'coverage', + 'mock', + 'pycodestyle', + 'pytest', + 'pytest-cov', + 'pytest-html', + ] +} + +setup( + name='earthdiagnostics', + license='GNU GPL v3', + platforms=['GNU/Linux Debian'], + version=version, + description='EarthDiagnostics', + author='BSC-CNS Earth Sciences Department', + author_email='javier.vegas@bsc.es', + url='http://www.bsc.es/projects/earthsciences/autosubmit/', + keywords=['climate', 'weather', 'diagnostic'], + setup_requires=REQUIREMENTS['setup'], + install_requires=REQUIREMENTS['install'], + test_requires=REQUIREMENTS['test'], + extras_require={ + 'develop': REQUIREMENTS['test'], + }, packages=find_packages(), include_package_data=True, scripts=['bin/earthdiags'], @@ -86,4 +101,3 @@ setup( 'test': RunTests, }, ) -