Skip to content
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

Fix typo made in #1964 #2106

Merged
merged 8 commits into from
Jun 2, 2020
Merged

Conversation

vnlitvinov
Copy link
Contributor

@vnlitvinov vnlitvinov commented Mar 2, 2020

#1964 changed the API for OmniSciDBClient but didn't change all usages of device= parameter when constructing a client. In my case a connection.database() call was failing.

@xmnlab
Copy link
Contributor

xmnlab commented Mar 4, 2020

@vnlitvinov thanks for caching that up.

could you add tests for that to omniscidb/tests/?

would be good to have a test for the 2 cases, when the database name is the same of the current_database and for a different name (maybe you can use the omnisci database or you will need to create a temporary database for the test.

thanks!

@xmnlab xmnlab added bug Incorrect behavior inside of ibis omnisci labels Mar 6, 2020
@vnlitvinov
Copy link
Contributor Author

vnlitvinov commented Mar 12, 2020

@abykovsk could you please take a stab at making required tests?

@datapythonista
Copy link
Contributor

@abykovsk could you please take a stab at making required tests?

There should be a test that failed before merging #1964, so this never broke. There is this tests but since name == None the breaking code is never called. I guess you can add a pytest parametrization to that test, so it's called with name == None but also to a different database name to the current want.

@jreback jreback added this to the Next Bugfix Release milestone Mar 20, 2020
@pep8speaks
Copy link

pep8speaks commented Mar 31, 2020

Hello @vnlitvinov! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-06-01 15:29:44 UTC

@vnlitvinov
Copy link
Contributor Author

would be good to have a test for the 2 cases, when the database name is the same of the current_database and for a different name

I have added a separate test (the case where database name is same as current behaves exactly the same as with database name being None and is already handled by test_database_layer).
I tried parametrizing it first, but felt it would end up too complex (and it would actually test two unrelated things which isn't good for a unit test), so I wrote a new test instead.

Copy link
Contributor

@xmnlab xmnlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @vnlitvinov for working on that!

@vnlitvinov
Copy link
Contributor Author

Anything left for me to do to make this accepted?

ibis/omniscidb/tests/test_client.py Outdated Show resolved Hide resolved
@jreback
Copy link
Contributor

jreback commented Apr 9, 2020

looks ok, but tests are failing

@vnlitvinov
Copy link
Contributor Author

I know, we're looking at it. The test should probably be enabled only for SQL-like backends.

@abykovsk abykovsk force-pushed the fix-1964-typo branch 4 times, most recently from 0bcd13f to f64315f Compare May 12, 2020 09:13
@abykovsk abykovsk force-pushed the fix-1964-typo branch 3 times, most recently from 408b0e6 to 0518fa0 Compare May 13, 2020 08:52
@vnlitvinov vnlitvinov requested a review from jreback May 15, 2020 12:05
@vnlitvinov
Copy link
Contributor Author

@jreback ping :)

@jreback
Copy link
Contributor

jreback commented May 19, 2020

@vnlitvinov omnisci is currently not being tested, so all merging on hold

@vnlitvinov
Copy link
Contributor Author

What's the reason for this? Can we help with that being fixed?

@jreback
Copy link
Contributor

jreback commented May 19, 2020

#2201

@datapythonista
Copy link
Contributor

@vnlitvinov can you merge master, and check if the CI is still green please? CI is working for omnisci, we can move forward with this now

@vnlitvinov
Copy link
Contributor Author

@datapythonista I've rebased instead for a cleaner history.

@vnlitvinov
Copy link
Contributor Author

The CI failures look strange and unrelated to our changes... can I do something to get this merged?

@jreback
Copy link
Contributor

jreback commented Jun 1, 2020

@vnlitvinov we need a test that fails on master and is fixed by this change

@vnlitvinov
Copy link
Contributor Author

vnlitvinov commented Jun 1, 2020

@jreback it would be nice to see this requirement a bit earlier than in almost 3 months... in a PR fixing a typo (original diff was one line).

Am I reading this right that you want me to make a separate PR (with a failing test) which would turn master CI red, and only then fix that test? All for 1 line (and two words) worth of a change?..

Also note there is a test added that would fail on master if ran now: https://github.com/ibis-project/ibis/pull/2106/files#diff-2268971ed7d3b780e597e36b7a466045R203

@jreback
Copy link
Contributor

jreback commented Jun 1, 2020

i commented quite a while ago on this

one line or a million it doesn’t matter

if something is claimed to be fixed then it needs a test

often the test are way longer than the patch

i want a test included with this PR
one that fails in master

@vnlitvinov
Copy link
Contributor Author

i want a test included with this PR
one that fails in master

https://github.com/ibis-project/ibis/pull/2106/files#diff-2268971ed7d3b780e597e36b7a466045R203

ibis/tests/all/conftest.py Outdated Show resolved Hide resolved
ibis/tests/all/conftest.py Outdated Show resolved Hide resolved
ibis/tests/all/conftest.py Outdated Show resolved Hide resolved
ibis/tests/all/conftest.py Outdated Show resolved Hide resolved
@jreback
Copy link
Contributor

jreback commented Jun 1, 2020

changes look ok. rebase on master and some comments, ping on green.

@vnlitvinov
Copy link
Contributor Author

@jreback I think we addressed all your comments (so I marked them as resolved), and after merge with master CI is finally green.

@jreback jreback merged commit 6931e5d into ibis-project:master Jun 2, 2020
@jreback
Copy link
Contributor

jreback commented Jun 2, 2020

thanks @vnlitvinov

@vnlitvinov vnlitvinov deleted the fix-1964-typo branch June 19, 2020 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior inside of ibis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants