Skip to content

Conversation

@nchammas
Copy link
Contributor

@nchammas nchammas commented Jul 28, 2016

What's Been Changed

The PR corrects several broken or missing class references in the Python API docs. It also correct formatting problems.

For example, you can see here how Sphinx is not picking up the reference to DataType. That's because the reference is relative to the current module, whereas DataType is in a different module.

You can also see here how the formatting for byte, tinyint, and so on is italic instead of monospace. That's because in ReST single backticks just make things italic, unlike in Markdown.

Testing

I tested this PR by building the Python docs and reviewing the results locally in my browser. I confirmed that the broken or missing class references were resolved, and that the formatting was corrected.

@nchammas nchammas changed the title [SPARK-16772] Correct references to DataType + other minor tweaks [WIP] [SPARK-16772] Correct references to DataType + other minor tweaks Jul 28, 2016
@rxin
Copy link
Contributor

rxin commented Jul 28, 2016

Jenkins, test this please.

@SparkQA
Copy link

SparkQA commented Jul 28, 2016

Test build #62972 has finished for PR 14393 at commit 3a24f4f.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@nchammas nchammas changed the title [WIP] [SPARK-16772] Correct references to DataType + other minor tweaks [WIP] [SPARK-16772] Correct API doc references to PySpark classes Jul 28, 2016
@nchammas nchammas changed the title [WIP] [SPARK-16772] Correct API doc references to PySpark classes [WIP] [SPARK-16772] Correct API doc references to PySpark classes + formatting fixes Jul 28, 2016
@SparkQA
Copy link

SparkQA commented Jul 28, 2016

Test build #62976 has finished for PR 14393 at commit 4c0eeea.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@nchammas nchammas changed the title [WIP] [SPARK-16772] Correct API doc references to PySpark classes + formatting fixes [SPARK-16772] Correct API doc references to PySpark classes + formatting fixes Jul 28, 2016
@SparkQA
Copy link

SparkQA commented Jul 28, 2016

Test build #62983 has finished for PR 14393 at commit 493b61e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@nchammas
Copy link
Contributor Author

Apologies for making a fairly "noisy" PR, with changes in several scattered places. However, as a PySpark user it's important to me that the API docs be properly formatted and that docstring class references work.

Feel free to ping me on Python docstring changes in the future. I would be happy to review them.

cc @rxin @davies - Ready for review.

@SparkQA
Copy link

SparkQA commented Jul 28, 2016

Test build #62984 has finished for PR 14393 at commit 16ef570.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Jul 28, 2016

@nchammas did you build the docs to verify? If yes I'm going to merge it.

@nchammas
Copy link
Contributor Author

Yes, I built the docs and reviewed several (but not all) of the changes locally in my browser and confirmed that the corrections I wanted took place as expected.

(Apologies about not using the PR template when I first opened the PR. GitHub Desktop seems not to support that yet. I've updated the PR description to include this info now.)

@rxin
Copy link
Contributor

rxin commented Jul 28, 2016

Thanks - merging in master and 2.0.

asfgit pushed a commit that referenced this pull request Jul 28, 2016
…ing fixes

## What's Been Changed

The PR corrects several broken or missing class references in the Python API docs. It also correct formatting problems.

For example, you can see [here](http://spark.apache.org/docs/2.0.0/api/python/pyspark.sql.html#pyspark.sql.SQLContext.registerFunction) how Sphinx is not picking up the reference to `DataType`. That's because the reference is relative to the current module, whereas `DataType` is in a different module.

You can also see [here](http://spark.apache.org/docs/2.0.0/api/python/pyspark.sql.html#pyspark.sql.SQLContext.createDataFrame) how the formatting for byte, tinyint, and so on is italic instead of monospace. That's because in ReST single backticks just make things italic, unlike in Markdown.

## Testing

I tested this PR by [building the Python docs](https://github.com/apache/spark/tree/master/docs#generating-the-documentation-html) and reviewing the results locally in my browser. I confirmed that the broken or missing class references were resolved, and that the formatting was corrected.

Author: Nicholas Chammas <nicholas.chammas@gmail.com>

Closes #14393 from nchammas/python-docstring-fixes.

(cherry picked from commit 274f3b9)
Signed-off-by: Reynold Xin <rxin@databricks.com>
@asfgit asfgit closed this in 274f3b9 Jul 28, 2016
@nchammas nchammas deleted the python-docstring-fixes branch July 29, 2016 01:32
from ``data``, which should be an RDD of :class:`Row`,
or :class:`namedtuple`, or :class:`dict`.
When ``schema`` is :class:`DataType` or datatype string, it must match the real data, or
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made a mistake here, thinking "datatype string" was actually meant to be StringType(). I understand now that a datatype string is actually a thing.

Correction incoming...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correction here: #14408

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants