Skip to content

Conversation

@mattjamesdev
Copy link
Contributor

@mattjamesdev mattjamesdev commented Sep 16, 2025

Changes

Removes BackwardsCompability uses throughout the repo.

Fixes #45.

  • set_attributes -> SetAttributes
  • set_encoding -> SetEncoding
  • set_type -> SetType
  • rename -> Rename
  • interpolate_na -> InterpolateNan
  • force_standard_dimension_names -> StandardDimensionNames
  • expand -> Expand
  • derive -> Derive
  • rechunk -> Rechunk
  • TimeSeriesPredictionWrapper -> TimeSeriesPredictor
  • TimeSeriesAutoRecurrent -> TimeSeriesAutoRecurrentPredictor
  • TimeSeriesManagedRecurrent -> TimeSeriesManagedPredictor
  • ManualTimeSeriesPredictionWrapper -> ManualTimeSeriesPredictor
  • TemporalDifference -> Division
  • fill -> Fill
  • sel -> Select
  • isel -> ISelect
  • point_box -> PointBox
  • lookup -> Lookup
  • from_shapefile -> ShapeFile
  • from_geosearch -> Geosearch
  • pad -> Pad
  • dataset -> Dataset
  • replace_value -> Replace
  • trim -> Trim
  • variable_trim -> Trim
  • drop -> Drop

Testing

Test suite was run locally after every commit.

@mattjamesdev mattjamesdev changed the title Remove BackwardsCompatibility uses [Draft] Remove BackwardsCompatibility uses Sep 16, 2025
@coveralls
Copy link

coveralls commented Sep 16, 2025

Pull Request Test Coverage Report for Build 17756055427

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 3 of 16 (18.75%) changed or added relevant lines in 9 files are covered.
  • 10 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.2%) to 61.174%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/pipeline/src/pyearthtools/pipeline/operations/transform/add_coordinates.py 0 1 0.0%
packages/pipeline/src/pyearthtools/pipeline/operations/xarray/reshape.py 0 1 0.0%
packages/zoo/src/pyearthtools/zoo/predict.py 0 1 0.0%
packages/pipeline/src/pyearthtools/pipeline/operations/xarray/select.py 0 2 0.0%
packages/pipeline/src/pyearthtools/pipeline/operations/xarray/values.py 0 2 0.0%
packages/pipeline/src/pyearthtools/pipeline/operations/xarray/metadata.py 0 6 0.0%
Files with Coverage Reduction New Missed Lines %
packages/data/src/pyearthtools/data/transforms/attributes.py 1 58.4%
packages/data/src/pyearthtools/data/transforms/values.py 1 41.94%
packages/utils/src/pyearthtools/utils/decorators.py 8 74.55%
Totals Coverage Status
Change from base Build 17692860548: 0.2%
Covered Lines: 9497
Relevant Lines: 15108

💛 - Coveralls

@mattjamesdev mattjamesdev changed the title [Draft] Remove BackwardsCompatibility uses Remove BackwardsCompatibility uses Sep 16, 2025
@mattjamesdev mattjamesdev marked this pull request as ready for review September 16, 2025 05:49
from pyearthtools.utils.decorators import BackwardsCompatibility

# Backwards compatability
rename_variables = attr.rename
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please tidy this up in a new PR?

@tennlee tennlee merged commit 2314ce0 into ACCESS-Community-Hub:develop Sep 16, 2025
5 checks passed
gemmaellen pushed a commit to gemmaellen/PyEarthTools that referenced this pull request Oct 1, 2025
* Replace set_attributes with SetAttributes

* Replace set_encoding with SetEncoding

* Replace set_type with SetType

* Replace rename with Rename

* Remove unnecessary renaming of SetAttributes to `update`

* Replace TimeSeries* related functions

* Remove deprecated TemporalDifference (unreferenced)

* Remove deprecated `fill` (unreferenced)

* Remove deprecated functions from `region.py`

* `sel`
* `isel`
* `point_box`
* `lookup`
* `from_shapefile`
* `from_geosearch`

* Replace `expand` with `Expand`

* Remove deprecated `pad` (unreferenced)

* Remove deprecated functions from `mask.py`

* `replace_value`
* `dataset`

* Remove deprecated functions from `variables.py`

* `trim` -> `Trim`
* `variable_trim` -> `Trim`
* `drop` -> `Drop`

* Remove deprecated `interpolate_na` (unused)

* Remove deprecated functions from `dimensions.py`

* `force_standard_dimension_names` -> `StandardDimensionNames`
* `expand` -> `Expand`

* Replace `derive` with `Derive`

* Remove deprecated `rechunk` (unused)

* Run black
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove BackwardsCompatibility uses

3 participants