Wrote a class, AdlerCLIArguments, which takes the argparse.Namespace object as input and stores and validates all of the command-line arguments.
Currently it performs some basic checks to make sure the command-line input is sensible. This can easily be added to as we invent more command-line arguments or come up with more interesting ways the user can provide silly input.
Wrote unit test and docstrings for the class.
Rewrote adler.py to fit in with the new code.
Fixes #34.
If the RSP has not populated a particular field in the table (for example, DP0.3 doesn't have any values for the u or y filter in DIASource/SSSource), we now check for this, populate that dataclass attribute with a NaN, and print a warning to the terminal.
The original warning has been suppressed because it's not as useful/informative as the one I wrote.
Docstrings and unit test for additional function I wrote to check if a value has populated.
Minor changes:
adler.py was failing on the RSP because it was using the old formulation of SSObject. Fixed it.
I tidied up the constructors on MPCORB, Observations and SSObject to use dictionaries. They're nicer now. This is the kind of thing most people don't care about but I find immensely satisfying.
The long name for the -s CL argument is now --ssObjectId to fit the rest of the code.
The attribute Observations.midpointMjdTai is now Observations.midPointMjdTai to match the column heading.
Review Checklist for Source Code Changes
[x] Does pip install still work?
[x] Have you written a unit test for any new functions?
[x] Do all the units tests run successfully?
[x] Does adler run successfully on a test set of input files/databases?
[x] Have you used black on the files you have updated to confirm python programming style guide enforcement?
Also, this is more of a new feature request: should we have a CLI flag for input options other than construct_from_RSP, e.g. construct_from_data_table, construct_from_SQL?
Fixes #85.
Fixes #34.
Minor changes:
-s
CL argument is now--ssObjectId
to fit the rest of the code.Observations.midpointMjdTai
is nowObservations.midPointMjdTai
to match the column heading.Review Checklist for Source Code Changes