Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDS3 maintenance update; new attributes in Pds3File #58

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

markshowalter
Copy link
Collaborator

  • I duplicated the "BUNDLE" regular expressions of PdsFile into Pds3File. In the end, they really don't belong in PdsFile; instead, there should be a set of parallel definitions in Pds4File that specify different rules that are appropriate for the new standard. However, for now, I did not remove those definitions from PdsFile, so this should not break anything.
  • BTW, I am assuming no one will ever create an instance of PdsFile. It should be an abstract class that merely serves as the superclass of Pds3File and Pds4File, containing all the source code that Pds3File and Pds4File share. Meanwhile, pds3file/__init__.py and pds4file/__init__.py will contain only the source code that is unique to each subclass. Ideally, the constructor for PdsFile should immediately raise an exception. If you are not thinking of PdsFile in this way, we should discuss it.
  • In pds3file/__init__.py, I added some of the "aliases" we discussed recently in the Slack channel, using "vol" in place of "bundle". This includes the aforementioned regular expressions. These are additions to the file so they shouldn't break anything.
  • pdsdependency.py had some broken regular expressions for specifying the New Horizons browse products, so these were not being checked properly. That is now fixed.
  • re-validate.py stopped working for me, apparently having something to do with refererences to PdsFile that should have been references to Pds3File. I did not pursue this question very far; I just made sufficient changes for re-validate to work again.
  • Note that we might be able to eventually have versions of all the maintenance programs that support both PDS3 and PDS4. However, until we do, I strongly prefer to keep the PDS3 source code referring to "volumes" instead of "bundles". I made that change back to how things looked previously.
  • I found a set of holdings errors where certain PDS3 label files did not have the "CR-LF" line terminators that the PDS3 standard required. I decided to create a somewhat quick-and-dirty program crlf.py that can check or repair line terminators. It is now in the maintenance/pds3 subdirectory.
  • BTW, I am submitting these changes from my laptop. I am not sure the correct way to propagate these changes to Admin but I need them there for validation to work correctly going forward. For now, that is just a manual copy. After the merge, we'll have to do a fresh pull and whatever "pip installs" are required.

@rfrenchseti rfrenchseti merged commit 9a568b5 into main Oct 15, 2024
11 checks passed
@rfrenchseti rfrenchseti deleted the maintenance-and-pds3file branch October 15, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants