Skip to content

DOC: building page for nested methods doesn't work #46806

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

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Apr 19, 2022

closes #46804

Like this

 python make.py clean && python make.py --single pandas.Series.str.rsplit

and

 python make.py clean && python make.py --single pandas.Series.value_counts

and

 python make.py clean && python make.py --single pandas.Series

have their docs built fine

cc @jorisvandenbossche

I didn't find any tests for building docs - are they just tested manually?

@MarcoGorelli MarcoGorelli marked this pull request as draft April 19, 2022 22:25
@MarcoGorelli MarcoGorelli marked this pull request as ready for review April 20, 2022 07:22
@mroeschke
Copy link
Member

So this works locally for you? (Doc build passed which is promising)

@mroeschke mroeschke added this to the 1.5 milestone Apr 24, 2022
@MarcoGorelli
Copy link
Member Author

Yup, worked for a contributor too

I'll see if I can put a quick check for this together

@MarcoGorelli
Copy link
Member Author

Doc build passed which is promising

Building with --single wasn't previous tested though, so it would've passed anyway 😄 Have added a quick check for it to the doc build job

@MarcoGorelli MarcoGorelli marked this pull request as draft April 24, 2022 12:51
@MarcoGorelli MarcoGorelli marked this pull request as ready for review April 24, 2022 13:05
@mroeschke mroeschke merged commit b4ed8cf into pandas-dev:main Apr 30, 2022
@mroeschke
Copy link
Member

Very nice! Thanks @MarcoGorelli

@MarcoGorelli MarcoGorelli deleted the fix-single-build-for-accessors branch April 30, 2022 18:05
@rhshadrach
Copy link
Member

@MarcoGorelli - running the code_checks locally, I now get some docs opening up in my browser:

pandas/doc/make.py

Lines 236 to 242 in c5610d2

if ret_code == 0:
if self.single_doc_html is not None:
self._open_browser(self.single_doc_html)
else:
self._add_redirects()
if self.whatsnew:
self._open_browser(os.path.join("whatsnew", "index.html"))

I don't think this was intentional, right? No much of an issue, more of an oddity. Could we add an argument, e.g. --open-browser that when unspecified gives current behavior and when specified overrides? Then we could do open-browser=False in the code checks.

@MarcoGorelli
Copy link
Member Author

Hey @rhshadrach

I don't think this was intentional, right?

that's right

how about

    argparser.add_argument(
        "--no-browser", help="Don't open browser", action="store_true"
    )

which, if passed, won't open the browser, and if not passed, retains the current behaviour?

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
* fix single_doc for nested attributes

* keep current behaviour for building pandas.Series

* add check for --single to CI

* dont check Series in --single (attributes dont necessarily build)

* move location of if

* move check to code-checks.yml

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

Successfully merging this pull request may close these issues.

DOC: building page for nested methods doesn't work
3 participants