Skip to content

Commit

Permalink
merge release/1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
CI committed Oct 28, 2018
2 parents 2404b01 + a65c20c commit ae575a3
Show file tree
Hide file tree
Showing 147 changed files with 7,548 additions and 9,082 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
export PATH=/home/circleci/.local/bin:$PATH
export PYTHONHASHSEED=${RANDOM}
pip install tox --user
tox -e py36-d20 deps
tox -e py36-d21 deps
- store_artifacts:
path: ~build/coverage
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
~build
.pytest_cache
.circleci
db
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ repos:
always_run: true

- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0
rev: v2.0.0
hooks:
- id: debug-statements
exclude: manage.py
- id: end-of-file-fixer
- id: flake8
exclude: docs/
# exclude: docs/,docker/
args:
- src/
- tests/
- --config=setup.cfg
- id: check-merge-conflict
- id: check-case-conflict
# - id: name-tests-test
Expand Down
12 changes: 8 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [pipenv](https://github.com/pypa/pipenv)
- [docker](https://www.docker.com/get-docker)
- [pipsi](https://github.com/mitsuhiko/pipsi/)



Expand All @@ -15,7 +16,7 @@ setup local en0 alias

Create a `.env` file in the root folder based on the content for `.env.tpl`

$ pipenv install
$ pipenv sync
$ pipenv shell
$ ./manage.py init-setup --all
$ ./manage.py runserver
Expand All @@ -28,10 +29,13 @@ needed to run te tests

- Rebuild django models

$ manage.py inspectschema --database etools > src/etools_datamart/apps/etools/models/public.py
$ manage.py inspectschema --database etools --schema=bolivia > src/etools_datamart/apps/etools/models/tenant.py

$ ./manage.py inspectschema --database etools > src/etools_datamart/apps/etools/models/public_new.py
$ ./manage.py inspectschema --database etools --schema=bolivia > src/etools_datamart/apps/etools/models/tenant_new.py

compare ad fix
src/etools_datamart/apps/etools/models/tenant_new.py .. tenant.py
src/etools_datamart/apps/etools/models/public_new.py .. public.py

- Dump one schema

$ pg_dump --inserts -O -U postgres -p 15432 -h 127.0.0.1 -d etools -n chad | sed 's/chad/[[schema]]/g' >src/etools_datamart/apps/multitenant/postgresql/tenant.sql
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ recursive-include src *.sql
recursive-include src *.sqldump
recursive-include src/etools_datamart *.*
recursive-include src/unicef_rest_framework *.*
recursive-include src/unicef_security *.*

exclude deploy
exclude docker
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ test:
pipenv run py.test -v --create-db

lint:
pipenv run flake8 src/ tests/
pipenv run isort -rc src/ --check-only
pipenv run check-manifest
pipenv run pre-commit run --all-files
# pipenv run flake8 src/ tests/
# pipenv run isort -rc src/ --check-only
# pipenv run check-manifest

clean:
rm -fr ${BUILDDIR} dist *.egg-info .coverage coverage.xml .eggs
Expand Down
18 changes: 14 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ name = "pypi"
admin-extra-urls = ">=2.1"
celery = "*"
coreapi = "*"
django = ">=2.0,<2.1"
django = ">=2.1"
django-adminfilters = ">=1.1"
django-celery-beat = "*"
django-celery-beat = "==1.1.1"
django-concurrency = "*"
django-constance = "*"
django-cors-headers = "*"
Expand All @@ -35,9 +35,18 @@ pyparsing = "*"
raven = "*"
sqlparse = "*"
whitenoise = "*"
django-monthfield = "*"
django-model-utils = "*"
python-social-auth = "*"
social-auth-app-django = "*"
django-db-logging = "*"
cryptography = "*"
#rest-social-auth = "*"
"django-rest-framework-social-oauth2" = "*"
django-countries = "*"

[dev-packages]
"flake8" = "*"
"flake8" = ">=3.6.0"
check-manifest= "*"
django-extensions = "*"
django-webtest = "*"
Expand All @@ -53,8 +62,9 @@ pytest-coverage = "*"
pytest-django = "*"
pytest-echo = "*"
pytest-pythonpath = "*"
tox-pipenv = "==1.6.0"
#tox-pipenv = "==1.6.0"
yapf = "*"
vcrpy = "*"

[requires]
python_version = "3.6"
Expand Down
Loading

0 comments on commit ae575a3

Please sign in to comment.