Skip to content

[ENH] informative failure message in test_get_package_metadata_returns_expected_results#239

Merged
fkiraly merged 4 commits into
mainfrom
better-test_lookup-error
Oct 23, 2023
Merged

[ENH] informative failure message in test_get_package_metadata_returns_expected_results#239
fkiraly merged 4 commits into
mainfrom
better-test_lookup-error

Conversation

@fkiraly
Copy link
Copy Markdown
Contributor

@fkiraly fkiraly commented Oct 21, 2023

So far, test_get_package_metadata_returns_expected_results has failed in every attempt to make a proper PR to scikit-base, due to the design decision of using the package itself as a test case for all_objects - so adding any function or class anywhere without making a corresponding change in a register will fail the test.

Apart from that this needs to change, as a short term measure a more helpful error message should allow developers to find the place to add the expected functions or classes.

This PR adds these error messages.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 22, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (8a517d7) 83.68% compared to head (6aa235d) 83.62%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #239      +/-   ##
==========================================
- Coverage   83.68%   83.62%   -0.07%     
==========================================
  Files          41       41              
  Lines        2820     2834      +14     
==========================================
+ Hits         2360     2370      +10     
- Misses        460      464       +4     
Files Coverage Δ
skbase/lookup/tests/test_lookup.py 98.93% <75.00%> (-1.07%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fkiraly fkiraly merged commit f08e8ac into main Oct 23, 2023
fkiraly pushed a commit that referenced this pull request Oct 26, 2023
This PR improves the `deep_equals` utility by introducing the ability to
provide custom plugins.

Ultimately, this enables more flexibility in soft dependencies for data
containers such as `polars` (see, e.g.,
sktime/sktime#5423) throughout the `sktime`
package ecosystem, as `deep_equals` is used for extrinsic testing and
validity checking.
Similarly, the `ForecastingHorizon` check should be moved as a plugin
into `sktime`.

In addition, makes the following changes:

* splits up the `deep_equals` file into a module with multiple files

Depends on #239.
fkiraly added a commit that referenced this pull request Mar 1, 2024
PR #239 changes the type of exception raised by `get_test_params` to
`ValueError`, which is an unintended side effect of the imprroved error
feedback.

This can lead to breakage in exception handling, e.g., in `sktime` tests
for exception handling on top.

This PR ensures the type of exception is preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adding new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants