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

Remove bare get_timeinfo, repoint tests to GenericTimeParser #315

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

marc-white
Copy link
Collaborator

Closes #314 .

The simple PR removes source.utils.get_timeinfo, which has been superseded by GenericTimeParser. The related tests have been switched to use that Parser.

@marc-white marc-white linked an issue Jan 15, 2025 that may be closed by this pull request
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.40%. Comparing base (1e08b06) to head (ca760bf).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #315      +/-   ##
==========================================
+ Coverage   98.14%   98.40%   +0.25%     
==========================================
  Files          11       11              
  Lines        1024      940      -84     
==========================================
- Hits         1005      925      -80     
+ Misses         19       15       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@charles-turner-1 charles-turner-1 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Have you got any idea why codecov is so upset about the changes? It's flagged lines don't really make any sense to me, but I wonder whether we might want to take a closer look just to be sure...

@marc-white
Copy link
Collaborator Author

Have you got any idea why codecov is so upset about the changes? It's flagged lines don't really make any sense to me, but I wonder whether we might want to take a closer look just to be sure...

I'm assuming that, because I've excised a chunk of 100% covered code, any uncovered code is now a larger proportion of the code base, hence the percentage of uncovered code has gone up, hence CodeCov is angry... but I would have thought it was smart enough to be able to realize that all that's happened is some line removal.

@marc-white
Copy link
Collaborator Author

marc-white commented Jan 20, 2025

That being said, you're right, the highlighting is confusing. For example, L117-135 of source/catalog/utils.py is showing both a red exclamation point as being 'uncovered', but there's a green highlight next to that I don't understand... oh, but local pytest-cov is showing those lines as uncovered as well (I was checking the wrong branch earlier). Checking...

@marc-white
Copy link
Collaborator Author

OK, fixed the issue. I'd missed the module-level private helper functions that now weren't being used, so weren't being tested, so Codecov was flagging that correctly as a test coverage lowering.

Copy link
Collaborator

@charles-turner-1 charles-turner-1 left a comment

Choose a reason for hiding this comment

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

Looks good

@marc-white marc-white merged commit 1740e5d into main Jan 20, 2025
18 checks passed
@charles-turner-1
Copy link
Collaborator

OK, fixed the issue. I'd missed the module-level private helper functions that now weren't being used, so weren't being tested, so Codecov was flagging that correctly as a test coverage lowering.

I came across this extension the other day - might help with that sort of unused function stuff? It basically adds a usage count to function definitions, makes it super easy to see unused functions when traipsing through files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

[BUG] remove deprecated get_timeinfo method from source/utils.py
2 participants