-
Notifications
You must be signed in to change notification settings - Fork 150
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 python tests #60
Comments
I'd also consider this one done already given that you broke out #61 too -- that covers all that's left (feel free to reopen with more detail if I'm misreading that) |
Adding unit tests to the functions within app.py workflow in git actions does a build check - can we do tests on individual functions? |
A python workflow was already implemented into GitHub actions in #52:
The TODO at this point is just to actually add meaningful tests to I just updated the testing section of the docs: https://codeforphilly.github.io/chime/contributing/app-dev.html#testing |
Over here you can see how even though the current |
I thought about this a bit, here what I would propose - this should be a pretty straightforward task for someone who knows python reasonably well.
|
Possible that I've duplicated the intent of issue #61 in the above |
I'm going to attempt some tests here, and see if the charting functions return values so that those can be tested (since I have no idea how to make Python look at an actual visual and see if it worked...). Question: Would you rather this be part of the github actions, or part of the developer flow (git hooks) so that devs can't even push a change without running and passing a test? |
@pjhoberman we already have I don't think we need to mess with running it via githooks right now, devs being able to run |
@pjhoberman since there's a range of skill level of volunteers, I think it's fine to gate at the last possible point (run tests on github before PR merges) - I don't want anyone to give up if they get tripped up on tests |
Also note based on the slack traffic there's a concurrent refactoring of app.py which would make this ticket a lot easier |
@garysieling I think you are right, and unit testing will be easier after merging #55. I like this suggestion. I think verifying the models and data aren't broken is most important. However, even after the refactor, there is some coupling of logic and presentation (the framework we are using, Streamlit, makes it pretty hard to fully decouple the two). So, if we want to encode the manual testing procedure, I think that sounds like a puppeteer/selenium thing to me. Or even kasaya which seems like it might be a way to get QA help from non-coders. |
Made a new ticket for Selenium type testing, I think that is a good idea as well |
I’ll get on the unit tests today (I’m on baby duty so might be mid day
before I push anything). I’ll try to break them out so some tests get
pushed earlier. If there’s anything specific anyone wants covered earlier
let me know.
I can also help with selenium but I’ll leave that open for now so others
can join in on the fun!
…On Thu, Mar 19, 2020 at 6:18 AM Gary Sieling ***@***.***> wrote:
Made a new ticket for Selenium type testing, I think that is a good idea
as well
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAJIJBA7NS6QZ5GI2PCWRLRIIERBANCNFSM4LOV6EOQ>
.
|
- Removed top level __init__.py - Added tests: - sim_sir - initial_conditions - derived_variables - new_admissions_chart
|
When can we close this? it's a really broad issue |
I think it makes sense to resolve it and make smaller tickets for whatever is left- I can take a look at doing that tomorrow |
That last push was all I needed out of this ticket. I think further tickets
are a great idea.
…On Sat, Mar 21, 2020 at 8:51 PM Gary Sieling ***@***.***> wrote:
I think it makes sense to resolve it and make smaller tickets for whatever
is left- I can take a look at doing that tomorrow
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAJIJHM56E7URYQFCBKWIDRIV4LTANCNFSM4LOV6EOQ>
.
|
Great - I'll close this now and make tickets if there was anything I was hoping for that isn't covered |
Make sure python code works and isn't broken by changes
Dependent on #59
Not an expert but here's some tips on writing python tests
The text was updated successfully, but these errors were encountered: