-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce isort and a Makefile for simpler formatting, etc (#286)
* isort and makefile with useful targets * update readme * remove erroneously-committed (safe) files * add isort to workflow yaml * isort profile
- Loading branch information
1 parent
7f2180c
commit 9d0a08d
Showing
72 changed files
with
531 additions
and
550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
SHELL := /bin/bash | ||
|
||
.PHONY: all format format-fix format-tests format-src test-idiomatic test-idiomatic-unit test-idiomatic-integration build help | ||
|
||
all: help | ||
|
||
FMT_FLAGS ?= --check | ||
|
||
format: format-src format-tests | ||
|
||
format-tests: | ||
poetry run ruff tests | ||
poetry run isort tests $(FMT_FLAGS) --profile black | ||
poetry run black tests $(FMT_FLAGS) | ||
poetry run mypy tests | ||
|
||
format-src: | ||
poetry run ruff astrapy | ||
poetry run isort astrapy $(FMT_FLAGS) --profile black | ||
poetry run black astrapy $(FMT_FLAGS) | ||
poetry run mypy astrapy | ||
|
||
format-fix: format-fix-src format-fix-tests | ||
|
||
format-fix-src: FMT_FLAGS= | ||
format-fix-src: format-src | ||
|
||
format-fix-tests: FMT_FLAGS= | ||
format-fix-tests: format-tests | ||
|
||
test-idiomatic: test-idiomatic-unit test-idiomatic-integration | ||
|
||
test-idiomatic-unit: | ||
poetry run pytest tests/idiomatic/unit -vv | ||
|
||
test-idiomatic-integration: | ||
poetry run pytest tests/idiomatic/integration -vv | ||
|
||
build: | ||
rm -f dist/astrapy* | ||
poetry build | ||
|
||
help: | ||
@echo "======================================================================" | ||
@echo "AstraPy make command purpose" | ||
@echo "----------------------------------------------------------------------" | ||
@echo "format full lint and format checks" | ||
@echo " format-src limited to source" | ||
@echo " format-tests limited to tests" | ||
@echo " format-fix fixing imports and style" | ||
@echo " format-fix-src limited to source" | ||
@echo " format-fix-tests limited to tests" | ||
@echo "test-idiomatic run idiomatic tests" | ||
@echo " test-idiomatic-unit unit only" | ||
@echo " test-idiomatic-integration integration only" | ||
@echo "build build package ready for PyPI" | ||
@echo "======================================================================" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
|
||
from astrapy.core.api import APIRequestError | ||
|
||
|
||
__all__ = [ | ||
"APIRequestError", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.