-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: create shared includes for comparison docs #38771
Conversation
This will help ensure consistency between the examples.
@@ -65,24 +65,9 @@ Filtering in SQL is done via a WHERE clause. | |||
|
|||
SELECT * | |||
FROM tips | |||
WHERE time = 'Dinner' | |||
LIMIT 5; |
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.
This is the only change of substance: left out the LIMIT
and the .head(5)
below since they aren't needed and LIMIT
is covered elsewhere.
Heh, this pull request is failing differently than #38735: Sigh. Though I planned to use these includes for the Excel page, maybe not worth the trouble. Thoughts? |
:ref:`boolean indexing <indexing.boolean>` | ||
|
||
.. ipython:: python | ||
|
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 think in all of these you need a :suppress:
directive that defines tips :->
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.
Done. It's a bit of a hack, so let me know if you'd like it done differently.
:suppress: | ||
|
||
# ensure tips is defined when scanning with flake8-rst | ||
if 'tips' not in vars(): |
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 think you can just add this
url = (
"https://raw.github.com/pandas-dev"
"/pandas/master/pandas/tests/io/data/csv/tips.csv"
)
tips = pd.read_csv(url)
but maybe @jorisvandenbossche has a better soln
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.
But we would want to avoid to read this data multiple times in each file during the doc build, I think, so ideally we can let flake-rst ignore this in a different way
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.
But we would want to avoid to read this data multiple times in each file during the doc build, I think, so ideally we can let flake-rst ignore this in a different way
sure, any idea how?
Do you have the commit that tried this? Did you add it to the list of extensions in conf.py? |
Pushed it up in #38837. |
d75c9e5
to
6dcd18f
Compare
Closing in favor of #38887. |
This will help ensure consistency between the examples.
Similar to #38735, but focusing on shared content in a different folder. Particularly interested to see if the build fails in the same way.
closes #xxxxpassesblack pandas
passesgit diff upstream/master -u -- "*.py" | flake8 --diff
whatsnew entry