Skip to content

Doc build leaves behind a test.json file #19815

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
TomAugspurger opened this issue Feb 21, 2018 · 6 comments · Fixed by #19879
Closed

Doc build leaves behind a test.json file #19815

TomAugspurger opened this issue Feb 21, 2018 · 6 comments · Fixed by #19879

Comments

@TomAugspurger
Copy link
Contributor

I think from

print(new_df.index.name)
.

It should be removed in a hidden ipython block afterwards.

.. ipython:: python
   :suppress:

   import os
   os.remove('test.json')
@gfyoung
Copy link
Member

gfyoung commented Feb 21, 2018

@TomAugspurger : Alternatively, you can write to an IO object (instead of an actual file) and then read that instead (no cleanup needed afterwards).

@TomAugspurger
Copy link
Contributor Author

TomAugspurger commented Feb 21, 2018 via email

@gfyoung
Copy link
Member

gfyoung commented Feb 21, 2018

Sure, but I'm thinking about if that's the best way to do it (meaning it might not be newcomer-friendly). Mind you that os.remove is not the nicest of things on Windows, so if users try to build docs there, that could be problematic.

@TomAugspurger
Copy link
Contributor Author

TomAugspurger commented Feb 21, 2018 via email

@gfyoung
Copy link
Member

gfyoung commented Feb 21, 2018

That's fair. If this is just a one-off patch (i.e. we cleanup files elsewhere I presume), then I suppose adding this clean-up is fine then. I'm still personally in the IO object camp, but not going to fight over one simple use case in the docs. 😄

@jjames34
Copy link
Contributor

I'm taking this on for HackIllinois!

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

Successfully merging a pull request may close this issue.

4 participants