Skip to content

Commit

Permalink
Fully remove docformatter
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Dec 27, 2023
1 parent 5d983e6 commit 435290f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# Install formatting tools
- name: Install formatting tools
run: |
python -m pip install docformatter ruff
python -m pip install ruff
python -m pip list
sudo apt-get install dos2unix
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/style_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:

- name: Install packages
run: |
python -m pip install docformatter ruff
python -m pip install ruff
python -m pip list
sudo apt-get install dos2unix
- name: Formatting check (docformatter, ruff)
- name: Formatting check (ruff)
run: make check

- name: Ensure files use UNIX line breaks and have 644 permission
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ help:
@echo " fulltest run the test suite (including all doctests)"
@echo " doctest run the doctests only"
@echo " test_no_images run the test suite (including all doctests) but skip image comparisons"
@echo " format run docformatter and ruff to automatically format the code"
@echo " check run code style and quality checks (docformatter and ruff)"
@echo " format run ruff to automatically format the code"
@echo " check run ruff to check code style and quality"
@echo " codespell run codespell to check common misspellings"
@echo " typecheck run mypy for static type check"
@echo " clean clean up build and generated files"
Expand Down Expand Up @@ -60,12 +60,10 @@ test_no_images: PYTEST_ARGS=-o addopts="--verbose --durations=0 --durations-min=
test_no_images: _runtest

format:
docformatter --in-place $(FORMAT_FILES)
ruff check --fix $(FORMAT_FILES)
ruff format $(FORMAT_FILES)

check:
docformatter --check $(FORMAT_FILES)
ruff check $(FORMAT_FILES)
ruff format --check $(FORMAT_FILES)

Expand Down
3 changes: 1 addition & 2 deletions doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ code, be sure to follow the general guidelines in the

We use some tools to format the code so we don't have to think about it:

- [docformatter](https://github.com/myint/docformatter)
- [ruff](https://docs.astral.sh/ruff)

These tools loosely follow the [PEP8](http:https://pep8.org) guide but with a few
Expand Down Expand Up @@ -511,7 +510,7 @@ The [`Makefile`](https://github.com/GenericMappingTools/pygmt/blob/main/Makefile
contains rules for running the linter checks:

```bash
make check # Runs docformatter and ruff (in check mode)
make check # Runs ruff in check mode
```

### Testing your Code
Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dependencies:
- pip
# Dev dependencies (style checks)
- codespell
- docformatter>=1.7.2
- ruff>=0.1.9
# Dev dependencies (unit testing)
- matplotlib
Expand Down
8 changes: 0 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,6 @@ ignore-words-list = "astroid,oints,reenable,tripel,trough"
[tool.coverage.run]
omit = ["*/tests/*", "*pygmt/__init__.py"]

[tool.docformatter]
black = true
recursive = true
pre-summary-newline = true
make-summary-multi-line = true
wrap-summaries = 79
wrap-descriptions = 79

[tool.mypy]
exclude = ["pygmt/tests/"]
ignore_missing_imports = true
Expand Down

0 comments on commit 435290f

Please sign in to comment.