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

Rename tutorial files to prevent duplicate file names #2260

Merged
merged 3 commits into from
Dec 28, 2022

Conversation

willschlitzer
Copy link
Contributor

This adds "tutorial_" to the start of first_figure.py and contour_map.py to avoid naming conflicts when building documentation.

Fixes #2250

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 commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@willschlitzer willschlitzer added the bug Something isn't working label Dec 20, 2022
@willschlitzer willschlitzer added this to the 0.8.0 milestone Dec 20, 2022
@willschlitzer willschlitzer self-assigned this Dec 20, 2022
@willschlitzer willschlitzer added the skip-changelog Skip adding Pull Request to changelog label Dec 20, 2022
@yvonnefroehlich yvonnefroehlich mentioned this pull request Dec 20, 2022
65 tasks
@seisman
Copy link
Member

seisman commented Dec 21, 2022

I don't think I like the new names. The tutorial_ prefix makes the URL much longer and doesn't provide more information. What about simply renaming contour_map to contours?

@willschlitzer
Copy link
Contributor Author

I don't think I like the new names. The tutorial_ prefix makes the URL much longer and doesn't provide more information. What about simply renaming contour_map to contours?

I don't feel that strongly about it. I figure that adding tutorial_ to the front groups the tutorials together, but can also rename it to contours if that would make things easier.

@GenericMappingTools/gmt-maintainers Thoughts?

@michaelgrund
Copy link
Member

I don't think I like the new names. The tutorial_ prefix makes the URL much longer and doesn't provide more information. What about simply renaming contour_map to contours?

I don't feel that strongly about it. I figure that adding tutorial_ to the front groups the tutorials together, but can also rename it to contours if that would make things easier.

@GenericMappingTools/gmt-maintainers Thoughts?

I would prefer @willschlitzer's solution.

@yvonnefroehlich
Copy link
Member

I don't think I like the new names. The tutorial_ prefix makes the URL much longer and doesn't provide more information. What about simply renaming contour_map to contours?

I don't feel that strongly about it. I figure that adding tutorial_ to the front groups the tutorials together, but can also rename it to contours if that would make things easier.
@GenericMappingTools/gmt-maintainers Thoughts?

I would prefer @willschlitzer's solution.

I like the grouping-effect due to adding tutorial_ at the beginning of the filenames.

@willschlitzer willschlitzer changed the title Rename tutorial files to prevent duplicate file names. Rename tutorial files to prevent duplicate file names Dec 21, 2022
@seisman
Copy link
Member

seisman commented Dec 24, 2022

I don't think I like the new names. The tutorial_ prefix makes the URL much longer and doesn't provide more information. What about simply renaming contour_map to contours?

I don't feel that strongly about it. I figure that adding tutorial_ to the front groups the tutorials together, but can also rename it to contours if that would make things easier.
@GenericMappingTools/gmt-maintainers Thoughts?

I would prefer @willschlitzer's solution.

I like the grouping-effect due to adding tutorial_ at the beginning of the filenames.

All these files are in the get_started directory, so they're already grouped.

@yvonnefroehlich
Copy link
Member

Ping @weiji14 and @maxrjones for their thoughts and preferences on this, please.

@yvonnefroehlich yvonnefroehlich added help wanted Helping hands are appreciated needs review This PR has higher priority and needs review. labels Dec 27, 2022
@weiji14
Copy link
Member

weiji14 commented Dec 28, 2022

I almost prefer a third option - prefixing with the sequence number of the tutorial (i.e. 01_first_figure, 02_contour_map) since they are numbered in https://www.pygmt.org/dev/get_started/index.html. How about we vote for this?

👍 Prefix with tutorial_
🎉 Rename contour_map to contours and so on
👀 Prefix with number (e.g. 01_, 02_)

@seisman
Copy link
Member

seisman commented Dec 28, 2022

Prefix with number (e.g. 01_, 02_)

Prefixing with numbers sounds like a good idea, but the contour tutorial may not be the 2nd tutorial when we add more tutorials in the future, so we may have to rename it in the future.

@yvonnefroehlich
Copy link
Member

I think I am OK with numbers as prefix.

@willschlitzer
Copy link
Contributor Author

Changed to use numbers.

@yvonnefroehlich yvonnefroehlich removed help wanted Helping hands are appreciated needs review This PR has higher priority and needs review. labels Dec 28, 2022
@seisman seisman merged commit 016ab9a into main Dec 28, 2022
@seisman seisman deleted the rename-contour-map-tutorial branch December 28, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect build documentation due to identical file names of examples
5 participants