Skip to content

DOC: doc building deps #6059

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

Closed
1 task done
jreback opened this issue Jan 24, 2014 · 30 comments
Closed
1 task done

DOC: doc building deps #6059

jreback opened this issue Jan 24, 2014 · 30 comments
Labels
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jan 24, 2014

@jorisvandenbossche
Copy link
Member

+1

And maybe scikits.timeseries can be removed from show_versions? Or is this still used somewhere?

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

technically its still in the docs building...and technically pandas still supports it....am thinking we should drop in it 0.14 though......

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

@jorisvandenbossche so I have a virtual envirnment where I can do python setup develop.py...but not picking up compiled extensions....how does it know where to find them?

happens whether I build in-place or in the build dir ....

sphinx 1.2 (or do I need newer?)

@jorisvandenbossche
Copy link
Member

OK, no problem (but +1 on deprecating/dropping it).

And it's not anymore a dependency for the docs building thanks to y-p: #5921

@jorisvandenbossche
Copy link
Member

For building the docs you will need or older (1.1.3) or newer (1.2.1, bug-fix release from a few days ago)

@jorisvandenbossche
Copy link
Member

Normally, if you do python setup develop.py inside your local pandas repo when the virtualenv is activated, then it should work (develop makes sure site-packages/pandas links to the pandas source code, so changes there are picked up).

And once you have that, just doing python setup.py build_ext --inplace when some c/cython code has changed to update.

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

that's all fine.....but the doc build is still picking up the wrong version (I also installed the built pandas in the virtual environ...looks like the correct version....)

@jorisvandenbossche
Copy link
Member

Ah, the docs are picking the wrong version. Well, I also had that issue some days ago after some upgrading/downgrading sphinx. For me, it had something to do with the sphinx-build script which referenced not the correct environment. I don't know if it is the same issue (for me it was with a conda environment and on Windows), but if so:

  • if you build the docs the sphinx-build script is called, and there is a first line like #usr/bin/python to specify your python executable.
  • For some reason (after upgrading/downgrading), this first line was wrong (it referenced to a wrong python, not the python of the environment. It should be #!/path/to/ENV/bin/python)
  • So if you can locate that sphinx-build script, you can check that.

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

its odd the built docs @y-p ....seem to have the same issue:
http://pandas.pydata.org/pandas-docs/dev/10min.html#selection-by-position

looking into it (see that iloc fails though it works correctly with ipython)

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

Does this path look right to you @jorisvandenbossche

By integer slices, acting similar to numpy/python

In [33]: pd.__version__
Out[33]: '0.13.0-293-g7cc84b2'

In [34]: np.__version__
Out[34]: '1.7.1'

In [35]: import sys

In [36]: sys.path
Out[36]: 
['/mnt/home/jreback/pandas/doc/sphinxext',
 '/mnt/home/jreback/py2/bin',
 '/mnt/home/jreback/py2/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
 '/mnt/home/jreback/py2/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg',
 '/mnt/home/jreback/py2/lib/python2.7/site-packages/pytz-2013.9-py2.7.egg',
 '/mnt/home/jreback/py2/lib/python2.7/site-packages/nose-1.3.0-py2.7.egg',
 '/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg',
 '/mnt/home/jreback/pandas',
 '/mnt/home/jreback/py2/lib/python27.zip',
 '/mnt/home/jreback/py2/lib/python2.7',
 '/mnt/home/jreback/py2/lib/python2.7/plat-linux2',
 '/mnt/home/jreback/py2/lib/python2.7/lib-tk',
 '/mnt/home/jreback/py2/lib/python2.7/lib-old',
 '/mnt/home/jreback/py2/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7',
 '/usr/local/lib/python2.7/plat-linux2',
 '/usr/local/lib/python2.7/lib-tk',
 '/mnt/home/jreback/py2/lib/python2.7/site-packages',
 '/mnt/home/jreback/pandas/doc/source/../../../sphinxext',
 '/mnt/home/jreback/py2/lib/python2.7/site-packages/IPython/extensions']

In [37]: df.iloc[3:5,0:2]
Out[37]: ---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-37-237bcf6d71f7> in <module>()
----> 1 df.iloc[3:5,0:2]

/mnt/home/jreback/py2/lib/python2.7/site-packages/IPython/core/displayhook.pyc in __call__(self, result)
    245             self.start_displayhook()
    246             self.write_output_prompt()
--> 247             format_dict, md_dict = self.compute_format_data(result)
    248             self.write_format_data(format_dict, md_dict)
    249             self.update_user_ns(result)

/mnt/home/jreback/py2/lib/python2.7/site-packages/IPython/core/displayhook.pyc in compute_format_data(self, result)
    155             
    156         """
--> 157         return self.shell.display_formatter.format(result)
    158 
    159     def write_format_data(self, format_dict, md_dict=None):

/mnt/home/jreback/py2/lib/python2.7/site-packages/IPython/core/formatters.pyc in format(self, obj, include, exclude)
    150             md = None
    151             try:
--> 152                 data = formatter(obj)
    153             except:
    154                 # FIXME: log the exception

/mnt/home/jreback/py2/lib/python2.7/site-packages/IPython/core/formatters.pyc in __call__(self, obj)
    479                 type_pprinters=self.type_printers,
    480                 deferred_pprinters=self.deferred_printers)
--> 481             printer.pretty(obj)
    482             printer.flush()
    483             return stream.getvalue()

/mnt/home/jreback/py2/lib/python2.7/site-packages/IPython/lib/pretty.pyc in pretty(self, obj)
    360                             if callable(meth):
    361                                 return meth(obj, self, cycle)
--> 362             return _default_pprint(obj, self, cycle)
    363         finally:
    364             self.end_group()

/mnt/home/jreback/py2/lib/python2.7/site-packages/IPython/lib/pretty.pyc in _default_pprint(obj, p, cycle)
    480     if getattr(klass, '__repr__', None) not in _baseclass_reprs:
    481         # A user-provided repr.
--> 482         p.text(repr(obj))
    483         return
    484     p.begin_group(1, '<')

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/base.pyc in __repr__(self)
     53         Yields Bytestring in Py2, Unicode String in py3.
     54         """
---> 55         return str(self)
     56 
     57 

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/base.pyc in __str__(self)
     33         if compat.PY3:
     34             return self.__unicode__()
---> 35         return self.__bytes__()
     36 
     37     def __bytes__(self):

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/base.pyc in __bytes__(self)
     45 
     46         encoding = get_option("display.encoding")
---> 47         return self.__unicode__().encode(encoding, 'replace')
     48 
     49     def __repr__(self):

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/frame.pyc in __unicode__(self)
    457             width = None
    458         self.to_string(buf=buf, max_rows=max_rows, max_cols=max_cols,
--> 459                        line_width=width, show_dimensions=True)
    460 
    461         return buf.getvalue()

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/frame.pyc in to_string(self, buf, columns, col_space, colSpace, header, index, na_rep, formatters, float_format, sparsify, nanRep, index_names, justify, force_unicode, line_width, max_rows, max_cols, show_dimensions)
   1289                                            max_cols=max_cols,
   1290                                            show_dimensions=show_dimensions)
