Skip to content
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

Fix typos in notebook #1967

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/usage/tutorials/reading_raster_data.ipynb
Expand Up @@ -159,7 +159,7 @@
"id": "83a6debf-e477-4b70-b82d-8e079ef8881e",
"metadata": {},
"source": [
"`RasterSource`s support `numpy`-like array slicing, so we can read a smaller chip within the full raster like so:"
Copy link
Collaborator

Choose a reason for hiding this comment

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

The

`<class name>`s

convention is a deliberate choice. The trailing "s" is excluded from the inline code block to clarify that it is just for pluralization and not part of the class' name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is inconsistent. Some places uses s, some not.
https://docs.rastervision.io/en/0.21/usage/tutorials/reading_raster_data.html
image

image

Copy link
Collaborator

@AdeelH AdeelH Oct 27, 2023

Choose a reason for hiding this comment

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

That's true. The reason for that is a quirk of ReST/sphinx. The following is what I would like to do, but it does not work.

:class:`.RasterSource`s

So I ended up including the "s" whenever the class name is linked to the API docs.

"`RasterSources` support `numpy`-like array slicing, so we can read a smaller chip within the full raster like so:"
]
},
{
Expand Down Expand Up @@ -343,7 +343,7 @@
"source": [
":class:`RasterSources <raster_source.raster_source.RasterSource>` accept a list of :class:`RasterTransformers <raster_transformer.raster_transformer.RasterTransformer>`, all of which are automatically applied (in the order specified) to each chip sampled from that :class:`.RasterSource`.\n",
"\n",
"Below we'll look at two such `RasterTransformer`s:\n",
"Below we'll look at two such `RasterTransformers`:\n",
Copy link
Collaborator

@AdeelH AdeelH Oct 27, 2023

Choose a reason for hiding this comment

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

This text is not currently correctly rendered because it is using single back ticks instead of double back ticks.

Suggested change
"Below we'll look at two such `RasterTransformers`:\n",
"Below we'll look at two such ``RasterTransformer``s:\n",

"\n",
"- :class:`.MinMaxTransformer`\n",
"- :class:`.StatsTransformer`\n",
Expand Down Expand Up @@ -467,7 +467,7 @@
"tags": []
},
"source": [
"Another useful ``RasterTransformer`` is the :class:`.StatsTransformer`. \n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a ReST cell. ReST uses double back ticks for inline code.

"Another useful `RasterTransformer` is the :class:`.StatsTransformer`. \n",
"\n",
"Unlike `MinMaxTransformer <#MinMaxTransformer>`_, the :class:`.StatsTransformer` is able to deal with outlier values. It works by using channel means and standard deviations to convert values to z-scores and then clipping them to some number of standard deviations before scaling to 0-255 and converting to ``uint8``.\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/tutorials/reading_vector_data.ipynb
Expand Up @@ -522,7 +522,7 @@
"id": "024fe3ab-412b-4242-849c-fc71dd986e78",
"metadata": {},
"source": [
"## Transforming vector data using `VectorTransformer`s"
"## Transforming vector data using `VectorTransformers`"
]
},
{
Expand Down Expand Up @@ -727,7 +727,7 @@
"tags": []
},
"source": [
"``Point`` and ``LineString`` geometries are not directly useable if doing, say, semantic segmentation. The cells below show an example of converting road geometries (given in the form of ``LineString``s) into polygons using the :class:`.BufferTransformer`."
Copy link
Collaborator

Choose a reason for hiding this comment

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

See other comment about ReST.

"``Point`` and ``LineString`` geometries are not directly useable if doing, say, semantic segmentation. The cells below show an example of converting road geometries (given in the form of `LineString`) into polygons using the :class:`.BufferTransformer`."
]
},
{
Expand Down