Skip to content

Commit

Permalink
deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Augspurger committed Apr 24, 2024
1 parent a03842e commit c9900af
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
8 changes: 8 additions & 0 deletions stac_geoparquet/from_arrow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import warnings

warnings.warn(
"stac_geoparquet.from_arrow is deprecated. Please use stac_geoparquet.arrow instead.",
FutureWarning,
)

from stac_geoparquet.arrow._from_arrow import * # noqa
8 changes: 8 additions & 0 deletions stac_geoparquet/to_arrow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import warnings

warnings.warn(
"stac_geoparquet.to_arrow is deprecated. Please use stac_geoparquet.arrow instead.",
FutureWarning,
)

from stac_geoparquet.arrow._to_arrow import * # noqa
8 changes: 8 additions & 0 deletions stac_geoparquet/to_parquet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import warnings

warnings.warn(
"stac_geoparquet.to_parquet is deprecated. Please use stac_geoparquet.arrow instead.",
FutureWarning,
)

from stac_geoparquet.arrow._to_parquet import * # noqa
20 changes: 20 additions & 0 deletions tests/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,23 @@ def test_round_trip(collection_id: str):

for result, expected in zip(items_result, items):
assert_json_value_equal(result, expected, precision=0)


def test_to_arrow_deprecated():
with pytest.warns(FutureWarning):
import stac_geoparquet.to_arrow
stac_geoparquet.to_arrow.parse_stac_items_to_arrow


def test_to_parquet_deprecated():
with pytest.warns(FutureWarning):
import stac_geoparquet.to_parquet

stac_geoparquet.to_parquet.to_parquet


def test_from_arrow_deprecated():
with pytest.warns(FutureWarning):
import stac_geoparquet.from_arrow

stac_geoparquet.from_arrow.stac_table_to_items

0 comments on commit c9900af

Please sign in to comment.