4 ms·
I really like the overall design and ethos, but a new project without typehints, pydoc, and at least some tests just isn't the kind of thing I'd bring into my s
by hannibalhorn 4y ago
I really like the overall design and ethos, but a new project without typehints, pydoc, and at least some tests just isn't the kind of thing I'd bring into my stack. Hope it gets a little bit of polish!
- notacop31337 4y agoI understand the idea of moving "iteratively" etc, but this is a major thing for me when projects are mentioned as "only took a week to get this all done" yet a lot of commonly accepted best practice is left by the way side.
- welder 4y agoTests? We don't need no stinking tests! [1] I didn't plan to open source this so quickly, if ever. I'm just happy it's working for WakaTime. The makefile has plans for pytest, but honestly my motivation for tests has waned after fixing the production issues with Celery. [1] https://en.wikipedia.org/wiki/Stinking_badges https://en.wikipedia.org/wiki/Stinking_badges
- swyx 4y agowell theres a cold start problem here. your bar for adoption is understandable, yet OP is probably also seeking substantive feedback on the solution and the problem space. the top hn comments now provide neither. this discourages future posts by people testing the waters. acceptable individually but on aggregate the community loses out (eg imagine if we judged segment and sentry at launch with these standards).
- nerdponx 4y agoSeems more like a hobby project than an attempt at a serious production-grade library. But you never know, it might become one some day!
- glaucon 4y agoAh yes, "hobby projects" you don't want to go paying those any attention ... https://en.wikipedia.org/wiki/History_of_Linux#The_creation_of_Linux https://en.wikipedia.org/wiki/History_of_Linux#The_creation_... ...
- welder 4y agoIt's being used in production at https://wakatime.com https://wakatime.com and performing better than Celery was, but yes it's an internal project that was open sourced early stage.
- nerdponx 4y agoYou are pretty damn brave to build your own distributed task queue and put it into production without tests!
- heavenlyblue 4y agoThey are not brave, they are just fixing all issues manually whenever a customer calls them about it.
- welder 4y agoI built a local test app that does have some integration tests, and then I just went all in on production. That's why I was surprised it worked so well. I was ready to lose a few nights sleep debugging it in prod, but thankfully didn't have to.
- welder 4y agoIt does have some typehints... but I don't like Python types when they require importing the object only for the purpose of types. I only import objects when they're actually used in the non-type code, and I don't like to use `if typing.TYPE_CHECKING`. These days I use Go when I need types.
- ttymck 4y agoWhy is this a problem? When would you reference the type but not actually need the type? If you're returning the type from some method in your API, but not instantiating it there?
- welder 4y agoYes, if you're accepting the type as a param or returning the type. It happens very frequently, and without moving those imports behind "if typing.TYPE_CHECKING", you constantly run into cyclic imports. https://stackoverflow.com/questions/39740632/python-type-hinting-without-cyclic-imports https://stackoverflow.com/questions/39740632/python-type-hin...
- deleted 4y ago[deleted]
- heavenlyblue 4y agoIt happens very frequently if you are not very good at separating your data model from logic.
- welder 4y agoWhy would there exist a way in Python to conditionally import types, for the purpose of preventing cyclic imports, if cyclic imports weren't a problem? Your comment makes it seem like you haven't experienced Python types enough, or you wouldn't think it was so easy.
- 4y ago
- deleted 4y ago[deleted]