Skip to content

Commit 8f76025

Browse files
authored
Merge pull request #32 from opera-adt/pandera-import
Fix pandera imports
2 parents 772f835 + 9822f3f commit 8f76025

7 files changed

Lines changed: 12 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
77
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [0.0.9] - 2025-06-06
10+
11+
### Fixed
12+
- Pandera imports are changing and currently raising lots of warnings. We resolve these warnings.
13+
914
## [0.0.8] - 2025-05-27
1015

1116
### Added

src/dist_s1_enumerator/asf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import asf_search as asf
55
import geopandas as gpd
66
import pandas as pd
7-
from pandera import check_input
7+
from pandera.pandas import check_input
88
from rasterio.crs import CRS
99
from shapely.geometry import shape
1010

src/dist_s1_enumerator/data_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import geopandas as gpd
2-
from pandera import Column, DataFrameSchema
32
from pandera.engines.pandas_engine import DateTime
3+
from pandera.pandas import Column, DataFrameSchema
44

55

66
burst_schema = DataFrameSchema(

src/dist_s1_enumerator/dist_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import geopandas as gpd
44
import pandas as pd
5-
from pandera import check_input
5+
from pandera.pandas import check_input
66
from tqdm.auto import tqdm
77

88
from dist_s1_enumerator.asf import get_rtc_s1_metadata_from_acq_group

src/dist_s1_enumerator/rtc_s1_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import backoff
55
import geopandas as gpd
66
import requests
7-
from pandera import check_input
7+
from pandera.pandas import check_input
88
from rasterio.errors import RasterioIOError
99
from requests.exceptions import HTTPError
1010
from tqdm.auto import tqdm

tests/conftest.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import os
22
from collections.abc import Callable, Generator
3-
from contextlib import contextmanager
43
from pathlib import Path
54

65
import pytest
76

87

9-
@contextmanager
10-
@pytest.fixture
8+
@pytest.fixture(scope='session')
119
def change_local_dir() -> Generator[Callable[[Path], Path], None, None]:
1210
"""Fixture to temporarily change the working directory."""
1311
original_dir = Path.cwd()
@@ -24,7 +22,7 @@ def _change_dir(target_dir: Path) -> Path:
2422
assert Path.cwd() == original_dir
2523

2624

27-
@pytest.fixture
25+
@pytest.fixture(scope='session')
2826
def test_dir() -> Path:
2927
"""Fixture to provide the path to the test directory."""
3028
test_dir = Path(__file__).parent

tests/test_dist_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pandas as pd
66
import pytest
77
from pandas.testing import assert_frame_equal
8-
from pandera import check_input
8+
from pandera.pandas import check_input
99
from pytest_mock import MockerFixture
1010

1111
from dist_s1_enumerator.data_models import rtc_s1_resp_schema, rtc_s1_schema

0 commit comments

Comments
 (0)