Closed stevenstetzler closed 7 months ago
Thanks @stevenstetzler. All looks good for provID. For permIDs, can you confirm that the ~
type packed permIDs were already converting correctly, and so no change was needed? If so then it seems like permIDs could be added to the test_packUtil.py
. What do you think? will wait to get your response before merging this PR...
And I'll open a new issue related to the comet packing/unpacking problems. Not sure how high of a priority this should be, but want to be able to track it.
@stevechesley Yes, the handling of permIDs with ~
was already implemented. I've added tests to the test_packUtil.py
for permID packing/unpacking.
This PR tracks #31.
So far, this modifies the
minorplanetPackedIDRegex
to include matching against the extended packed format for provisional IDs. And then a case to handle this match is added inpackUtil.unpackPackedID
. For unpacking of the extended format,packUtil.packTupleID
is modified to handle the extended format. Finally, a new test is added innew_tests/test_packUtil.py
that enumerates unpacked/packed provisional ID examples pulled from the MPC website and also a few from thepackUtil.testCases
code. (I can pull over all the rest of these examples into a test file as well.) Note that some of the examples for comets fail: e.g. J94P010 = 1994 P1 according to the MPC website, but our code converts this as A/1994 P1. Additionally, the existing code fails to match and convert J94P01b at all (to 1994 P1-B).Some code in
packUtil.unpackPackedID
was modified and documented to help me understand the code flow better (and determine how it needed to be extended in this PR). If this modification isn't desirable, I can remove it.Note that this handling of the extended packed format is only being applied to minor planets. Is this desirable? Or will comets/satellites ever use this format?