Skip to content

Commit

Permalink
merge release/1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
CI committed Oct 30, 2018
2 parents ae575a3 + cca2c5a commit 17dc36b
Show file tree
Hide file tree
Showing 65 changed files with 56,000 additions and 4,945 deletions.
12 changes: 4 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,10 @@ jobs:
- deploy:
name: dockerize
command: |
if [[ $CIRCLE_BRANCH == $RELEASE_MATCH ]]; then
curl --user ${CIRCLE_TOKEN}: \
--data build_parameters[TAG]=$TAG \
--data build_parameters[JOB]=dockerize \
https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/develop
else
echo "Skipped as '$CIRCLE_BRANCH' does not match '$RELEASE_MATCH' branch"
fi
curl --user ${CIRCLE_TOKEN}: \
--data build_parameters[TAG]=$TAG \
--data build_parameters[JOB]=dockerize \
https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/develop
dockerize:
working_directory: ~/code
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ db/db1.bz2
docker/cache
src/etools_datamart/apps/core/static/api-doc.css.map
docker/superset.db
db/clean.sql
db/etools.dump
db/public.sqldump
db/tenant.sql
src/etools_datamart/apps/etools/models/public_old.py
src/etools_datamart/apps/etools/models/tenant_old.py
9 changes: 0 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,12 @@ repos:
exclude: manage.py
- id: end-of-file-fixer
- id: flake8
# exclude: docs/,docker/
args:
- src/
- tests/
- --config=setup.cfg
- id: check-merge-conflict
- id: check-case-conflict
# - id: name-tests-test
# - id: trailing-whitespace
# - id: requirements-txt-fixer
# files: requirements-dev.txt
#- repo: git://github.com/asottile/reorder_python_imports
# rev: v1.0.1
# hooks:
# - id: reorder-python-imports
- repo: git://github.com/Yelp/detect-secrets
rev: 0.9.1
hooks:
Expand Down
19 changes: 19 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
1.3
---
* Aligned with eTools 6.3.1
* WARNINGS: migration reset
* add ordering support
* updates redoc version
* improves support to handle eTools database changes
* fixes wrog data format in CSV export
* new endpoint FAMIndicator
* new endpoint Tpmvisit
* new endpoint UserStats

1.2
---
* add db logging
* new namespace unicef_security


1.1
---
* Fixes wrong import in middleware


1.0
---
* SystemFilters. Ability to force per user/service filters
Expand Down
47 changes: 2 additions & 45 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,49 +25,6 @@ setup local en0 alias
### How to run tests

Each time Etools data models changes, it's needed to rebuild the datamart models and the sql
needed to run te tests
needed to run the tests

- Rebuild django models

$ ./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


- Dump public schema

$ pg_dump --inserts -O \
-U postgres -p 15432 -h 127.0.0.1 -d etools -n public \
--format c \
--blobs \
--exclude-table-data celery_* \
--exclude-table-data django_admin_log \
--exclude-table-data django_celery_* \
--exclude-table-data django_migrations \
--exclude-table-data django_session \
--exclude-table-data djcelery_* \
--exclude-table-data drfpasswordless_* \
--exclude-table-data easy_* \
--exclude-table-data environment_* \
--exclude-table-data filer_* \
--exclude-table-data generic_* \
--exclude-table-data notification_* \
--exclude-table-data permissions2_* \
--exclude-table-data post_office_* \
--exclude-table-data purchase_order_* \
--exclude-table-data registration_* \
--exclude-table-data reversion_* \
--exclude-table-data social_account_* \
--exclude-table-data spatial_* \
--exclude-table-data tpm_partners_* \
--exclude-table-data unicef_notification_* \
--exclude-table-data vision_* \
--exclude-table-data waffle_* \
-f src/etools_datamart/apps/multitenant/postgresql/public.sqldump
run `db/update_etools_schema.sh` and follow provided steps
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ clean:
find src -name __pycache__ -o -name "*.py?" -o -name "*.orig" -prune | xargs rm -rf
find tests -name __pycache__ -o -name "*.py?" -o -name "*.orig" -prune | xargs rm -rf
find src/concurrency/locale -name django.mo | xargs rm -f
rm -f db/clean.sql db/etools.dump db/public.sqldump db/tenant.sql

fullclean:
rm -fr .tox .cache .pytest_cache .venv
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ eTools DataMart

[![CircleCI](https://circleci.com/gh/unicef/etools-datamart/tree/develop.svg?style=svg&circle-token=)](https://circleci.com/gh/unicef/etools-datamart/tree/develop)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/819135a936894e678066e895604fd24f)](https://www.codacy.com/app/UNICEF/etools-datamart?utm_source=github.com&utm_medium=referral&utm_content=unicef/etools-datamart&utm_campaign=Badge_Grade)
[![](https://images.microbadger.com/badges/version/unicef/datamart.svg)](https://hub.docker.com/r/unicef/datamart/)


UNICEF eTools Datamart
UNICEF eTools API and Datamart



Expand All @@ -14,3 +15,5 @@ UNICEF eTools Datamart
- Continuos Integration - https://circleci.com/gh/unicef/etools-datamart/tree/develop
- Source Code - https://github.com/unicef/etools-datamart
- Codacy - https://app.codacy.com/project/unicef/etools-datamart/dashboard
- Docker - https://hub.docker.com/r/unicef/datamart/

55 changes: 0 additions & 55 deletions db/dump.sh

This file was deleted.

Loading

0 comments on commit 17dc36b

Please sign in to comment.