diff --git a/.github/workflows/build_workflow.yml b/.github/workflows/build_workflow.yml new file mode 100644 index 0000000..5aa7125 --- /dev/null +++ b/.github/workflows/build_workflow.yml @@ -0,0 +1,98 @@ +name: CI/CD Build Workflow + +on: + push: + branches: [main] + + pull_request: + branches: [main] + + workflow_dispatch: + +env: + CANCEL_OTHERS: true + PATHS_IGNORE: '["**/README.md", "**/docs/**", "**/examples/**"]' + +jobs: + pre-commit-hooks: + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: ${{ env.CANCEL_OTHERS }} + paths_ignore: ${{ env.PATHS_IGNORE }} + + - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + name: Checkout Code Repository + uses: actions/checkout@v3 + + - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + + - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + # Run all pre-commit hooks on all the files. + # Getting only staged files can be tricky in case a new PR is opened + # since the action is run on a branch in detached head state + name: Install and Run Pre-commit + uses: pre-commit/action@v3.0.0 + + build: + name: Build (Python ${{ matrix.python-version }}) + runs-on: "ubuntu-latest" + timeout-minutes: 20 + defaults: + run: + shell: bash -l {0} + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11"] + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: ${{ env.CANCEL_OTHERS }} + paths_ignore: ${{ env.PATHS_IGNORE }} + + - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + uses: actions/checkout@v3 + + - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + name: Cache Conda + uses: actions/cache@v3 + env: + # Increase this value to reset cache if conda-env/ci.yml has not changed in the workflow + CACHE_NUMBER: 0 + with: + path: ~/conda_pkgs_dir + key: + ${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{ + hashFiles('conda-env/dev.yml') }} + + - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + name: Set up Conda Environment + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: "pyremap_ci" + channel-priority: strict + auto-update-conda: true + # IMPORTANT: This needs to be set for caching to work properly! + use-only-tar-bz2: true + python-version: ${{ matrix.python-version }} + run: mamba install --file dev-spec.txt + + + - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + name: Install pyremap + run: python -m pip install . + + - if: ${{ steps.skip_check.outputs.should_skip != 'true' }} + name: Run Tests + env: + CHECK_IMAGES: False + run: pytest --pyargs pyremap + diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 78a2172..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Lint - -on: - pull_request: - branches: [main] - paths: - - '**.py' - -jobs: - lint: - name: Python Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Run flake8 - uses: julianwachholz/flake8-action@v2 - with: - checkName: "Python Lint" - path: pyremap - config: flake8.cfg - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..7c65bf1 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,27 @@ +exclude: "docs|ci|.git|examples|licenses|conda/meta.yaml" +default_stages: [commit] +fail_fast: true + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + + # Can run individually with `pre-commit run isort --all-files` + - repo: https://github.com/PyCQA/isort + rev: 5.12.0 + hooks: + - id: isort + + # Can run individually with `pre-commit run flake8 --all-files` + # Need to use flake8 GitHub mirror due to CentOS git issue with GitLab + # https://github.com/pre-commit/pre-commit/issues/1206 + - repo: https://github.com/pycqa/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + args: ["--config=setup.cfg"] + additional_dependencies: [flake8-isort] diff --git a/dev-spec.txt b/dev-spec.txt index aa5091d..f7a2deb 100644 --- a/dev-spec.txt +++ b/dev-spec.txt @@ -15,6 +15,9 @@ xarray >=0.10.0 # Development pip pytest +isort +flake8 +pre-commit # Documentation mock diff --git a/flake8.cfg b/flake8.cfg deleted file mode 100644 index 8b13789..0000000 --- a/flake8.cfg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/pyremap/__init__.py b/pyremap/__init__.py index 4da2fdd..7031327 100644 --- a/pyremap/__init__.py +++ b/pyremap/__init__.py @@ -1,10 +1,14 @@ -from pyremap.descriptor import MpasMeshDescriptor, MpasEdgeMeshDescriptor,\ - LatLonGridDescriptor, LatLon2DGridDescriptor, ProjectionGridDescriptor, \ - PointCollectionDescriptor, get_lat_lon_descriptor - +from pyremap.descriptor import ( + LatLon2DGridDescriptor, + LatLonGridDescriptor, + MpasEdgeMeshDescriptor, + MpasMeshDescriptor, + PointCollectionDescriptor, + ProjectionGridDescriptor, + get_lat_lon_descriptor, +) +from pyremap.polar import get_polar_descriptor, get_polar_descriptor_from_file from pyremap.remapper import Remapper -from pyremap.polar import get_polar_descriptor_from_file, get_polar_descriptor - __version_info__ = (0, 0, 15) __version__ = '.'.join(str(vi) for vi in __version_info__) diff --git a/pyremap/descriptor/__init__.py b/pyremap/descriptor/__init__.py index 67b2ef5..b30c3fd 100644 --- a/pyremap/descriptor/__init__.py +++ b/pyremap/descriptor/__init__.py @@ -9,17 +9,23 @@ # distributed with this code, or at # https://raw.githubusercontent.com/MPAS-Dev/pyremap/main/LICENSE +from pyremap.descriptor.lat_lon_2d_grid_descriptor import ( + LatLon2DGridDescriptor, +) +from pyremap.descriptor.lat_lon_grid_descriptor import ( + LatLonGridDescriptor, + get_lat_lon_descriptor, +) from pyremap.descriptor.mesh_descriptor import MeshDescriptor +from pyremap.descriptor.mpas_edge_mesh_descriptor import MpasEdgeMeshDescriptor from pyremap.descriptor.mpas_mesh_descriptor import MpasMeshDescriptor -from pyremap.descriptor.mpas_edge_mesh_descriptor import \ - MpasEdgeMeshDescriptor -from pyremap.descriptor.lat_lon_grid_descriptor import LatLonGridDescriptor, \ - get_lat_lon_descriptor -from pyremap.descriptor.lat_lon_2d_grid_descriptor import \ - LatLon2DGridDescriptor -from pyremap.descriptor.projection_grid_descriptor import \ - ProjectionGridDescriptor -from pyremap.descriptor.point_collection_descriptor import \ - PointCollectionDescriptor -from pyremap.descriptor.utility import interp_extrap_corner, \ - interp_extrap_corners_2d +from pyremap.descriptor.point_collection_descriptor import ( + PointCollectionDescriptor, +) +from pyremap.descriptor.projection_grid_descriptor import ( + ProjectionGridDescriptor, +) +from pyremap.descriptor.utility import ( + interp_extrap_corner, + interp_extrap_corners_2d, +) diff --git a/pyremap/descriptor/lat_lon_2d_grid_descriptor.py b/pyremap/descriptor/lat_lon_2d_grid_descriptor.py index 9e23fc3..579db40 100644 --- a/pyremap/descriptor/lat_lon_2d_grid_descriptor.py +++ b/pyremap/descriptor/lat_lon_2d_grid_descriptor.py @@ -9,14 +9,19 @@ # distributed with this code, or at # https://raw.githubusercontent.com/MPAS-Dev/pyremap/main/LICENSE +import sys + import netCDF4 import numpy -import sys import xarray from pyremap.descriptor.mesh_descriptor import MeshDescriptor -from pyremap.descriptor.utility import interp_extrap_corners_2d, \ - create_scrip, unwrap_corners, round_res +from pyremap.descriptor.utility import ( + create_scrip, + interp_extrap_corners_2d, + round_res, + unwrap_corners, +) class LatLon2DGridDescriptor(MeshDescriptor): diff --git a/pyremap/descriptor/lat_lon_grid_descriptor.py b/pyremap/descriptor/lat_lon_grid_descriptor.py index a52a866..39dcc29 100644 --- a/pyremap/descriptor/lat_lon_grid_descriptor.py +++ b/pyremap/descriptor/lat_lon_grid_descriptor.py @@ -9,14 +9,19 @@ # distributed with this code, or at # https://raw.githubusercontent.com/MPAS-Dev/pyremap/main/LICENSE +import sys + import netCDF4 import numpy -import sys import xarray from pyremap.descriptor.mesh_descriptor import MeshDescriptor -from pyremap.descriptor.utility import interp_extrap_corner, \ - create_scrip, unwrap_corners, round_res +from pyremap.descriptor.utility import ( + create_scrip, + interp_extrap_corner, + round_res, + unwrap_corners, +) def get_lat_lon_descriptor(dLon, dLat, lonMin=-180., lonMax=180., latMin=-90., diff --git a/pyremap/descriptor/mesh_descriptor.py b/pyremap/descriptor/mesh_descriptor.py index d4d8ec6..25d6c47 100644 --- a/pyremap/descriptor/mesh_descriptor.py +++ b/pyremap/descriptor/mesh_descriptor.py @@ -61,7 +61,8 @@ def to_scrip(self, scripFileName): scripFileName : str The path to which the SCRIP file should be written """ - raise NotImplemented('to_scrip is not implemented for this descriptor') + raise NotImplementedError( + 'to_scrip is not implemented for this descriptor') def to_esmf(self, esmfFileName): """ @@ -73,4 +74,5 @@ def to_esmf(self, esmfFileName): esmfFileName : str The path to which the ESMF mesh file should be written """ - raise NotImplemented('to_esmf is not implemented for this descriptor') + raise NotImplementedError( + 'to_esmf is not implemented for this descriptor') diff --git a/pyremap/descriptor/mpas_edge_mesh_descriptor.py b/pyremap/descriptor/mpas_edge_mesh_descriptor.py index 3d9e157..58e92ee 100644 --- a/pyremap/descriptor/mpas_edge_mesh_descriptor.py +++ b/pyremap/descriptor/mpas_edge_mesh_descriptor.py @@ -9,9 +9,10 @@ # distributed with this code, or at # https://raw.githubusercontent.com/MPAS-Dev/pyremap/main/LICENSE +import sys + import netCDF4 import numpy as np -import sys import xarray as xr from pyremap.descriptor.mesh_descriptor import MeshDescriptor @@ -104,7 +105,7 @@ def to_scrip(self, scripFileName): grid_area = outFile.createVariable('grid_area', 'f8', ('grid_size',)) grid_area.units = 'radian^2' # a triangle if there is 1 valid cell and a diamond if there are 2 - areaEdge = 0.5*validCellsOnEdge*dcEdge*dvEdge + areaEdge = 0.5 * validCellsOnEdge * dcEdge * dvEdge # SCRIP uses square radians grid_area[:] = areaEdge[:] / (sphereRadius**2) @@ -118,12 +119,12 @@ def to_scrip(self, scripFileName): grid_corner_lat = np.zeros((nEdges, 4)) # start by repeating vertices, since these always exist - vertices = verticesOnEdge[:, 0]-1 + vertices = verticesOnEdge[:, 0] - 1 grid_corner_lon[:, 0] = lonVertex[vertices] grid_corner_lat[:, 0] = latVertex[vertices] grid_corner_lon[:, 1] = lonVertex[vertices] grid_corner_lat[:, 1] = latVertex[vertices] - vertices = verticesOnEdge[:, 1]-1 + vertices = verticesOnEdge[:, 1] - 1 grid_corner_lon[:, 2] = lonVertex[vertices] grid_corner_lat[:, 2] = latVertex[vertices] grid_corner_lon[:, 3] = lonVertex[vertices] @@ -165,7 +166,7 @@ def to_esmf(self, esmfFileName): with xr.open_dataset(self.fileName) as ds: nCells = ds.sizes['nCells'] - nodeCount = nCells+ds.sizes['nVertices'] + nodeCount = nCells + ds.sizes['nVertices'] elementCount = ds.sizes['nEdges'] coordDim = 2 @@ -193,7 +194,7 @@ def to_esmf(self, esmfFileName): for vertex in range(3): # swap -1 value until they're at the end mask = elementConn[:, vertex] == -1 - elementConn[mask, vertex] = elementConn[mask, vertex+1] + elementConn[mask, vertex] = elementConn[mask, vertex + 1] elementConn[mask, vertex + 1] = -1 numElementConn = np.sum((elementConn != -1), axis=1).astype(np.byte) diff --git a/pyremap/descriptor/mpas_mesh_descriptor.py b/pyremap/descriptor/mpas_mesh_descriptor.py index ec98c4b..ad803d5 100644 --- a/pyremap/descriptor/mpas_mesh_descriptor.py +++ b/pyremap/descriptor/mpas_mesh_descriptor.py @@ -9,9 +9,10 @@ # distributed with this code, or at # https://raw.githubusercontent.com/MPAS-Dev/pyremap/main/LICENSE +import sys + import netCDF4 import numpy -import sys import xarray from pyremap.descriptor.mesh_descriptor import MeshDescriptor diff --git a/pyremap/descriptor/point_collection_descriptor.py b/pyremap/descriptor/point_collection_descriptor.py index 655169b..c463020 100644 --- a/pyremap/descriptor/point_collection_descriptor.py +++ b/pyremap/descriptor/point_collection_descriptor.py @@ -9,9 +9,10 @@ # distributed with this code, or at # https://raw.githubusercontent.com/MPAS-Dev/pyremap/main/LICENSE +import sys + import netCDF4 import numpy -import sys import xarray from pyremap.descriptor.mesh_descriptor import MeshDescriptor @@ -129,7 +130,7 @@ def to_esmf(self, esmfFileName): nPoints = len(self.lat) elementCount = nPoints - nodeCount = 3*nPoints + nodeCount = 3 * nPoints coordDim = 2 maxNodePElement = 3 diff --git a/pyremap/descriptor/projection_grid_descriptor.py b/pyremap/descriptor/projection_grid_descriptor.py index efae2b8..7c9c1f1 100644 --- a/pyremap/descriptor/projection_grid_descriptor.py +++ b/pyremap/descriptor/projection_grid_descriptor.py @@ -9,15 +9,19 @@ # distributed with this code, or at # https://raw.githubusercontent.com/MPAS-Dev/pyremap/main/LICENSE +import sys + import netCDF4 import numpy -import sys import pyproj import xarray from pyremap.descriptor.mesh_descriptor import MeshDescriptor -from pyremap.descriptor.utility import interp_extrap_corner, \ - create_scrip, unwrap_corners +from pyremap.descriptor.utility import ( + create_scrip, + interp_extrap_corner, + unwrap_corners, +) class ProjectionGridDescriptor(MeshDescriptor): diff --git a/pyremap/descriptor/utility.py b/pyremap/descriptor/utility.py index 6c0b6b4..5a277d7 100644 --- a/pyremap/descriptor/utility.py +++ b/pyremap/descriptor/utility.py @@ -108,5 +108,5 @@ def unwrap_corners(inField): def round_res(res): """Round the resoltuion to a reasonable number for grid names""" - rounded = numpy.round(res*1000.)/1000. + rounded = numpy.round(res * 1000.) / 1000. return '{}'.format(rounded) diff --git a/pyremap/polar.py b/pyremap/polar.py index 3369fb0..619b3f1 100644 --- a/pyremap/polar.py +++ b/pyremap/polar.py @@ -8,9 +8,9 @@ # Additional copyright and license information can be found in the LICENSE file # distributed with this code, or at # https://raw.githubusercontent.com/MPAS-Dev/pyremap/main/LICENSE +import numpy import pyproj import xarray -import numpy from pyremap.descriptor import ProjectionGridDescriptor @@ -66,9 +66,9 @@ def get_polar_descriptor_from_file(fileName, projection='antarctic'): dsIn = xarray.open_dataset(fileName) x = dsIn.x.values y = dsIn.y.values - dx = int((x[1]-x[0])/1000.) - Lx = int((x[-1] - x[0])/1000.) - Ly = int((y[-1] - y[0])/1000.) + dx = int((x[1] - x[0]) / 1000.) + Lx = int((x[-1] - x[0]) / 1000.) + Ly = int((y[-1] - y[0]) / 1000.) meshName = '{}x{}km_{}km_Antarctic_stereo'.format(Lx, Ly, dx) diff --git a/pyremap/remapper.py b/pyremap/remapper.py index 4031ae0..b50430f 100644 --- a/pyremap/remapper.py +++ b/pyremap/remapper.py @@ -8,35 +8,28 @@ # Additional copyright and license information can be found in the LICENSE file # distributed with this code, or at # https://raw.githubusercontent.com/MPAS-Dev/pyremap/main/LICENSE -""" -Functions for performing interpolation -Functions ---------- -build_remap_weights - constructs a mapping file containing the indices and - weights needed to perform horizontal interpolation - -remap - perform horizontal interpolation on a data sets, given a mapping file -""" -# Authors -# ------- -# Xylar Asay-Davis - -import subprocess -from tempfile import TemporaryDirectory +import json import os +import subprocess +import sys +import warnings from distutils.spawn import find_executable +from subprocess import check_output +from tempfile import TemporaryDirectory + import numpy -from scipy.sparse import csr_matrix import xarray as xr -import sys -from subprocess import check_output -import json -import warnings +from scipy.sparse import csr_matrix -from pyremap.descriptor import MpasMeshDescriptor, MpasEdgeMeshDescriptor, \ - LatLonGridDescriptor, LatLon2DGridDescriptor, ProjectionGridDescriptor, \ - PointCollectionDescriptor +from pyremap.descriptor import ( + LatLon2DGridDescriptor, + LatLonGridDescriptor, + MpasEdgeMeshDescriptor, + MpasMeshDescriptor, + PointCollectionDescriptor, + ProjectionGridDescriptor, +) class Remapper(object): @@ -50,7 +43,7 @@ class Remapper(object): # Xylar Asay-Davis def __init__(self, sourceDescriptor, destinationDescriptor, - mappingFileName=None): # {{{ + mappingFileName=None): """ Create the remapper and read weights and indices from the given file for later used in remapping fields. @@ -100,12 +93,10 @@ def __init__(self, sourceDescriptor, destinationDescriptor, self.mappingLoaded = False - # }}} - - def build_mapping_file(self, method='bilinear', additionalArgs=None, - logger=None, mpiTasks=1, tempdir=None, - esmf_path=None, esmf_parallel_exec=None, - extrap_method=None): # {{{ + def build_mapping_file(self, method='bilinear', # noqa: C901 + additionalArgs=None, logger=None, mpiTasks=1, + tempdir=None, esmf_path=None, + esmf_parallel_exec=None, extrap_method=None): """ Given a source file defining either an MPAS mesh or a lat-lon grid and a destination file or set of arrays defining a lat-lon grid, constructs @@ -333,11 +324,9 @@ def build_mapping_file(self, method='bilinear', additionalArgs=None, if tempobj is not None: tempobj.cleanup() - # }}} - - def remap_file(self, inFileName, outFileName, variableList=None, - overwrite=False, renormalize=None, logger=None, - replaceMpasFill=False, parallel_exec=None): # {{{ + def remap_file(self, inFileName, outFileName, # noqa: C901 + variableList=None, overwrite=False, renormalize=None, + logger=None, replaceMpasFill=False, parallel_exec=None): """ Given a source file defining either an MPAS mesh or a lat-lon grid and a destination file or set of arrays defining a lat-lon grid, constructs @@ -515,9 +504,8 @@ def remap_file(self, inFileName, outFileName, variableList=None, if process.returncode != 0: raise subprocess.CalledProcessError(process.returncode, ' '.join(args)) - # }}} - def remap(self, ds, renormalizationThreshold=None): # {{{ + def remap(self, ds, renormalizationThreshold=None): """ Given a source data set, returns a remapped version of the data set, possibly masked and renormalized. @@ -591,9 +579,9 @@ def remap(self, ds, renormalizationThreshold=None): # {{{ remappedDs.attrs['meshName'] = self.destinationDescriptor.meshName - return remappedDs # }}} + return remappedDs - def _load_mapping(self): # {{{ + def _load_mapping(self): """ Load weights and indices from a mapping file, if this has not already been done @@ -654,17 +642,17 @@ def _load_mapping(self): # {{{ S = dsMapping['S'].values self.matrix = csr_matrix((S, (row, col)), shape=(n_b, n_a)) - self.mappingLoaded = True # }}} + self.mappingLoaded = True - def _check_drop(self, dataArray): # {{{ + def _check_drop(self, dataArray): sourceDims = self.sourceDescriptor.dims sourceDimsInArray = [dim in dataArray.dims for dim in sourceDims] return (numpy.any(sourceDimsInArray) and not - numpy.all(sourceDimsInArray)) # }}} + numpy.all(sourceDimsInArray)) - def _remap_data_array(self, dataArray, renormalizationThreshold): # {{{ + def _remap_data_array(self, dataArray, renormalizationThreshold): """ Remap a single xarray data array """ @@ -731,10 +719,10 @@ def _remap_data_array(self, dataArray, renormalizationThreshold): # {{{ # make a new data array remappedArray = xr.DataArray.from_dict(arrayDict) - return remappedArray # }}} + return remappedArray def _remap_numpy_array(self, inField, remapAxes, - renormalizationThreshold): # {{{ + renormalizationThreshold): """ Remap a single numpy array """ @@ -796,7 +784,7 @@ def _remap_numpy_array(self, inField, remapAxes, unpermuteAxes[index:]) outField = numpy.transpose(outField, axes=unpermuteAxes) - return outField # }}} + return outField def _print_running(args, fn): @@ -806,5 +794,3 @@ def _print_running(args, fn): arg = '"{}"'.format(arg) print_args.append(arg) fn('running: {}'.format(' '.join(print_args))) - -# vim: ai ts=4 sts=4 et sw=4 ft=python diff --git a/pyremap/test/__init__.py b/pyremap/test/__init__.py index 279c589..59904b4 100644 --- a/pyremap/test/__init__.py +++ b/pyremap/test/__init__.py @@ -15,14 +15,13 @@ 04/06/2017 """ +import os import warnings from contextlib import contextmanager - -import os from distutils import dir_util -from pytest import fixture import xarray +from pytest import fixture try: import unittest2 as unittest diff --git a/pyremap/test/test_interpolate.py b/pyremap/test/test_interpolate.py index 49ad3a4..8e101c1 100644 --- a/pyremap/test/test_interpolate.py +++ b/pyremap/test/test_interpolate.py @@ -15,17 +15,22 @@ 04/06/2017 ''' -import pytest -import shutil import os +import shutil import tempfile + import numpy -import xarray import pyproj +import pytest +import xarray -from pyremap import Remapper, MpasMeshDescriptor, \ - LatLonGridDescriptor, ProjectionGridDescriptor -from pyremap.test import TestCase, loaddatadir +from pyremap import ( + LatLonGridDescriptor, + MpasMeshDescriptor, + ProjectionGridDescriptor, + Remapper, +) +from pyremap.test import TestCase, loaddatadir # noqa: F401 @pytest.mark.usefixtures('loaddatadir') diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..c93e2e9 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,34 @@ +[flake8] +# https://pep8.readthedocs.io/en/latest/intro.html#error-codes +ignore = + # line break after operator + W504 +# Max width of Github code review is 79 characters +max-line-length = 79 +max-complexity = 18 +per-file-ignores = + */__init__.py: F401 +exclude = + .git, + docs, + .idea, + .mypy_cache, + .pytest_cache, + +[isort] +multi_line_output=3 +include_trailing_comma=True +force_grid_wrap=0 +use_parentheses=True +line_length=79 +skip= + e3sm_diags/e3sm_diags_driver.py + +[pycodestyle] +max-line-length = 79 +exclude = + .git + docs + .idea + .mypy_cache + .pytest_cache diff --git a/setup.py b/setup.py index 9ae2b6b..b57c663 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ import os import re -from setuptools import setup, find_packages + +from setuptools import find_packages, setup install_requires = \ ['dask',