-
Notifications
You must be signed in to change notification settings - Fork 28
add prodml pulse width units #531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughUpdated internal ProdML attribute mappings to recognize additional variants: "PulseWidthUnit", "PulseRateUnits", and "GaugeLengthUnits" now map to internal fields Changes
Possibly related PRs
Pre-merge checks (3 passed)✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
✨ Finishing Touches
🧪 Generate 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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #531 +/- ##
=======================================
Coverage 99.88% 99.88%
=======================================
Files 122 122
Lines 10035 10035
=======================================
Hits 10023 10023
Misses 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
dascore/io/prodml/utils.py (1)
103-119: Add GaugeLengthUnits alias for symmetry and resilience.Some datasets mirror the pluralization pattern for gauge length too. Cheap guardrail to avoid a future bug.
"GaugeLength": "gauge_length", - "GaugeLengthUnit": "gauge_length_units", + "GaugeLengthUnit": "gauge_length_units", + "GaugeLengthUnits": "gauge_length_units", "GaugeLength.uom": "gauge_length_units",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
dascore/io/prodml/utils.py(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
- GitHub Check: test_code_min_deps (ubuntu-latest, 3.12)
- GitHub Check: test_code_min_deps (windows-latest, 3.12)
- GitHub Check: test_code_min_deps (windows-latest, 3.13)
- GitHub Check: test_code_min_deps (macos-latest, 3.13)
- GitHub Check: test_code_min_deps (ubuntu-latest, 3.13)
- GitHub Check: test_code (windows-latest, 3.10)
- GitHub Check: test_code (macos-latest, 3.10)
- GitHub Check: test_code (windows-latest, 3.12)
- GitHub Check: test_code (ubuntu-latest, 3.13)
- GitHub Check: test_code (macos-latest, 3.13)
- GitHub Check: test_code (ubuntu-latest, 3.10)
- GitHub Check: test_code (windows-latest, 3.13)
- GitHub Check: test_code (macos-latest, 3.12)
- GitHub Check: test_code (windows-latest, 3.11)
- GitHub Check: test_code (ubuntu-latest, 3.12)
- GitHub Check: test_code (macos-latest, 3.11)
- GitHub Check: test_code (ubuntu-latest, 3.11)
🔇 Additional comments (2)
dascore/io/prodml/utils.py (2)
108-113: LGTM: Now covers both singular/plural unit keys for pulse width/rate.Adding "PulseWidthUnit" and "PulseRateUnits" eliminates common PRODML schema variance. Looks good.
103-119: Add lowerCamelCase mappings or normalize keys
Search didn’t surface any lowercase-camel variants—please manually verify that PRODML attributes likepulseWidthUnit/pulseRateUnits/gaugeLengthUnitsdon’t appear in your files or tests. If they do, add those aliases alongside the existing PascalCase keys in_root_attrs(or normalize attribute names before lookup).
Description
Some prodml files define pulse width units as
pulseWidthUnitand others aspulseWidthUnits. This simple PR just makes sure both cases are handled.Checklist
I have (if applicable):
Summary by CodeRabbit