Skip to content

Test missing community partnerships section #268

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions tests/data/reviews/missing_community_partnerships.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Submitting Author: Fakename (@fakeauthor)
All current maintainers: (@fakeauthor1, @fakeauthor2)
Package Name: fake_package
One-Line Description of Package: A fake python package
Repository Link: https://example.com/fakeauthor1/fake_package
Version submitted: v1.0.0
EiC: @fakeeic
Editor: @fakeeditor
Reviewers: @fakereviewer1 , @fakereviewer2, @fakereviewer3
Reviews Expected By: fake date
Archive: [![DOI](https://example.com/fakearchive)](https://zenodo.org/records/8415866)
JOSS DOI: [![DOI](https://example.com/fakearchive)](https://doi.org/10.21105/joss.01450)
Version accepted: 2.0.0 ([repo](https://example.com/fakeauthor1/fake_package/releases/tag/v2.0.0), [pypi](https://pypi.org/project/fake_project/2.0.0), [archive](https://example.com/fakearchive))
Date accepted (month/day/year): 06/29/2024

---

## Scope

- [x] I agree to abide by [pyOpenSci's Code of Conduct][PyOpenSciCodeOfConduct] during the review process and in maintaining my package after should it be accepted.
- [x] I have read and will commit to package maintenance after the review as per the [pyOpenSci Policies Guidelines][Commitment].
(etc)
13 changes: 13 additions & 0 deletions tests/integration/test_parse_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,16 @@ def test_parse_labels(issue_list, process_issues):
issue.labels = labels
review = process_issues.parse_issue(issue)
assert review.labels == ["test", "another_label"]


def test_missing_community_partnerships(process_issues, data_file):
"""
Test handling of issues with a missing "## Community Partnerships" section.

This is a smoke test to ensure graceful handling of this case.
Copy link
Member

Choose a reason for hiding this comment

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

🚀

"""
review = data_file("reviews/missing_community_partnerships.txt", True)
with pytest.warns(
UserWarning, match="## Community Partnerships not found in the list"
):
review = process_issues.parse_issue(review)