Skip to content

FIX: doc imports #4419

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

Merged
merged 1 commit into from
Aug 1, 2013
Merged

FIX: doc imports #4419

merged 1 commit into from
Aug 1, 2013

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Jul 31, 2013

Bunch of doc build cleanups

closes #4418.

@ghost ghost assigned cpcloud Jul 31, 2013
import compiler
import inspect
import textwrap
import tokenize

from .compiler_unparse import unparse
from compiler_unparse import unparse
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this ought to be an absolute import for Python 3. If it's having issues, can add from __future__ import absolute_imports to fix it.

@cpcloud
Copy link
Member Author

cpcloud commented Jul 31, 2013

Jinja2 from pip doesn’t work for python 3 so it's a moot point.

@cpcloud
Copy link
Member Author

cpcloud commented Jul 31, 2013

i should say it doesn't work for py3.2

@cpcloud
Copy link
Member Author

cpcloud commented Jul 31, 2013

also not sure how to deal with the relative import issue i'll try the abs import

@cpcloud
Copy link
Member Author

cpcloud commented Jul 31, 2013

@jtratner
Copy link
Contributor

Maybe put an __init__.py in doc and then import with doc at top level.

@jtratner
Copy link
Contributor

or just do sphinxext and then just from sphinext.blahblah import

@cpcloud
Copy link
Member Author

cpcloud commented Jul 31, 2013

i got it to build....issue is that conf.py lists plot_directives from matplotlib but then pandas includes its own.... not sure what that's about

@cpcloud
Copy link
Member Author

cpcloud commented Jul 31, 2013

now i'm fixing the slew of python3 incompatible doc examples

@cpcloud
Copy link
Member Author

cpcloud commented Jul 31, 2013

wow almost all were fixed by this single line

from pandas.compat import lzip as zip

@jtratner
Copy link
Contributor

could make it explicit with these two lines:

perl -pi -e "s/zip/lzip/g" ./doc/**/*.py
perl -pi -e "s/from pandas.compat import lzip as zip/from pandas.compat import lzip/" ./doc/**/*.py

so it's explicit. added terminating slash

@cpcloud
Copy link
Member Author

cpcloud commented Jul 31, 2013

arg these compat issues are SO annoying

@cpcloud
Copy link
Member Author

cpcloud commented Jul 31, 2013

bottom line for now is that the docs need to be able to be built on py2.7 which they can't be right now

@jtratner
Copy link
Contributor

@cpcloud just revert my edits to the docs (i.e., back before the merge commit from jreback), dump everything but the docs/*.py changes and commit it. They worked before that, if we're only building on 2.7, then who cares about compatibility?

@jtratner
Copy link
Contributor

I think it would be:

git checkout 338f3406fadc6d114accbc94fac6c7ba075a10f5 -- docs/**/*.py docs/*.py

@jreback
Copy link
Contributor

jreback commented Jul 31, 2013

this fixes the doc building??

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

not quite...still need to add the changes to examples for py3 compat

@jtratner
Copy link
Contributor

jtratner commented Aug 1, 2013

ohhh :-/

@jtratner
Copy link
Contributor

jtratner commented Aug 1, 2013

@cpcloud after you fix this, maybe we should add docs build to Travis on 2.7 so that changes to docs to stop them from building don't happen again.

Also, I apologize for not catching this - I just didn't think to run make docs.

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

no problem...happy that i can now run py3 except for docs!

add to slow build or "production"? i think production since that has scikits.timeseries

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

also getting some use out of vim grep which i should probably use more often

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

actually Ack as it turns out is much better

@jtratner
Copy link
Contributor

jtratner commented Aug 1, 2013

@cpcloud are you using the vim ack plugin? very useful. That + Ctrl-P is really helpful.

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

i love ctrl+p!

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

like emacs ido-mode

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

i feel like this is attack of the killer ranges!

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

i'll add the doc build to this PR

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

ok whew got them working ... fixes on the way

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

yeah so i don't think the doc build on travis is a good idea

would have to install R which requires a whole boatload of packages (55 MB d'load) which will be breathtakingly slow when travis is running in 1990 28.8K mode

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

@jreback ok 2 merge?

@jreback
Copy link
Contributor

jreback commented Aug 1, 2013

all docs fixed??? crazy

ok

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

yep docs fixed

@jreback
Copy link
Contributor

jreback commented Aug 1, 2013

ok then!

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

can u pull down and do a doc build just to make sure? i built on arch succesfully, i'll build on ubuntu 13.04

@jreback
Copy link
Contributor

jreback commented Aug 1, 2013

sure
will be tomorrow morn

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

ok sounds good

@cpcloud
Copy link
Member Author

cpcloud commented Aug 1, 2013

no rush i can also just merge if u think it's ok

@jreback
Copy link
Contributor

jreback commented Aug 1, 2013

looks good...go ahead and merge

cpcloud added a commit that referenced this pull request Aug 1, 2013
@cpcloud cpcloud merged commit ee0d3e4 into pandas-dev:master Aug 1, 2013
@cpcloud cpcloud deleted the fix-doc-imports branch August 1, 2013 11:41
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.

make doc no longer works
3 participants