-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ProductResource to ProductModel mapping with bulk update / create
- Loading branch information
1 parent
4105394
commit d9a25a4
Showing
45 changed files
with
4,291 additions
and
247 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
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,35 +1,23 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
default_language_version: | ||
python: python3.8 | ||
python: python3.10 | ||
|
||
|
||
repos: | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.3.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py38-plus | ||
- --keep-runtime-typing | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.270 | ||
hooks: | ||
- id: ruff | ||
args: | ||
- --fix | ||
- --exit-non-zero-on-fix | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
- id: isort | ||
name: isort (cython) | ||
types: [cython] | ||
- id: isort | ||
name: isort (pyi) | ||
types: [pyi] | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
- repo: local | ||
hooks: | ||
- id: black | ||
name: black | ||
language: system | ||
types: [python] | ||
entry: black | ||
args: [--check, oscar_odin/] | ||
pass_filenames: false | ||
- id: pylint | ||
name: pylint | ||
entry: pylint | ||
args: [oscar_odin/] | ||
language: system | ||
types: [python] | ||
pass_filenames: false |
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,42 @@ | ||
.PHONY: fail-if-no-virtualenv all install dev lint test black | ||
|
||
all: install migrate loaddata collectstatic | ||
|
||
fail-if-no-virtualenv: | ||
ifndef VIRTUAL_ENV # check for a virtualenv in development environment | ||
ifndef PYENVPIPELINE_VIRTUALENV # check for jenkins pipeline virtualenv | ||
$(error this makefile needs a virtualenv) | ||
endif | ||
endif | ||
|
||
ifndef PIP_INDEX_URL | ||
PIP_INDEX_URL=https://pypi.org/simple | ||
endif | ||
|
||
|
||
dev: install | ||
pip install .[dev] | ||
|
||
install: fail-if-no-virtualenv | ||
pip install .[test] | ||
|
||
lint: fail-if-no-virtualenv | ||
black --check oscar_odin/ | ||
pylint oscar_odin/ | ||
|
||
test: fail-if-no-virtualenv | ||
python3 manage.py makemigrations --check --dry-run | ||
@python3 manage.py test tests/ | ||
|
||
black: | ||
@black oscar_odin/ | ||
@black tests/ | ||
|
||
test: | ||
python3 manage.py test tests/ | ||
|
||
ill: | ||
rm db.sqlite3 | ||
cp klaas.sqlite3 db.sqlite3 | ||
python3 manage.py migrate | ||
python3 manage.py test_illshit |
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,14 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
import django | ||
from django.conf import settings | ||
|
||
|
||
if __name__ == "__main__": | ||
# Configure path and django settings module | ||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)) + "/tests") | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_settings") | ||
from django.core.management import execute_from_command_line | ||
execute_from_command_line(sys.argv) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class OscarOdinException(TypeError): | ||
pass |
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.