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

Figure.plot: Update docstring for "connection" parameter to GMT 6.5 #2994

Merged
merged 13 commits into from
Jan 14, 2024

Conversation

yvonnefroehlich
Copy link
Member

@yvonnefroehlich yvonnefroehlich commented Jan 12, 2024

Description of proposed changes

Over time, the general syntax for the connection (F) parameter of Figure.plot has changed:

GMT 6.2 -F[c|n|r][a|f|s|r|refpoint]
GMT 6.3 -F[c|n|p][a|f|s|r|refpoint]
GMT 6.5 -F[c|n|p][a|r|s|t|refpoint]

This PR updates the related docstring in the PyGMT documentation to match the GMT 6.5 documentation. I feel this makes sense, as we link to the last GMT version and we use it in the gallery examples, or?

I am wondering whether the last line of the figure caption in the GMT documentation has to be updated from
"directives ra, rt, rs, r10/35 and na" to
"directives pa, pt, ps, p10/35 and na"?

Preview:
There is currently an issue with buiding the documentation:

generating gallery for gallery... 
�[2Kgenerating gallery for gallery/maps... [ 17%] choropleth_map.py
Segmentation fault (core dumped)

Edit 2024/13/01
Excluding the gallery example chorophleth_map.py (see commit) leads to

�[2Kgenerating gallery for gallery/maps... [ 20%] land_and_water.py
�[2Kgenerating gallery for gallery/maps... [ 40%] country_polygons.py
�[2Kgenerating gallery for gallery/maps... [ 60%] borders.py
�[2Kgenerating gallery for gallery/maps... [ 80%] shorelines.py
�[2Kgenerating gallery for gallery/maps... [100%] tilemaps.py
�[2Kgenerating gallery for gallery/lines... [  9%] vector_styles.py
�[2Kgenerating gallery for gallery/lines... [ 18%] decorated_lines.py
�[2Kgenerating gallery for gallery/lines... [ 27%] envelope.py
�[2Kgenerating gallery for gallery/lines... [ 36%] great_circles.py
�[2Kgenerating gallery for gallery/lines... [ 45%] line_custom_cpt.py
�[2Kgenerating gallery for gallery/lines... [ 55%] linefronts.py
�[2Kgenerating gallery for gallery/lines... [ 64%] linestyles.py
�[2Kgenerating gallery for gallery/lines... [ 73%] quoted_lines.py
�[2Kgenerating gallery for gallery/lines... [ 82%] roads.py
Segmentation fault (core dumped)

So, the issue seem to be unrelated to the chorophleth_map.py example (downloading the data).

After removing both chorophleth_map.py and roads.py building the documentation is successful.

https://pygmt-dev--2994.org.readthedocs.build/en/2994/api/generated/pygmt.Figure.plot.html

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash command is:

  • /format: automatically format and lint the code

@yvonnefroehlich yvonnefroehlich added the documentation Improvements or additions to documentation label Jan 12, 2024
@yvonnefroehlich yvonnefroehlich added this to the 0.11.0 milestone Jan 12, 2024
@seisman
Copy link
Member

seisman commented Jan 13, 2024

There is currently an issue with buiding the documentation:

generating gallery for gallery... 
�[2Kgenerating gallery for gallery/maps... [ 17%] choropleth_map.py
Segmentation fault (core dumped)

Edit 2024/13/01 Excluding the gallery example chorophleth_map.py (see commit) leads to

�[2Kgenerating gallery for gallery/maps... [ 20%] land_and_water.py
�[2Kgenerating gallery for gallery/maps... [ 40%] country_polygons.py
�[2Kgenerating gallery for gallery/maps... [ 60%] borders.py
�[2Kgenerating gallery for gallery/maps... [ 80%] shorelines.py
�[2Kgenerating gallery for gallery/maps... [100%] tilemaps.py
�[2Kgenerating gallery for gallery/lines... [  9%] vector_styles.py
�[2Kgenerating gallery for gallery/lines... [ 18%] decorated_lines.py
�[2Kgenerating gallery for gallery/lines... [ 27%] envelope.py
�[2Kgenerating gallery for gallery/lines... [ 36%] great_circles.py
�[2Kgenerating gallery for gallery/lines... [ 45%] line_custom_cpt.py
�[2Kgenerating gallery for gallery/lines... [ 55%] linefronts.py
�[2Kgenerating gallery for gallery/lines... [ 64%] linestyles.py
�[2Kgenerating gallery for gallery/lines... [ 73%] quoted_lines.py
�[2Kgenerating gallery for gallery/lines... [ 82%] roads.py
Segmentation fault (core dumped)

So, the issue seem to be unrelated to the chorophleth_map.py example (downloading the data).

I also found the same issue in PR #2992. There are three files that use external resources and removing all of them fixes the ReadTheDocs failure (see 70d53af).

pygmt/src/plot.py Outdated Show resolved Hide resolved
pygmt/src/plot.py Outdated Show resolved Hide resolved
pygmt/src/plot.py Outdated Show resolved Hide resolved
pygmt/src/plot.py Outdated Show resolved Hide resolved
pygmt/src/plot.py Outdated Show resolved Hide resolved
pygmt/src/plot.py Outdated Show resolved Hide resolved
pygmt/src/plot.py Outdated Show resolved Hide resolved
yvonnefroehlich and others added 2 commits January 14, 2024 10:45
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

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

Good to merge after add the two examples back.

@yvonnefroehlich
Copy link
Member Author

/format

@seisman seisman merged commit 5bc0682 into main Jan 14, 2024
9 of 17 checks passed
@seisman seisman deleted the update-plot-connection branch January 14, 2024 10:38
@yvonnefroehlich yvonnefroehlich self-assigned this Jan 14, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants