Skip to content

[ENH] ensure _get_installed_packages does not break in case of empty package metadata#461

Merged
fkiraly merged 2 commits intosktime:mainfrom
auderson:filter-broken-distributions
Nov 14, 2025
Merged

[ENH] ensure _get_installed_packages does not break in case of empty package metadata#461
fkiraly merged 2 commits intosktime:mainfrom
auderson:filter-broken-distributions

Conversation

@auderson
Copy link
Contributor

@auderson auderson commented Oct 23, 2025

Reference Issues/PRs

#433

What does this implement/fix? Explain your changes.

Some broken packages with empty .egg-info folder, will result in empty metadata, which will give None as pkg name and cause ValueError("A distribution name is required.") in Distribution.from_name

Added some simple filters to ignore them.

Does your contribution introduce a new dependency? If yes, which one?

No

What should a reviewer concentrate their feedback on?

Any other comments?

PR checklist

For all contributions
  • I've reviewed the project documentation on contributing
  • I've added myself to the list of contributors.
  • The PR title starts with either [ENH], [CI/CD], [MNT], [DOC], or [BUG] indicating whether
    the PR topic is related to enhancement, CI/CD, maintenance, documentation, or a bug.
For code contributions
  • Unit tests have been added covering code functionality
  • Appropriate docstrings have been added (see documentation standards)
  • New public functionality has been added to the API Reference

Copy link
Contributor

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Thanks!

Is there any way to test this, e.g., with pytest patch or similar?

@fkiraly fkiraly added the enhancement Adding new functionality label Oct 29, 2025
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.94%. Comparing base (306958d) to head (3d40c9a).
⚠️ Report is 160 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #461      +/-   ##
==========================================
+ Coverage   85.07%   85.94%   +0.86%     
==========================================
  Files          45       50       +5     
  Lines        3015     3585     +570     
==========================================
+ Hits         2565     3081     +516     
- Misses        450      504      +54     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

I think it is fine like this

@fkiraly fkiraly merged commit 963bcfa into sktime:main Nov 14, 2025
22 of 23 checks passed
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