kibble-1 icon indicating copy to clipboard operation
kibble-1 copied to clipboard

Tests Needs

Open aligoren opened this issue 6 years ago • 10 comments

Hi.

I know there is not many contributors here.

But even like that, I think we should write tests.

Before then I think some modules should be rewritten. I know this isn’t easy.

Every developer in this project has its work like me.

Maybe we think a new structure with Flask or an async framework like Bocadillo.

Maybe we talk about the documentation in a different issue.

aligoren avatar Jun 10 '19 19:06 aligoren

Tests would be awesome. I'm not sure where to start - perhaps with the server API? I know there have been some shortcuts made to speed up processes in the OpenAPI department, that should probably get fixed :) (such as response definitions left very open)

Humbedooh avatar Jun 10 '19 19:06 Humbedooh

Hehe :) yes. I’ll read whole codebase to understand how it works.

Because there are also no docstrings.

I’ll try to find friends to make this project much betters.

aligoren avatar Jun 10 '19 19:06 aligoren

Hey guys. Maybe pre-commit will be a good idea to starts with? I can do it, a least try to do it. https://pre-commit.com/

michalslowikowski00 avatar Oct 02 '20 06:10 michalslowikowski00

+1 for introducing pre-commit. It will allow us to assert code quality as a first step and then we can add tests that can also be run using this tool (+ pytest).

If someone is not familiar with this framework - it's a simple tool that allows users to share and install git hooks that are run before commit. In this way the code quality (and more) is checked even before making a contribution. Of course - it's not necessary but it helps a lot. We use this in Apache Airflow to automatically verify multiple things such as code style, language style (no black and white lists and so on) and formatting of documentation 👍

Probably it would be good to consider using some CI to avoid regression in the future. WDYT @Humbedooh @sharanf @michalslowikowski00 ?

turbaszek avatar Oct 06 '20 16:10 turbaszek

@turbaszek yes, absolutely, +1 for the CI. I thought that the Circle CI is implemented here. But it is not.

michalslowikowski00 avatar Oct 06 '20 19:10 michalslowikowski00

@michalslowikowski00 thanks for the suggestion. And it sounds like a good practical idea - I like it. Let me check any other community feedback.

sharanf avatar Oct 06 '20 19:10 sharanf

@sharanf should we introduce some proposals via the dev list?

michalslowikowski00 avatar Oct 06 '20 19:10 michalslowikowski00

@michalslowikowski00 yes for new stuff, it is best to see if others have an opinion and you will see that I have already started this discussion there :-)

sharanf avatar Oct 06 '20 19:10 sharanf

I subscribed dev list. :)

michalslowikowski00 avatar Oct 06 '20 20:10 michalslowikowski00

Ok, so we've got CI up and running. Now it's time to think about testing 😄

From discussions in #38 and #48 it seems that it would be wise to rethink the backend of API (+1 for using a framework as @aligoren suggested). But before we decide on something I think it would be a good step to add test coverage for existing API so we are sure that the UI will still work.

Currently, there's 61 API endpoints defined in openapi spec, each can be used with ~2 methods, so we need about 120 test. That's is not that much if we make those test generic and easy to write.

turbaszek avatar Oct 17 '20 10:10 turbaszek