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

add if __main__ to changelog filter #338

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Conversation

braingram
Copy link
Contributor

The changelog_filter.py script added in #329 is causing issues with test collection. This can be seen in downstream tests in asdf
https://github.com/asdf-format/asdf/actions/runs/8065305926/job/22030878789?pr=1745

and by attempting to run pytest in a development install of dkist:

>> pytest
...
___________________________________________________ ERROR collecting .github/changelog_filter.py ____________________________________________________
.github/changelog_filter.py:10: in <module>
    source = input_stream.read()
E   io.UnsupportedOperation: not readable
...

This PR adds an if __name__ == '__main__' check to the script so it does not attempt to read stdin during test collection.

@braingram
Copy link
Contributor Author

I wouldn't consider this in need of a changelog but let me know if adding one is preferred.

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.38%. Comparing base (1043d38) to head (6fbcd7f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
- Coverage   97.73%   97.38%   -0.36%     
==========================================
  Files          34       34              
  Lines        1990     1990              
==========================================
- Hits         1945     1938       -7     
- Misses         45       52       +7     

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

@Cadair Cadair added the No Changelog Entry Needed This pull request does not need a changelog entry label Feb 27, 2024
@Cadair Cadair merged commit 788bfd9 into DKISTDC:main Feb 27, 2024
15 of 16 checks passed
@Cadair
Copy link
Member

Cadair commented Feb 27, 2024

Thanks!

@braingram braingram deleted the fix_pytest branch February 27, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Changelog Entry Needed This pull request does not need a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants