Skip to content

DOC: Link to table schema and remove reference to internal API #33791

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 5 commits into from
Apr 29, 2020
Merged

DOC: Link to table schema and remove reference to internal API #33791

merged 5 commits into from
Apr 29, 2020

Conversation

bharatr21
Copy link
Contributor

@bharatr21 bharatr21 commented Apr 25, 2020

@pep8speaks
Copy link

pep8speaks commented Apr 25, 2020

Hello @Bharat123rox! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-04-26 18:02:03 UTC

@bharatr21
Copy link
Contributor Author

Hello @Bharat123rox! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 214:89: E501 line too long (110 > 88 characters)

This is because of Markdown Link Text, the line will not be longer in the original documentation, so this should be okay

@alimcmaster1
Copy link
Member

Hello @Bharat123rox! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 214:89: E501 line too long (110 > 88 characters)

This is because of Markdown Link Text, the line will not be longer in the original documentation, so this should be okay

Thanks for the PR. This will need to be fixed - we run flake8 in our code checks.

@bharatr21
Copy link
Contributor Author

Thanks for the PR. This will need to be fixed - we run flake8 in our code checks.

@alimcmaster1 I believe that the long URL is readable (self-explanatory?) and should not be broken (also while rendering it won't be shown), hence it's a strong enough case to ignore the flake8 warning

@@ -211,7 +211,7 @@ def build_table_schema(data, index=True, primary_key=None, version=True):

Notes
-----
See `_as_json_table_type` for conversion types.
See [`Table Schema`](https://pandas.pydata.org/docs/user_guide/io.html#table-schema) for conversion types. # noqa: E501
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this will render correctly in rst: https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html#links-to-external-web-pages

Also to pass flake8 you can just wrap this in the next line like this example:

    To learn more about the frequency strings, please see `this link
    <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

Copy link
Contributor Author

@bharatr21 bharatr21 Apr 26, 2020

Choose a reason for hiding this comment

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

My bad, I thought Markdown was being used. @mroeschke Can you provide an example where link aliases are used?
Like

Get the latest news at `CNN`_.
.. _CNN: http://cnn.com/

Copy link
Member

Choose a reason for hiding this comment

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

If you wish to use an alias - see the spinx docs. https://sphinxtechnicalwriting.readthedocs.io/en/latest/sphinx/linking.html

gbq.py for an example.

You can build the documentation locally - https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#how-to-build-the-pandas-documentation to check that it renders as expected. (Feel free to post a screenshot on PRs)

Thanks

@bharatr21 bharatr21 requested a review from mroeschke April 26, 2020 07:58
@bharatr21 bharatr21 requested a review from alimcmaster1 April 26, 2020 14:24
Copy link
Member

@alimcmaster1 alimcmaster1 left a comment

Choose a reason for hiding this comment

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

Doc build seems to be failing - mind taking a look?

@bharatr21
Copy link
Contributor Author

bharatr21 commented Apr 26, 2020

Doc build seems to be failing - mind taking a look?

Found this warning

/home/runner/miniconda3/envs/pandas-dev/lib/python3.8/site-packages/IPython/sphinxext/ipython_directive.py:1023: UserWarning: Code input with no code at /home/runner/work/pandas/pandas/doc/source/user_guide/computation.rst, line 624
  warnings.warn(message)
/home/runner/work/pandas/pandas/pandas/io/json/_table_schema.py:docstring of pandas.io.json.build_table_schema:45: WARNING: Explicit markup ends without a blank line; unexpected unindent.

But I didn't even touch line 45, so what is this really about?

@@ -211,14 +211,17 @@ def build_table_schema(data, index=True, primary_key=None, version=True):

Notes
-----
See `_as_json_table_type` for conversion types.
See `Table Schema`_ for conversion types.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe just

See `table schema
<https://pandas.pydata.org/docs/user_guide/io.html#table-schema>`__ for...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated, let's hope doc builds!

@jreback jreback added this to the 1.1 milestone Apr 26, 2020
@jreback
Copy link
Contributor

jreback commented Apr 26, 2020

did you build this page locally and see if it renders and the link works?

@bharatr21
Copy link
Contributor Author

did you build this page locally and see if it renders and the link works?

@jreback I'm still having problems building docs locally in MacOS, but I did try it on an RST Previewer and it works fine

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

@jreback jreback merged commit 367432c into pandas-dev:master Apr 29, 2020
@jreback
Copy link
Contributor

jreback commented Apr 29, 2020

thanks @Bharat123rox

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.

build_table_schema references non-existent _as_json_table_type
6 participants