question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warnings from new `unit_parse_strict='warn'` settings

See original GitHub issue

Description

#11843 introduced an improved validation setting for non-standard units in FITS headers and made the 'warn' level the default (contrary to the docstring description). This issues new UnitsWarnings in a number of circumstances like the RTD builds in #12784.

Expected behavior

The unit_parse_strict default should be documented in the read_table_fits docstring.

The specific case of the RTD warnings from timeseries is probably best addressed by explicitly setting Table.read(hdu, format='fits', unit_parse_strict='silent') in kepler_fits_reader, since that function is performing its own custom treatment of nonstandard units (or should this make better use of the u.add_enabled_units mechanism as well?)

But we probably should expect a number of similar warnings, possibly treated as errors, to pop up downstream from this change.

System Details

5.1.devx

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dhomeiercommented, Jan 26, 2022

No, the errors just don’t appear in the 5.0.1 backport since #11843 is on the 5.1 branch. Also it is not just a docs issue since the warnings will start popping up in anything that uses read_table_fits or Table.read directly, so it should probably be dealt with before the 5.1 release.

0reactions
saimncommented, Jan 31, 2022

There is still the case of BJD - 2454833 which is not handled here. And even with the “generic” parser, e or pixels would not be valid units. So if those files contain invalid units, I guess that’s up to timeseries’ maintainers to choose to use unit_parse_strict='silent' or not (would make sense since it was the previous behavior), but I don’t think that’s a fits or units issue 😃.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Setup Defaults, Warnings & Alerts - YouTube
Learn to Setup Defaults, Warnings & Alerts.
Read more >
Xcode Warnings: Turn Them Up to Eleven! - Quality Coding
XcodeWarnings : An xcconfig for Easier Set-up. Click-click-clicking through a new project to turn on all these Xcode warnings is a pain.
Read more >
How to change warning setting? - Stack Overflow
I would like to display warnings when they occur but I don't understand how to change the warning settings. r · warnings ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found