Skip to content

[ENH] refactor datatypes example fixtures to BaseObject classes#7133

Merged
fkiraly merged 21 commits intomainfrom
datatypes-examples-refactor
Sep 24, 2024
Merged

[ENH] refactor datatypes example fixtures to BaseObject classes#7133
fkiraly merged 21 commits intomainfrom
datatypes-examples-refactor

Conversation

@fkiraly
Copy link
Copy Markdown
Collaborator

@fkiraly fkiraly commented Sep 18, 2024

Refactors the example fixtures in the datatypes module along the lines of sktime/skpro#458:

  • a base class for datatype examples, BaseExample, to replace the more ad-hoc dictionary design
  • a complete refactor of all _example submodules to this interface
  • a full refactor of the public framework module with get_example logic, in datatypes, to allow extensibility with this design

Beyond the refactor, sets the polars requirements for the polars data examples to polars>=1.0, and adds pyarrow as a requirement, consistent with the status quo in skpro.

Closes #7128, as it addresses the issue both from an isolation perspective, as well as the missing argument perspective.

@fkiraly fkiraly added module:datatypes datatypes module: data containers, checkers & converters enhancement Adding new functionality labels Sep 18, 2024
@fkiraly fkiraly self-assigned this Sep 18, 2024
@fkiraly fkiraly marked this pull request as ready for review September 18, 2024 11:19
@fkiraly
Copy link
Copy Markdown
Collaborator Author

fkiraly commented Sep 18, 2024

Note for reviewers: the refactor was AI-assisted, and I spotted a few examples where the build function returned the wrong object, in particular in cases where None should have been returned, something was hallucinated; similar in cases of some tags.

The tests check consistency and whether the correct tags are detected, so the refactor should be tested against the checkers, which have not changed.

@fkiraly fkiraly merged commit 371b561 into main Sep 24, 2024
@fkiraly fkiraly deleted the datatypes-examples-refactor branch September 24, 2024 09:34
benHeid pushed a commit that referenced this pull request Feb 15, 2025
…7133)

Refactors the example fixtures in the `datatypes` module along the lines
of sktime/skpro#458:

* a base class for datatype examples, `BaseExample`, to replace the more
ad-hoc dictionary design
* a complete refactor of all `_example` submodules to this interface
* a full refactor of the public framework module with `get_example`
logic, in `datatypes`, to allow extensibility with this design

Beyond the refactor, sets the `polars` requirements for the `polars`
data examples to `polars>=1.0`, and adds `pyarrow` as a requirement,
consistent with the status quo in `skpro`.

Closes #7128, as it addresses the issue both from an isolation
perspective, as well as the missing argument perspective.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adding new functionality module:datatypes datatypes module: data containers, checkers & converters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]sktime doesn't work with older versions of polars

1 participant