-> 1291         formatter.to_string()
   1292 
   1293         if buf is None:

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/format.pyc in to_string(self, force_unicode)
    378             text = info_line
    379         else:
--> 380             strcols = self._to_str_columns()
    381             if self.line_width is None:
    382                 text = adjoin(1, *strcols)

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/format.pyc in _to_str_columns(self)
    311         # may include levels names also
    312         str_index = self._get_formatted_index()
--> 313         str_columns = self._get_formatted_column_labels()
    314 
    315         _strlen = _strlen_func()

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/format.pyc in _get_formatted_column_labels(self)
    543         else:
    544             fmt_columns = columns.format()
--> 545             dtypes = self.frame.dtypes
    546             need_leadsp = dict(zip(fmt_columns, map(is_numeric_dtype, dtypes)))
    547             str_columns = [[' ' + x

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/generic.pyc in dtypes(self)
   1944         """ Return the dtypes in this object """
   1945         from pandas import Series
-> 1946         return Series(self._data.get_dtypes(),index=self._info_axis)
   1947 
   1948     @property

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/internals.pyc in get_dtypes(self)
   2227 
   2228     def get_dtypes(self):
-> 2229         return self._get_types(lambda b: b.dtype)
   2230 
   2231     def get_ftypes(self):

/mnt/home/jreback/py2/lib/python2.7/site-packages/pandas-0.13.0_293_g7cc84b2-py2.7-linux-x86_64.egg/pandas/core/internals.pyc in _get_types(self, f)
   2213                 v = f(b)
   2214                 for rl in b.ref_locs:
-> 2215                     l[rl] = v
   2216             return l
   2217 

IndexError: list assignment index out of range
By lists of integer position locations, similar to the numpy/python style

@jorisvandenbossche
Copy link
Member

Ah, yes, I also saw that. But I think this is another issue, because I checked and I also have that in my latest local doc build (the <repr(<pandas.core.frame.DataFrame at 0x69700d0>) failed: IndexError: list assignment index out of range>)

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

yep...let me see if I can reproduce

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

@jorisvandenbossche any way to run the doc-build and have it break when I put in import pdb; pdb.set_trace(),
I keyboard interrupt but it doesn't like it....(I also tried doing this in the actual code, e.g. putting a debugger where I want it), but nothing......maybe like on nose a -s?

@jorisvandenbossche
Copy link
Member

Hmm, not directly an idea. The code is run in an embedded InteractiveShell in the ipython sphinx directive. Maybe http://ipython.org/ipython-doc/dev/api/generated/IPython.core.interactiveshell.html#IPython.core.interactiveshell.InteractiveShell.call_pdb is interesting. Or we should ask one of the ipython devs.

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

@jorisvandenbossche tried that....can't get it break into the shell....see if i can nail it down....

using print statements

@jorisvandenbossche
Copy link
Member

Also, it's not a typical error, as errors in the code example are printed out in the console where you type python make.py html. This one is not printed.

@ghost
Copy link

ghost commented Jan 24, 2014

Didn't dd8be69 remove st from the deps for building the docs??

@jorisvandenbossche
Copy link
Member

@y-p yes indeed #6059 (comment). The task bullet is then for removing it from show_versions.

ghost pushed a commit that referenced this issue Jan 24, 2014
BLD: add IPython and sphinx to show_versions #6059
@ghost
Copy link

ghost commented Jan 24, 2014

It's not hurting anyone, and I think it's still used by some tests. Why remove it?

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

its fine....ok closing

@jreback jreback closed this as completed Jan 24, 2014
@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

that's good
anywhere else in docs?
if not then would change print_versions (and prob take out of installation deps if there)

@ghost
Copy link

ghost commented Jan 24, 2014

Sometimes @jreback, I think you're two different people. and not just because
you put in as much code as any three ought to.

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

hmm shall I take that as a compliment ?

@ghost
Copy link

ghost commented Jan 24, 2014

yes.

I've already updated print_versions in #6064, is there anything else to do here?

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

no that looks fine

was just thinking we should remove scikit.timeseries from orint_versions as we don't have a dep for it for anything (docs or code)

@ghost
Copy link

ghost commented Jan 24, 2014

Like I mentioned earlier, still used as validation in tests:

~/src/pandas/pandas/ λ ag scikit
tseries/frequencies.py
422:# period frequency constants corresponding to scikits timeseries
490:    of the scikits.timeseries library.

tseries/plotting.py
2:Period formatters and locators adapted from scikits.timeseries by

tseries/period.py
298:        ``%F``, ``%q``. (formatting & docs originally from scikits.timeries)
508:    This ordinal representation is from the scikits.timeseries project.

tseries/tests/test_period.py
3:Parts derived from scikits.timeseries code, original authors:
52:        # bugs in scikits.timeseries
62:        # bugs in scikits.timeseries

tseries/tests/test_util.py
18:    New pandas of scikits.timeseries pivot_annual

src/period.h
2: * Borrowed and derived code from scikits.timeseries that we will expose via

stats/ols.py
53:            import scikits.statsmodels.api as sm

stats/var.py
32:            import scikits.statsmodels.tsa.var as sm_var

stats/tests/test_math.py
23:        import scikits.statsmodels.api as sm

stats/tests/test_moments.py
73:            from scikits.timeseries.lib import cmov_mean
75:            raise nose.SkipTest("no scikits.timeseries")
91:            from scikits.timeseries.lib import cmov_window
93:            raise nose.SkipTest("no scikits.timeseries")
109:            from scikits.timeseries.lib import cmov_window
111:            raise nose.SkipTest("no scikits.timeseries")
133:            from scikits.timeseries.lib import cmov_window
135:            raise nose.SkipTest("no scikits.timeseries")
146:            from scikits.timeseries.lib import cmov_window
148:            raise nose.SkipTest("no scikits.timeseries")
163:            from scikits.timeseries.lib import cmov_window
165:            raise nose.SkipTest("no scikits.timeseries")
179:            from scikits.timeseries.lib import cmov_window
181:            raise nose.SkipTest("no scikits.timeseries")

stats/tests/common.py
51:            import scikits.statsmodels.api as sm

stats/tests/test_var.py
16:    import scikits.statsmodels.tsa.var as sm_var
17:    import scikits.statsmodels as sm

stats/tests/test_ols.py
33:        import scikits.statsmodels.api as sm

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

didn't see that ok then

@jreback
Copy link
Contributor Author

jreback commented Jan 24, 2014

so turns out that those dtypes warnings you were getting WERE a bug....very hard to track down...but got it...

I guess the obvious solution is the right one! (a bug and not a config issue)

@jorisvandenbossche
Copy link
Member

Can confirm the odd error in the docs in gone!

@jreback Did you succeed to get the docs built with pandas master?

@jreback
Copy link
Contributor Author

jreback commented Jan 25, 2014

@jorisvandenbossche yes error is gone...it was a 'real' error, pretty tricky to reproduce but squashed

thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants