refactor setup tag to be similar to dataset and task#352
Conversation
WalkthroughThe setup tag database function now wraps its Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #352 +/- ##
==========================================
- Coverage 95.24% 95.17% -0.07%
==========================================
Files 74 74
Lines 3699 3710 +11
Branches 244 244
==========================================
+ Hits 3523 3531 +8
- Misses 113 114 +1
- Partials 63 65 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/routers/openml/setups.py (1)
62-62: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRedundant
code=472override.SetupNotFoundErroralready defines_default_code = 472, so the explicit override is unnecessary and can drift from the default if either changes. Consider dropping it for clarity.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/routers/openml/setups.py` at line 62, The SetupNotFoundError raise in the setup lookup path is redundantly overriding the default status code, which can drift from the class definition. Update the relevant error path in the setup handling logic to raise SetupNotFoundError with just the message, relying on the class’s _default_code in SetupNotFoundError instead of passing code=472 explicitly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/routers/openml/setups.py`:
- Line 62: The SetupNotFoundError raise in the setup lookup path is redundantly
overriding the default status code, which can drift from the class definition.
Update the relevant error path in the setup handling logic to raise
SetupNotFoundError with just the message, relying on the class’s _default_code
in SetupNotFoundError instead of passing code=472 explicitly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6737c17b-7d65-4ffc-a8ea-bab39afcabc4
📒 Files selected for processing (3)
src/database/setups.pysrc/routers/openml/setups.pytests/routers/openml/setups_tag_test.py
Description
Refactoring the setup tag function to be more similar to the way it's implemented for datasets and tasks for consistency.