Skip to content

NPI-4175 Revise filename property extraction functionality#94

Merged
treefern merged 8 commits into
mainfrom
NPI-4175-file-property-extraction-improvements
Sep 18, 2025
Merged

NPI-4175 Revise filename property extraction functionality#94
treefern merged 8 commits into
mainfrom
NPI-4175-file-property-extraction-improvements

Conversation

@treefern
Copy link
Copy Markdown
Collaborator

@treefern treefern commented Sep 2, 2025

This PR improves robustness and error checking, in functionality for statically extracting properties from filenames.

Notably:

  • The regex for extraction of IGS long format filenames has been extended to completely encompass the specification. This allows:
    • Parsing Long Term Product filenames (which have a start epoch and end epoch, rather than a start epoch and period)
    • Reading whether file is compressed (.gz) or not. Note that this is technically part of the filename specification. Previously, passing .SP3.gz would result in an error and had to be trimmed first.
    • Reading filenames containing a Station ID
  • Adds multiple strictness / check options (most are off by default for compatibility). Among other things, this allows restricting to only long format filenames and raising exceptions for everything else.
  • Adds general (likely too permissive) regex for approximately checking IGS short format filenames. Warnings or exceptions can be raised if this does not pass.

@treefern treefern requested a review from ronaldmaj September 2, 2025 10:35
@treefern treefern self-assigned this Sep 2, 2025
Comment thread tests/test_filenames.py Outdated
ronaldmaj
ronaldmaj previously approved these changes Sep 17, 2025
Copy link
Copy Markdown
Collaborator

@ronaldmaj ronaldmaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this locally with a couple files I have. Seems to work fine with those. I've also had a look through the code and don't see anything that jumps out as a big issue.
Happy for this to go in, especially as it will help with recent work.

Copy link
Copy Markdown
Collaborator

@ronaldmaj ronaldmaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change was an update to a comment - still happy for this to go in 👍

@treefern treefern merged commit 9b8e6bd into main Sep 18, 2025
4 checks passed
@treefern treefern deleted the NPI-4175-file-property-extraction-improvements branch September 18, 2025 08:06
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