-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
67 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# Matches multiple files with brace expansion notation | ||
# Set default charset | ||
[*.{js,py}] | ||
charset = utf-8 | ||
|
||
# 4 space indentation | ||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.sh] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# Tab indentation (no size specified) | ||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.nix] | ||
indent_style = space | ||
indent_size = 4 |
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,33 @@ | ||
# https://www.gnu.org/software/make/manual/html_node/Special-Variables.html | ||
# https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html | ||
PROJECT_MKFILE_PATH := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) | ||
PROJECT_MKFILE_DIR := $(shell cd $(shell dirname $(PROJECT_MKFILE_PATH)); pwd) | ||
|
||
PROJECT_NAME := plim | ||
PROJECT_ROOT := $(PROJECT_MKFILE_DIR) | ||
|
||
BUILD_DIR := $(PROJECT_ROOT)/build | ||
DIST_DIR := $(PROJECT_ROOT)/dist | ||
|
||
PROJECT=plim | ||
|
||
.PHONY: test | ||
test: | ||
pytest -s --cov=plim --cov-report xml $(PROJECT_ROOT)/tests | ||
|
||
.PHONY: typecheck | ||
typecheck: | ||
mypy --config-file setup.cfg --package $(PROJECT_NAME) | ||
|
||
.PHONY: prepare-dist | ||
prepare-dist: | ||
rm -rf $(BUILD_DIR) $(DIST_DIR) | ||
python $(PROJECT_ROOT)/setup.py sdist bdist_wheel | ||
|
||
.PHONY: publish | ||
publish: | test publish | ||
twine upload $(DIST_DIR)/* | ||
|
||
.PHONY: shell | ||
shell: | ||
nix-shell $(PROJECT_ROOT)/shell.nix |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pytest | ||
coverage | ||
pytest-cov | ||
pytest-cov | ||
mypy |