mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Format code with black. Add makefile to run fmt/tests
This commit is contained in:
parent
d00bce9288
commit
c2c7fa311a
299 changed files with 19037 additions and 11611 deletions
33
Makefile
33
Makefile
|
|
@ -1,12 +1,39 @@
|
|||
default: install
|
||||
# This is used with `make <option>` and is used for running various
|
||||
# administration operations on the code.
|
||||
|
||||
BLACK_FORMAT_CONFIGS = --target-version py37 --line-length 100
|
||||
TEST_GAME_DIR = .test_game_dir
|
||||
TESTS?=evennia
|
||||
|
||||
default:
|
||||
@echo " Usage: "
|
||||
@echo " make install - install evennia (recommended to activate virtualenv first)"
|
||||
@echo " make fmt/format - run the black autoformatter on the source code"
|
||||
@echo " make lint - run black in --check mode"
|
||||
@echo " make test - run evennia test suite with all default values."
|
||||
@echo " make tests=evennia.path test - run only specific test or tests."
|
||||
@echo " make testp - run test suite using multiple cores."
|
||||
|
||||
install:
|
||||
python setup.py develop
|
||||
pip install -e .
|
||||
|
||||
fmt:
|
||||
format:
|
||||
black $(BLACK_FORMAT_CONFIGS) evennia
|
||||
|
||||
fmt: format
|
||||
|
||||
lint:
|
||||
black --check $(BLACK_FORMAT_CONFIGS) evennia
|
||||
|
||||
test:
|
||||
evennia --init $(TEST_GAME_DIR);\
|
||||
cd $(TEST_GAME_DIR);\
|
||||
evennia migrate;\
|
||||
evennia test --keepdb $(TESTS);\
|
||||
|
||||
testp:
|
||||
evennia --init $(TEST_GAME_DIR);\
|
||||
cd $(TEST_GAME_DIR);\
|
||||
evennia migrate;\
|
||||
evennia test --keepdb --parallel 4 $(tests);\
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue