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

TST/CI: make sure that locales are tested #5073

Merged
merged 3 commits into from
Oct 9, 2013
Merged

TST/CI: make sure that locales are tested #5073

merged 3 commits into from
Oct 9, 2013

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Oct 1, 2013

related #4918

@ghost ghost assigned cpcloud Oct 1, 2013
@jreback
Copy link
Contributor

jreback commented Oct 1, 2013

we pass on these? so #4918 can close? (or maybe have him retest, AFAIK all the other issues are resolved)

@cpcloud
Copy link
Member Author

cpcloud commented Oct 1, 2013

yep passes

was not writing to the init file bc duh i should write directly to pandas repo, not after it's installed

i'm actually doing what @Komnomnomnom did to repro the issue by setting the locale in Python at the top of pandas/__init__.py after install

@cpcloud
Copy link
Member Author

cpcloud commented Oct 2, 2013

@jreback getting those errors

py26: https://travis-ci.org/cpcloud/pandas/jobs/12032903

also some new errors show up in the slow build

https://travis-ci.org/cpcloud/pandas/jobs/12032904

guess the locale wasn't really being set before

@jreback
Copy link
Contributor

jreback commented Oct 2, 2013

gr8!

@jreback
Copy link
Contributor

jreback commented Oct 2, 2013

do you know why the google tests are failing?

@cpcloud
Copy link
Member Author

cpcloud commented Oct 2, 2013

no...will also require some digging

@cpcloud
Copy link
Member Author

cpcloud commented Oct 8, 2013

@avalentino can you test again when you get a chance? thanks.

@avalentino
Copy link
Contributor

@avalentino can you test again when you get a chance? thanks.

Just one error remaining

$ git describe 
v0.12.0-781-gde4cd21

$ nosetests -w pandas
[...]

======================================================================
ERROR: test_url (pandas.io.tests.test_json.test_pandas.TestPandasContainer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/antonio/pandas-venv/pandas/pandas/util/testing.py", line 1061, in network_wrapper
    return t(*args, **kwargs)
  File "/home/antonio/pandas-venv/pandas/pandas/io/tests/test_json/test_pandas.py", line 577, in test_url
    result = read_json(url)
  File "/home/antonio/pandas-venv/pandas/pandas/io/json.py", line 189, in read_json
    date_unit).parse()
  File "/home/antonio/pandas-venv/pandas/pandas/io/json.py", line 257, in parse
    self._parse_no_numpy()
  File "/home/antonio/pandas-venv/pandas/pandas/io/json.py", line 474, in _parse_no_numpy
    loads(json, precise_float=self.precise_float), dtype=None)
ValueError: Expected object or value
-------------------- >> begin captured stdout << ---------------------
Failed: ValueError('Expected object or value',)

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 4022 tests in 128.509s

FAILED (SKIP=259, errors=1)

@jreback
Copy link
Contributor

jreback commented Oct 8, 2013

cc @Komnomnomnom can you give a quick look, this is in a non-us locale: it_IT.UTF-8

@Komnomnomnom
Copy link
Contributor

I think this is a problem with the test, I consistently get:

➜ nosetests -vs pandas.io.tests.test_json.test_pandas:TestPandasContainer.test_url                                            [py27]  git:(16035df) ✗
test_url (pandas.io.tests.test_json.test_pandas.TestPandasContainer) ... SKIP: Skipping test HTTP Error 410: Gone

The test requests data from http://search.twitter.com/search.json?q=pandas%20python but it looks like this is no longer valid, sticking it in a browser results in:

{"errors": [{"message": "The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.", "code": 68}]}

and according to the twitter docs

In version 1.1, we're requiring applications to authenticate all of their requests with OAuth 1.0a or Application-only authentication.

So

1 I'm not sure @avalentino why you aren't seeing the SKIP, it does look like JSON is being passed an empty string in your case:

In [2]: pd.read_json('')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-2bbdc38cf707> in <module>()
----> 1 pd.read_json('')

ValueError: Expected object or value

2 @jreback, @cpcloud what do you want to do with this test (I'm not the original author). Remove it or find a different url?

@Komnomnomnom
Copy link
Contributor

FYI the test passes for me (in it_IT locale) if I remove the twitter request (it's already sending a request to github anyway and it doesn't even check the twitter result so it's pretty redundant regardless).

@cpcloud
Copy link
Member Author

cpcloud commented Oct 8, 2013

couldn't we use this?

http://www.jsontest.com/

@cpcloud
Copy link
Member Author

cpcloud commented Oct 8, 2013

yep that looks good ... i'll update the test

@cpcloud
Copy link
Member Author

cpcloud commented Oct 9, 2013

actually nvm we can just remove the twitter ... it's already being tested with github's API

@cpcloud
Copy link
Member Author

cpcloud commented Oct 9, 2013

@jreback @jtratner comments? want to get this in ...

@jreback
Copy link
Contributor

jreback commented Oct 9, 2013

looks ok to me
big changes!

@cpcloud
Copy link
Member Author

cpcloud commented Oct 9, 2013

@avalentino Can u give this another go and see if anything turns up? Thanks

@cpcloud
Copy link
Member Author

cpcloud commented Oct 9, 2013

nothing crazy here just cleaning up a bit of rot in the CI stuff and test_pandas/test_json.py tests

cpcloud added a commit that referenced this pull request Oct 9, 2013
TST/CI: make sure that locales are tested
@cpcloud cpcloud merged commit b0cd607 into pandas-dev:master Oct 9, 2013
@cpcloud cpcloud deleted the travis-locale branch October 9, 2013 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants