Skip to content

[FIX] missing f-string in dataset features error message#294

Merged
PGijsbers merged 1 commit intoopenml:mainfrom
igennova:fix/1
Mar 27, 2026
Merged

[FIX] missing f-string in dataset features error message#294
PGijsbers merged 1 commit intoopenml:mainfrom
igennova:fix/1

Conversation

@igennova
Copy link
Copy Markdown
Contributor

Description

The error message in get_dataset_features was missing an f prefix on the string containing {dataset_id}. This caused users to see the literal text {dataset_id} instead of the actual dataset ID when a dataset had no features. Added the f prefix to correctly interpolate the variable.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

Walkthrough

In the get_dataset_features function within src/routers/openml/datasets.py, an error message string was modified. The string was changed from a non-interpolated format to an f-string, allowing the dataset_id variable to be substituted into the error message. This change affects the error message generated when no features are found for a dataset. The exception type and control flow logic remain unchanged. The modification consists of one line added and one line removed.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description accurately explains the bug fix, including what was wrong and what change was made to resolve it.
Title check ✅ Passed The title clearly and accurately describes the main change: adding an f-string prefix to fix interpolation of the dataset_id variable in an error message.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@igennova
Copy link
Copy Markdown
Contributor Author

@PGijsbers While reading through the codebase, I spotted a small bug the error message in get_dataset_features
was missing an f prefix . Quick one-line fix. Can you take a look? Thanks

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.20%. Comparing base (e2fc422) to head (37bc2f2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #294   +/-   ##
=======================================
  Coverage   54.20%   54.20%           
=======================================
  Files          38       38           
  Lines        1581     1581           
  Branches      137      137           
=======================================
  Hits          857      857           
  Misses        722      722           
  Partials        2        2           

☔ 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.

@igennova igennova changed the title FIX : missing f-string in dataset features error message [FIX] missing f-string in dataset features error message Mar 27, 2026
@PGijsbers
Copy link
Copy Markdown
Contributor

Thanks! I am restructuring the tests and guidelines. I'd still be happy to have more contributions but it might be useful to coordinate a bit. Are you on the OpenML Slack? I see a user there with the same handle.

@PGijsbers PGijsbers merged commit 12cdf10 into openml:main Mar 27, 2026
9 checks passed
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.

2 participants