-
Notifications
You must be signed in to change notification settings - Fork 587
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
PyCon Mentored Sprints meta-issue #2430
Comments
Hi @Zac-HD ! Thanks for this meta-issue. I'm participating in Mentored Sprints this weekend. I'm a data scientist and relatively new to the more "technical" parts of the job, but I've been meaning to learn more about testing. I heard Hypothesis is really helpful for data science, so I'd like to try writing tests for data-related code (as you mentioned). Would you be able to offer support, even if I've never written a test before? (I must admit I read through pydata/xarray#1846 and I wouldn't know where to start...) |
Hey @marielledado - welcome to the mentored sprints, I'd be very happy to help! (the catch is that I'm in Australia and the UTC+10 timezone, so I won't be awake for the Europe/USA sprints session. But maybe we can work asynchronously and/or on Sunday morning Berlin-time?)
Because the Xarray tests are large and complicated, I suggest doing (1), the first part of (2), and then writing |
Thanks @Zac-HD these are fantastic resources! I'll do my best to go through them by Sunday and challenge myself to write at least one test as my contribution :) I might try to start on Sunday morning to catch you online! |
Sounds great! Feel free to ping me on Discord if that would be helpful 😁 |
Hey @Zac-HD. I use hypothesis, on one of my projects. And, I love it. I am interested in contributing to hypothesis. I am a first time contributor, is there a guide or any easy issues, I can begin with? |
Hi @akash-suresh, 😁 glad you like it! To get started, I suggest writing some tests for the |
Hi @Zac-HD thanks for your advice! Spent the last half day learning how to write unit tests, then gave your workshop materials a go, and I'm finding it surprisingly doable! 😄 I just finished block 1 of the workshop, but do you think I'll be ready to write at least one simple test for the sprint? Maybe for I'll try to be up by 9 AM CEST tomorrow, which should be 5pm where you are, hope to catch you then! P.S. I should mention I've only done OS contribution once, so there might be growing pains at the sprint 😬 |
Hey @Zac-HD! Thanks for the quick response. That sounds awesome. I will start setting it up, and get started on tests for |
Congratulations @marielledado, that's awesome! Starting to use Hypothesis the same day you learn testing is way faster than most people manage 😁 Don't worry about the 'growing pains', that's what the mentored sprints are for! I think that compared to the "pbt 101" module, writing tests for |
@Zac-HD thank you! 😊 great, so I'll work on writing tests for |
I've decided to work on writing tests for Writing tests for the |
Hey @Zac-HD. I went through your workshop, and got a better understanding of hypothesis. :) I would like to pick up writing tests for |
Sure - go for it! |
I may have a look at the zlib or lzma module. I got this warning message for Python 3.7.3 on my Mac OS about lzma so I am interested to have a look. Is that ok @Zac-HD |
Sounds great! The |
Where is the Zlib tests? It's not in https://github.com/Zac-HD/stdlib-property-tests/blob/master/tests/test_compression.py I may start working on it later today (my tutorial in streaming in 1.5 hours) hope you will see some work done tomorrow. |
@Zac-HD I'll give python-jsonschema/hypothesis-jsonschema#38 a go :) hope I can pull it off! |
@Cheukting oops! Should have been |
@Zac-HD I have raised a PR for the test cases on |
Yes, but give me five minutes and I'll review the PR you already have open first 🚀 |
Thanks so much to everyone who participated in the mentored sprints! Togther, we:
And while the sprints are over now, open source projects will keep going... albeit at a less frantic pace. Whether you stick around, apply your skills elsewhere, or share what you've learned with others - go well, and good luck 😍 👋 |
This is the meta-issue for Hypothesis at the PyCon US Mentored Sprints.
We'll try to keep conversation in the Discord channel and treat this as a reference document, but you can still comment with questions or suggestions about what issues we might work on.
Writing property-based tests for Python is a great way to start contributing. The build system is simple, and you'll get a nice balance between using Hypothesis and exploring the standard library (and trying to break it 😉). Specifically, you might:
zlib
module. This was a very popular option!Working on Hypothesis itself can be rewarding, but it's also challenging - the codebase is larger, the build system more complicated, and things are generally more complex. If you're already a confident coder or have used Hypothesis though, they would be a valuable open source contribution.
functions
strategy #2425, making thefunctions()
strategy smarter about the return type. This is a whole new feature, if a small one, so you'll also need to write tests and release notes.My
hypothesis-jsonschema
library has some nice feature improvement issues. These involve calculating the 'intersection' of two JSON schemas, which describe the sets of allowed values, as a performance optimisation. If all goes well, I'll release a new version with your code on Monday!integers
schemas to useenum
python-jsonschema/hypothesis-jsonschema#39 is to actually list out all the allowed integers if there are only a few of them, for performance reasons. Still no new tests needed, but#38
has to be finished first.requires
andadditionalProperties: False
should return the empty schema python-jsonschema/hypothesis-jsonschema#30 is a more complicated case, because several keywords interact, but the workflow and tests are very similar.Scientific projects are also starting to use Hypothesis, so if you're keen on scientific or data-related code you could help write some tests from pydata/xarray#1846 - but note that I can only help you prepare a pull request here, not help get it merged.
Visual art is not my strong suit, but I would love logo proposals for
hypothesis-jsonschema
and Hypothesmith! You can draw on the hypothesis logo, imitate rjsf-team/react-jsonschema-form#1349 or the CSmith logo (adding the Python snakes somehow?), or design something from scratch.The text was updated successfully, but these errors were encountered: