astrocatalogs / astrocats

Astrocats package for constructing astronomical catalogs
https://astrocats.space
MIT License
40 stars 12 forks source link

Fix source checks #82

Closed lzkelley closed 6 years ago

lzkelley commented 7 years ago

In Entry, when adding new CatDict objects using Entry._add_cat_dict, the method Entry._check_cat_dict_source was requiring all CatDict to include a source. This should not be the case, as CatDict can internally decide what parameters are required or not. Some methods, like add_source circumvent these checks by manually adding the new catdict (in this case Source) without using the _add_cat_dict method. This PR removes the source requirement from _check_cat_dict_source, which now returns false if the source is erroneous or private (these were the two additional checks previously) and otherwise returns True (even if no source exists). The _check_cat_dict_source() method also checked to make sure that sources were comma-delimited integers. To accomodate this, a new KEY_TYPES.INTEGER type has been added, and SOURCE.ALIAS is required to match this type.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.08%) to 75.604% when pulling 336f4a2901f6c6aa9fbd73e83de9b45a55b1e00f on fix-source-checks into 29cc0b301ecca7b79d439e44dfb7debb5a5b61ae on master.