-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bypass field validation on model instantiation if it does not contain…
… a default= argument
- Loading branch information
Showing
4 changed files
with
55 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,45 @@ | ||
DJANGO_SETTINGS_MODULE ?= "tests.settings.django_test_settings" | ||
|
||
.PHONY: install build test lint upload upload-test clean | ||
export DJANGO_SETTINGS_MODULE=tests.settings.django_test_settings | ||
|
||
.PHONY: install | ||
install: | ||
python3 -m pip install build twine | ||
python3 -m pip install -e .[dev,test] | ||
|
||
.PHONY: build | ||
build: | ||
python3 -m build | ||
|
||
.PHONY: migrations | ||
migrations: | ||
python3 -m django makemigrations --noinput | ||
|
||
.PHONY: runserver | ||
runserver: | ||
python3 -m django migrate && \ | ||
python3 -m django runserver | ||
|
||
.PHONY: check | ||
check: | ||
python3 -m django check | ||
|
||
.PHONY: test | ||
test: A= | ||
test: | ||
pytest $(A) | ||
|
||
.PHONY: lint | ||
lint: A=. | ||
lint: | ||
python3 -m mypy $(A) | ||
|
||
.PHONY: upload | ||
upload: | ||
python3 -m twine upload dist/* | ||
|
||
.PHONY: upload-test | ||
upload-test: | ||
python3 -m twine upload --repository testpypi dist/* | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf dist/* |
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