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

NPI-3685 Streamline SP3 incorrect timerange unit test #71

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

treefern
Copy link
Collaborator

This PR attempts to speed up one of our slower unit tests, which parses a full day worth of SP3 data.

The number of sats in the test file has been dropped from 30 to 1.
Test run time is still slow, but perhaps 1-2 seconds faster than it was.

After a bit of investigation, it appears the main bottleneck in reading SP3 files, is the fact each epoch is parsed into a temporary DataFrame, before being concatenated into the output DataFrame. So, without significantly overhauling the relevant code, number of epochs is likely to be the main determiner of speed.

Also added:

  • a small and experimental utility class ContextTimer, which can be used as a context manager, to time function executions.
  • use of pyfakefs reset() in various unit tests, to better guard against data from previous test runs impacting tests.

@treefern treefern requested a review from ronaldmaj January 13, 2025 05:28
@treefern treefern self-assigned this Jan 13, 2025
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.

1 participant