Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Fixes #
- [ ] 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**

Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/style_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,15 @@ jobs:
rm output.txt
exit $nfiles
fi

- name: Ensure hyphens are not used in names of directories and Python files
run: |
git ls-files '*.py' | grep '-' > output.txt || true
git ls-tree -rd --name-only HEAD | grep '-' >> output.txt || true
nfiles=$(wc --lines output.txt | awk '{print $1}')
if [[ $nfiles > 0 ]]; then
echo "Following directories/files use hyphens in file names:"
cat output.txt
rm output.txt
exit $nfiles
fi
6 changes: 3 additions & 3 deletions doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ our tests. This way, the *main* branch is always stable.
integrated separately.
- Bug fixes should be submitted in separate PRs.
* How to write and submit a PR
- Use underscores for all Python (*.py) files as per
[PEP8](https://www.python.org/dev/peps/pep-0008/), not hyphens. Directory
names should also use underscores instead of hyphens.
- Use underscores for all Python (\*.py) files as per
[PEP8](https://www.python.org/dev/peps/pep-0008/), not hyphens. Directory names
should also use underscores instead of hyphens.
- Describe what your PR changes and *why* this is a good thing. Be as
specific as you can. The PR description is how we keep track of the changes
made to the project over time.
Expand Down
Loading