-
Notifications
You must be signed in to change notification settings - Fork 5
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
Create list of tests needed #26
Comments
having tests would be great! but meanwhile I will follow up with a few separate "issues" on top of #22 (comment) initial experience |
okay! Let's prioritize tests though, since we don't have them (it makes me uneasy). |
What about starting with an integration test for sample use cases where sample input is provided and sample output is verified? vcr library then could be used to record any interaction which happen in that initial run (and committed as well, but be careful to not run with secrets in your environment variables) Then as bugs are fixed - provide unit tests which code the fixed up behavior in corresponding functions |
Good idea - we will want to do this after adding support for some kind of But no more today! Dinnertime! |
as requested in #48 I think it would be useful to establish a "high level" unittest for verifying finding out correct ORCID ids.
e.g. for mine should find a single entry$> curl --silent -X GET --header 'Accept: application/json' 'https://pub.orcid.org/v3.0/expanded-search?q=email:[email protected]' | jq .
{
"expanded-result": [
{
"orcid-id": "0000-0003-3456-2493",
"given-names": "Yaroslav",
"family-names": "Halchenko",
"credit-name": null,
"other-name": [
"Ярослав Олеговіч Гальченко"
],
"email": [
"[email protected]"
],
"institution-name": [
"Center for Open Neuroscience",
"Dartmouth College",
"Debian Project",
"New Jersey Institute of Technology",
"Rutgers University",
"University of New Mexico",
"Vinnytsia State Technical University"
]
}
],
"num-found": 1
} FWIW - it can even do glob matching in email address seems to me giving information that there are 30k records with gmail.com and 121k records with some email address:$> curl --silent -X GET --header 'Accept: application/json' 'https://pub.orcid.org/v3.0/expanded-search?q=email:*@gmail.com' | jq . | grep num-found
"num-found": 30073
$> curl --silent -X GET --header 'Accept: application/json' 'https://pub.orcid.org/v3.0/expanded-search?q=email:*' | jq . | grep num-found
"num-found": 121636 |
I can add this to the PR! Can you tell me more about what you mean by using the vcr library to "record transactions" (I'm not familiar with this). My basic intuition would be to add a few tests for the list you generated, to be run on a PR, which I don't think would be abusing the API. What tapes? |
https://vcrpy.readthedocs.io/en/latest/ |
hey @yarikoptic ! I've done just about all the changes / updates that I think are good for this first version, so please have it it / unlease the Yarik! Now is the right time to start review and tell me all the things I did wrong :) In all seriousness I always can quickly put together a first go, but then lots of tweaking / fine tuning / testing is needed. Actually, we don't technically have proper python tests, so if you want to make a list of tests to write I can go from there!
The text was updated successfully, but these errors were encountered: