-
What are the best practices for tests in backends that live outside the ibis repository? From our (@amueller and myself) exploration, currently, our understanding is that the set of backends is being inferred using the file structure within the repository (relevant code link here). @datapythonista Please suggest. If any related changes can be a useful contribution to the Ibis repository, I will be happy to work on it. Thanks! Edit 1: To add more context, I would like to run tests on the SQL Server backend, hosted here. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Let me try to summarize what I've got in mind (surely open to discussion, and in practice things can be more complex). We've got 3 different kinds of tests I'd say:
If we agree on this, I don't think you care about the core ibis tests, and you are already running the tests specific to your backend. So, what is missing is the generic backend tests in These generic backend tests were designed assuming all backends would be in this repo, and are not so generic in practice. They've got lots of decorators like Also, each backend has a To me, what would be ideal is:
All this is a decent amount of work. It'd be great if you can work on it, but it's difficult to know where to start. You've got #2564 you can work on, but there are not many other tickets well defined. I think checking which tests are run conditional depending on the backend, and trying to specify backend traits that could be used to know when to run the tests would be very helpful. And even better writing in an issue an "inventory" of conditional tests, which backends are included/excluded, and brainstorm on the different kinds of backends. CC @tswast we'll eventually need this for bigquery too (and for OmniSci and others) |
Beta Was this translation helpful? Give feedback.
-
Thanks for a great summary, and I totally agree on the ideal outcome. I think to unblock @kvemani, we don't necessarily need these two yet:
Which are probably the hardest for someone not intimately familiar with the project to approach.
I think releasing with Ibis would be fine, and having an interface to that would be the most important part to get us started. This decorator yields all the tests that are applicable to a given model in sklearn via the tags. For a first step, it's already useful to know what fails, and so having some generator or other mechanism that yields the tests so they can be run within the backend would be awesome. |
Beta Was this translation helpful? Give feedback.
-
Agree. Also happy to move forward with other solutions that are not the ideal, but fix our immediate problems, and don't make things more complex. For example, I'm happy to work on the releasing of the tests, try them in master for mssql (and any other tihrd-party backend, and add stuff like |
Beta Was this translation helpful? Give feedback.
-
Awesome, I think that would be super helpful! |
Beta Was this translation helpful? Give feedback.
-
Factoring out the backend tests into a separate library might be worth the effort if it enables folks to validate third party backends easily. This would also trim the core of the ibis test suite considerably, allow it to focus solely on expressions. The main downside here is that testing changes to ibis becomes more cumbersome. I don't think we'd be ready to build this kind of library until we have more stability in the internals. We're planning on gutting some of the internals in 2022, so splitting out would have to happen after that. |
Beta Was this translation helpful? Give feedback.
-
xref: #2307 |
Beta Was this translation helpful? Give feedback.
-
I think at this time we're not considering making the ibis backend test suite workable with arbitrary third party backends. |
Beta Was this translation helpful? Give feedback.
I think at this time we're not considering making the ibis backend test suite workable with arbitrary third party backends.