Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

absolufy-imports - Only in xarray folder #7370

Merged
merged 10 commits into from
Dec 9, 2022
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repos:
hooks:
- id: absolufy-imports
name: absolufy-imports
files: ^xarray/
# This wants to go before isort & flake8
- repo: https://github.com/PyCQA/autoflake
rev: "v2.0.0"
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/dataarray_missing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import pandas as pd

import xarray as xr
from asv_bench.benchmarks import parameterized, randn, requires_dask

from . import parameterized, randn, requires_dask


def make_bench_data(shape, frac_nan, chunks):
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/dataset_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import pandas as pd

import xarray as xr
from asv_bench.benchmarks import _skip_slow, randint, randn, requires_dask

from . import _skip_slow, randint, randn, requires_dask

try:
import dask
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import pandas as pd

import xarray as xr
from asv_bench.benchmarks import _skip_slow, parameterized, requires_dask

from . import _skip_slow, parameterized, requires_dask


class GroupBy:
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import pandas as pd

import xarray as xr
from asv_bench.benchmarks import parameterized, randint, randn, requires_dask

from . import parameterized, randint, randn, requires_dask

nx = 2000
ny = 1000
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/interp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import pandas as pd

import xarray as xr
from asv_bench.benchmarks import parameterized, randn, requires_dask

from . import parameterized, randn, requires_dask

nx = 1500
ny = 1000
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import pandas as pd

import xarray as xr
from asv_bench.benchmarks import parameterized

from . import parameterized


class MultiIndexSeries:
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/polyfit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import numpy as np

import xarray as xr
from asv_bench.benchmarks import parameterized, randn, requires_dask

from . import parameterized, randn, requires_dask

NDEGS = (2, 5, 20)
NX = (10**2, 10**6)
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/reindexing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import numpy as np

import xarray as xr
from asv_bench.benchmarks import requires_dask

from . import requires_dask

ntime = 500
nx = 50
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import pandas as pd

import xarray as xr
from asv_bench.benchmarks import parameterized, randn, requires_dask

from . import parameterized, randn, requires_dask

nx = 300
long_nx = 30000
Expand Down
3 changes: 2 additions & 1 deletion asv_bench/benchmarks/unstacking.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import pandas as pd

import xarray as xr
from asv_bench.benchmarks import requires_dask, requires_sparse

from . import requires_dask, requires_sparse


class Unstacking:
Expand Down
2 changes: 1 addition & 1 deletion doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Documentation
Internal Changes
~~~~~~~~~~~~~~~~
- Add the pre-commit hook `absolufy-imports` to convert relative xarray imports to
absolute imports (:pull:`7204`).
absolute imports (:pull:`7204`, :pull:`7370`).
By `Jimmy Westling <https://github.com/illviljan>`_.

.. _whats-new.2022.12.0:
Expand Down