-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DOC: Improving code quality of doc/make.py, PEP-8 and refactoring (#19631) #19634
Conversation
doc/make.py
Outdated
cls._sphinx_build('html') | ||
|
||
@classmethod | ||
def zip_html(cls): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a lot of these are not used so can be removed
@TomAugspurger @jorisvandenbossche
IOW we only need html, latex, clean, can remove all of the upload* ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zip_html is also used.
I did use the upload commands when I uploaded the docs. Not sure how Tom currently does it (I know we changed some things in where we upload the versioned docs and how they are symlinked)
doc/make.py
Outdated
"""Alias to build HTML by default.""" | ||
cls.html() | ||
|
||
@classmethod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we actually support this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the current script does, both python make.py
and python make.py all
are equivalent to python make.py html
. Would rather get rid of all
and would show the usage if no command is provided, but I tried to keep compatibility with the old script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i understand but let's remove what we dont need instead
doc/make.py
Outdated
cls.auto_dev(debug=True) | ||
|
||
@classmethod | ||
def build_pandas(cls): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when is this actually called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current script supports python make.py build_pandas
, not sure if anyone is using it, happy to get rid of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never used it myself
Updated the PR, I left Just let me know if something else should be kept. |
latex_forced is used as well I think |
Yep latex_forced is user too.
https://github.com/pandas-dev/pandas/wiki/Release-Checklist should have everything other than the symlinks, which I’ve done manually.
…________________________________
From: Joris Van den Bossche <[email protected]>
Sent: Sunday, February 11, 2018 4:08:19 PM
To: pandas-dev/pandas
Cc: Tom Augspurger; Mention
Subject: Re: [pandas-dev/pandas] DOC: Improving code quality of doc/make.py, PEP-8 and refactoring (#19631) (#19634)
latex_forced is used as well I think
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#19634 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABQHIsfvrD2eKVCJCu2MfzdcSrMbbGkFks5tT2TTgaJpZM4SBAvW>.
|
…moving unused commands (#19631)
Updated the PR with @TomAugspurger, we've got rid of Just let me know if you think that's a good idea. |
thanks @datapythonista so this will prob need to have a followup with some instructions on how to use it? or is completely obvious from the --help? maybe a README.md? |
@jreback a README never hurts, and we could surely have some more info, but I think the usage is quite covered in:
I'm working in implementing a way to build a single document from the api (and pep8fying |
What do you already have? Because I updated yesterday my script I shared, and it is basically working (was planning to do a PR to add it this morning, but did not yet come to it) |
@jorisvandenbossche I'll share what I've got in a branch later today. But my approach was to create a temporary directory, copy the files to have a minimal sphinx project there, run sphinx on it, and then copy the single api page it generates to the real project. I see 2 advantages in this approach, first I found it tricky to build a single page from the api from sphinx, and second I prefer to avoid deleting all the .rst files to build the project. Doing a |
you know —single already exists yes? |
@jreback thanks for double checking, but yes, I do. Actually I want to reuse it for simplicity of the interface. But now you can do something like |
I was planning to remove this "OK to delete those files" as well, as it is indeed very annoying (and I think not needed, if you specify to sphinx that those files can be ignored, that's the approach I was taking) I will put up my approach as well as a PR, and then you can test it and we can see which approach is the easiest for the end user. |
@jorisvandenbossche if you plan to remove the file deletion, which I think it's implemented in sphinx If you can build a single api doc without deleting the rst, that's a surely much better approach than what I did. I didn't see how to do that. There are still couple of things missing, but this is my approach: datapythonista@5b4cc3b |
@datapythonista my attempt is here: #19840. I used #19839 will not give too much conflict, I only deleted some lines from conf.py |
…moving unused commands (pandas-dev#19631) (pandas-dev#19634)
closes DOC: enable parallel building of the docs #15591
closes doc/make.py only works for development build #10340
git diff upstream/master -u -- "*.py" | flake8 --diff
Summary of the PR: