Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- BREAKING: `isku.build_extraction_workflow` is now `isku.build_extraction_template`.
- BREAKING: `isku.build_projection_workflow` is now `isku.build_projection_template`.
- BREAKING: In `isku.extract_regions`, the `workflow` argument is now `template`.
- BREAKING: `isku.ProjectionTemplate` protocol methods `d` argument is now `ds` to make it consistent with extraction signatures.
- Improved README.
- Improved CONTRIBUTING.
- Add project URLs to package metadata.
Expand Down
10 changes: 5 additions & 5 deletions src/isku/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ class ProjectionTemplate(Protocol):
build_projection_template: Build a projection template from simple functions.
"""

def pre_project(self, d: xr.Dataset) -> xr.Dataset:
def pre_project(self, ds: xr.Dataset) -> xr.Dataset:
"""
Pre-process a dataset before projection
"""
...

def project(self, d: xr.Dataset) -> xr.Dataset:
def project(self, ds: xr.Dataset) -> xr.Dataset:
"""
Create a projection from a dataset
"""
...

def post_project(self, d: xr.Dataset) -> xr.Dataset:
def post_project(self, ds: xr.Dataset) -> xr.Dataset:
"""
Process a projected dataset
"""
Expand Down Expand Up @@ -70,7 +70,7 @@ def build_projection_template(
)


def project(d: xr.Dataset, *, model: ProjectionTemplate) -> xr.Dataset:
def project(ds: xr.Dataset, *, model: ProjectionTemplate) -> xr.Dataset:
"""
Project a dataset of predictors, 'd', with 'model' to return a projected dataset

Expand All @@ -79,7 +79,7 @@ def project(d: xr.Dataset, *, model: ProjectionTemplate) -> xr.Dataset:
build_projection_template: Build a projection template from simple functions.
ProjectionTemplate: Technical ProjectionTemplate protocol.
"""
preprocessed = model.pre_project(d)
preprocessed = model.pre_project(ds)
projected = model.project(preprocessed)
postprocessed = model.post_project(projected)

Expand Down