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

Fix: clean data accepted key #131

Merged
merged 5 commits into from
Mar 9, 2024
Merged

Conversation

lwasser
Copy link
Member

@lwasser lwasser commented Mar 9, 2024

closes #129

this fixes a bug in our workflow related to older issues with different formats for the date accepted key. it adds a helper clean function to the utils_clean module that looks for any key that begins with date_accepted and removes anything following it. this will simplify both our pydantic model ingest and also make it easy to add other scenarios if people modify that line.

Copy link

codecov bot commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.05%. Comparing base (8d62417) to head (3dacca6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #131      +/-   ##
==========================================
+ Coverage   47.56%   57.05%   +9.48%     
==========================================
  Files           7        7              
  Lines         473      482       +9     
  Branches       74       76       +2     
==========================================
+ Hits          225      275      +50     
+ Misses        244      202      -42     
- Partials        4        5       +1     

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

Fix: remove additional alias

Fix: pynteny
Copy link
Collaborator

@willingc willingc left a comment

Choose a reason for hiding this comment

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

Love this! Bugs being found and fixed in a place that makes sense to a reviewer.

src/pyosmeta/utils_clean.py Outdated Show resolved Hide resolved
@willingc
Copy link
Collaborator

willingc commented Mar 9, 2024

Looks like some sort of test issue.

@lwasser
Copy link
Member Author

lwasser commented Mar 9, 2024

yes! so essentially what i fixed here - there was a test that i didn't update. BUT i didn't see that it wasn't updated because it was not named correctly for pytest / vscode to find it when i ran the tests. So i just fixed that all by

  1. fixing the test that should have been fixed
  2. fixing the test suite setup (renaming the file to start with test_) so it ran when i ran tests locally.
    it's all green now - i shall merge given an approval. thank you so much! i'm happy with this fix as it's much easier to troubleshoot (and test) now. ✨

thank you so much!

Copy link
Member Author

Choose a reason for hiding this comment

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

this contained the failing test. it wasn't running for me locally and i didn't notice that it wasn't running. this fixes that issue and ensures i see broken tests before pushing to GH thinking everything is green!

@@ -18,7 +18,7 @@
"archive": "[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8384174.svg)](https://doi.org/10.5281/zenodo.8384174)",
"version_accepted": "5.1.1",
"joss_doi": "[![DOI](https://joss.theoj.org/papers/10.21105/joss.01832/status.svg)](https://joss.theoj.org/papers/10.21105/joss.01832)",
"date_accepted_(month/day/year)": "01/18/2024",
"date_accepted": "01/18/2024",
Copy link
Member Author

Choose a reason for hiding this comment

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

this was breaking the test because i fixed this key to ALWAYS be date_Accepted in this pr! so it needs to be fixed here too in the sample data.

@lwasser
Copy link
Member Author

lwasser commented Mar 9, 2024

all green ✅ merging! this one feels good as it feels like a good fix with a clean(er) fix implementation!

@lwasser lwasser merged commit 1f50afb into pyOpenSci:main Mar 9, 2024
4 checks passed
@lwasser lwasser deleted the fix-date_accepted branch March 9, 2024 02:45
@willingc willingc added this to the March 2024 Release milestone Mar 9, 2024
@willingc willingc added the bug Something isn't working label Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: date-accepted being removed from current build
2 participants