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

Added add_cyclic to API reference and What's new Version 0.21 #2189

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Added add_cyclic to API reference and What's new Version 0.21 #2189

merged 1 commit into from
Jul 12, 2023

Conversation

mcuntz
Copy link
Contributor

@mcuntz mcuntz commented Jun 10, 2023

Rationale

I had added the convenience utility function add_cyclic in 2021. It was merged in Nov 5, 2021 by @greglucas.
We had apparently forgotten to add it to the API reference in the docs. It also did not make it into What's new Version 0.21 nor into the milestones on Github.
So I added util.add_cyclic in the transformations.rst in the documentation.
Because the PR 1753 was not included in the milestones of v0.21, I added it into the What's New v0.21.rst.

Implications

It will just be easier to find the functionality. Otherwise one could only find it in the gallery example.

Notes

Unrelated to this PR are two remarks:

  1. One of the tests fails on my machine: lib/cartopy/tests/mpl/test_features.py::test_natural_earth The only differences between Expected and Actual images are some dashed country boundaries. I would recommend to make the coutry boundaries in solid lines to avoid this problem between matplotlib versions.
  2. Building the documentation also fails on examples/miscellanea/tube_stations.py I have not investigated the problem. It actual fails in pyproj.

My system: macOS 13.4, Python 3.10.9 and in cartopy directory

python -m pip install --upgrade pyshp
python -m pip install "shapely<2" --no-binary shapely
python -m pip install cython numpy geos pyproj matplotlib owslib pillow scipy packaging pytest pytest-mpl pytest-xdist beautifulsoup4 pydata-sphinx-theme sphinx sphinx-gallery flake8 pre-commit pykdtree setuptools_scm fiona pep8
pip install -e .

Copy link
Contributor

@greglucas greglucas left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! Sorry for missing it in the last release notes. Just a minor suggestion to make it consistent with the above bullets if you're OK with adding your name.

@@ -114,6 +114,10 @@ Features

plt.show()

* Adding a new convenience utility function :func:`~cartopy.util.add_cyclic` for
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Adding a new convenience utility function :func:`~cartopy.util.add_cyclic` for
* Matthias Cuntz added a new convenience utility function :func:`~cartopy.util.add_cyclic` for

@mcuntz
Copy link
Contributor Author

mcuntz commented Jun 12, 2023

@greglucas O.K. thanks.

Comment on lines 117 to 120
* Matthias Cuntz added a new convenience utility function
:func:`~cartopy.util.add_cyclic` for 2-dimensional coordinates lat and lon
when adding cyclic points to an array and optionally to the corresponding 1D
or 2D coordinate(s). (:pull:`1753`)
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I don't quite understand what this is saying. The clause describing the utility function has several subclauses defining what it's useful for, but nothing really describing what it does.

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 expanded on the statement about add_cyclic_point in v0.11.rst, which said:

  • Andrew Dawson has added a new convenience utility function :func:~cartopy.util.add_cyclic_point to add a cyclic point to an array and optionally to a corresponding 1D coordinate.

I am happy for any suggestions in better English ;-)

How's about:

Matthias Cuntz added a new convenience utility function :func:~cartopy.util.add_cyclic. This is an extension of :func:~cartopy.util.add_cyclic_point for 2-dimensional coordinates lat and lon. (:pull:1753)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry forgot to ping: @QuLogic @greglucas

Copy link
Member

Choose a reason for hiding this comment

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

That sounds good. No need to ping; we are subscribed automatically after commenting.

@greglucas greglucas merged commit 6ead89b into SciTools:main Jul 12, 2023
@greglucas greglucas added this to the 0.21.2 milestone Jul 12, 2023
@greglucas greglucas modified the milestones: 0.21.2, 0.22 Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants