Skip to content
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

DM-47976: Support conversion field in file template format strings #1127

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

tgoldina
Copy link
Contributor

@tgoldina tgoldina commented Dec 6, 2024

A fix to support type conversion in file template format strings. For example, the conversion specifier !s in a format string like {healpix!s:.2s} converts a numeric field healpix into a string before applying additional formatting.

The modified unit test, which previously produced a ValueError: Unknown format code 's' for object of type 'int', now passes.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes
  • (if changing dimensions.yaml) make a copy of dimensions.yaml in configs/old_dimensions

@tgoldina tgoldina self-assigned this Dec 6, 2024
@tgoldina tgoldina requested a review from andy-slac December 6, 2024 01:30
@timj
Copy link
Member

timj commented Dec 6, 2024

Can you add a test please?

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.46%. Comparing base (0155486) to head (8788edb).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1127   +/-   ##
=======================================
  Coverage   89.46%   89.46%           
=======================================
  Files         366      366           
  Lines       48774    48779    +5     
  Branches     5907     5908    +1     
=======================================
+ Hits        43637    43642    +5     
  Misses       3721     3721           
  Partials     1416     1416           

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

Copy link
Contributor

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

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

Looks great.

@tgoldina tgoldina merged commit 6da1657 into main Dec 6, 2024
19 checks passed
@tgoldina tgoldina deleted the tickets/DM-47976 branch December 6, 2024 18:22
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.

3 participants