-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce Astropy compliant unit string
The Schema.addField method now first attempts to construct an astropy.units.Unit object from the provided unit string. This will raise a ValueError if the string is non-compliant. The optional keyword argument parse_strict from astropy.units.Unit is also added to addField. It has three levels: 'raise' (default), 'warn' and 'silent'. The latter causes any unit string to be accepted. Also add Schema.checkUnits to allow a full Shema to be validated.
- Loading branch information
Pim Schellart
authored and
Pim Schellart
committed
May 6, 2016
1 parent
85daa63
commit b6485ad
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters