-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 37be3ff
Showing
107 changed files
with
12,548 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[bandit] | ||
exclude: test_*.py,./venv/,./env/,./node_modules/,./cacheback/,./.env,./.venv | ||
skips: B101,B311 | ||
# B101: assert | ||
# B311: random |
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,107 @@ | ||
--- | ||
# Output debugging info | ||
# loglevel: debug | ||
|
||
# Major version of Bootstrap: 3 or 4 | ||
bootstrapVersion: 4 | ||
|
||
# Webpack loaders, order matters | ||
styleLoaders: | ||
- style-loader | ||
- css-loader | ||
- sass-loader | ||
- postcss-loader | ||
|
||
# Extract styles to stand-alone css file | ||
# Different settings for different environments can be used, | ||
# It depends on value of NODE_ENV environment variable | ||
# This param can also be set in webpack config: | ||
# entry: 'bootstrap-loader/extractStyles' | ||
# env: | ||
# development: | ||
# extractStyles: false | ||
# production: | ||
# extractStyles: true | ||
|
||
|
||
# Customize Bootstrap variables that get imported before the original Bootstrap variables. | ||
# Thus, derived Bootstrap variables can depend on values from here. | ||
# See the Bootstrap _variables.scss file for examples of derived Bootstrap variables. | ||
# | ||
# preBootstrapCustomizations: ./path/to/bootstrap/pre-customizations.scss | ||
|
||
|
||
# This gets loaded after bootstrap/variables is loaded | ||
# Thus, you may customize Bootstrap variables | ||
# based on the values established in the Bootstrap _variables.scss file | ||
# | ||
bootstrapCustomizations: ./frontend/sass/vendor/custom-bootstrap.scss | ||
|
||
|
||
# Import your custom styles here | ||
# Usually this endpoint-file contains list of @imports of your application styles | ||
# | ||
# appStyles: ./path/to/your/app/styles/endpoint.scss | ||
appStyles: ./frontend/sass/style.scss | ||
|
||
|
||
### Bootstrap styles | ||
styles: | ||
|
||
# Mixins | ||
mixins: true | ||
|
||
# Reset and dependencies | ||
print: true | ||
|
||
# Core CSS | ||
buttons: true | ||
code: true | ||
forms: true | ||
grid: true | ||
images: true | ||
reboot: true | ||
tables: true | ||
type: true | ||
|
||
# Components | ||
alert: false | ||
badge: false | ||
breadcrumb: false | ||
button-group: false | ||
card: true | ||
close: false | ||
custom-forms: false | ||
dropdown: false | ||
input-group: false | ||
jumbotron: true | ||
list-group: false | ||
media: false | ||
nav: true | ||
navbar: true | ||
pagination: false | ||
progress: false | ||
transitions: true | ||
|
||
# Components w/ JavaScript | ||
carousel: false | ||
modal: false | ||
popover: false | ||
tooltip: false | ||
|
||
# Utility classes | ||
utilities: true | ||
|
||
### Bootstrap scripts | ||
scripts: | ||
alert: false | ||
button: true | ||
carousel: false | ||
collapse: true | ||
dropdown: false | ||
modal: false | ||
popover: false | ||
scrollspy: false | ||
tab: false | ||
tooltip: false | ||
util: true |
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,98 @@ | ||
version: 2 | ||
|
||
jobs: | ||
build: | ||
working_directory: ~/djanga | ||
docker: | ||
- image: circleci/python:3.7-stretch-node-browsers # remeber to update those! | ||
environment: | ||
# makes default virtualenv be ignored by pipenv avoiding dependencies conflict | ||
PIPENV_IGNORE_VIRTUALENVS: True | ||
PIPENV_VENV_IN_PROJECT: True | ||
PIPENV_DONT_LOAD_ENV: 0 | ||
steps: | ||
- checkout | ||
# this updates git-lfs to make pre-commit large files check hook work properly | ||
# more details in https://github.com/pre-commit/pre-commit-hooks/issues/252 | ||
- run: | ||
command: curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash | ||
- run: | ||
command: sudo apt-get install git-lfs --upgrade | ||
- run: | ||
command: sudo chown -R circleci:circleci /usr/local/bin | ||
- run: | ||
command: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages | ||
- run: | ||
command: pip install requests pipenv --upgrade | ||
|
||
- restore_cache: | ||
keys: | ||
- v1-pipenv-cache-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} | ||
- v1-pipenv-cache-{{ .Branch }}- | ||
- v1-pipenv-cache- | ||
- run: | ||
command: pipenv install --dev | ||
- save_cache: | ||
key: pipenv-cache-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} | ||
paths: | ||
- .venv | ||
- /usr/local/bin | ||
- /usr/local/lib/python3.7/site-packages | ||
- restore_cache: | ||
keys: | ||
- v1-npm-cache-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} | ||
- v1-npm-cache-{{ .Branch }}- | ||
- v1-npm-cache- | ||
- run: | ||
command: npm install | ||
- save_cache: | ||
key: npm-cache-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} | ||
paths: | ||
- node_modules | ||
|
||
- run: | ||
command: npm run build | ||
- run: | ||
command: npm run lint | ||
# style check | ||
- run: | ||
command: pipenv run prospector --messages-only | ||
# security checks | ||
- run: | ||
command: pipenv run bandit -r . | ||
- run: | ||
command: pipenv check | ||
# imports check | ||
- run: | ||
command: pipenv run isort **/*.py --check-only | ||
- run: | ||
command: pipenv run pre-commit run --all-files | ||
environment: | ||
SKIP: prospector,isort,eslint,missing-migrations | ||
- run: | ||
command: (cd backend; pipenv run python manage.py has_missing_migrations --ignore authtools) | ||
environment: | ||
DJANGO_SETTINGS_MODULE: 'djanga.settings.local_base' | ||
- run: | ||
command: (cd backend; pipenv run python manage.py check --deploy) | ||
environment: | ||
DJANGO_SETTINGS_MODULE: 'djanga.settings.production' | ||
SECRET_KEY: "$(python -c 'import uuid; print(uuid.uuid4().hex + uuid.uuid4().hex)')" | ||
DATABASE_URL: 'sqlite:///' | ||
ALLOWED_HOSTS: '.example.org' | ||
SENDGRID_USERNAME: 'test' | ||
SENDGRID_PASSWORD: 'test' | ||
REDIS_URL: 'redis://' | ||
- run: | ||
command: (cd backend; pipenv run coverage run manage.py test) | ||
- run: | ||
command: npm run test | ||
- run: | ||
command: | | ||
mkdir -p test-reports/ | ||
pipenv run coverage xml -o test-reports/results.xml | ||
when: always | ||
- store_test_results: | ||
path: test-reports | ||
- store_artifacts: | ||
path: test-reports |
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,6 @@ | ||
[run] | ||
branch = True | ||
omit = */virtualenvs/* | ||
*/migrations/* | ||
*/settings/* | ||
*/tests/* |
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,29 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
end_of_line = lf | ||
|
||
[*.js] | ||
indent_size = 2 | ||
|
||
[*.html] | ||
indent_size = 2 | ||
|
||
[*.scss] | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.yml] | ||
indent_size = 2 |
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 @@ | ||
frontend/bundles/ | ||
frontend/webpack_bundles/ |
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,22 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
"extends": "airbnb", | ||
"rules": { | ||
"jsx-a11y/": 0, | ||
"react/jsx-filename-extension": 0 | ||
}, | ||
"env": { | ||
"es6": true, | ||
"browser": true, | ||
"jest": true | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"webpack": { | ||
"config": path.join(__dirname, '/webpack.local.config.js'), | ||
"config-index": 1 | ||
} | ||
} | ||
} | ||
} |
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,49 @@ | ||
*.pyc | ||
/db.sqlite3 | ||
.DS_Store | ||
.env | ||
*/settings/local.py | ||
/staticfiles/* | ||
/mediafiles/* | ||
__pycache__/ | ||
|
||
# coverage result | ||
.coverage | ||
/coverage/ | ||
|
||
# pycharm | ||
.idea | ||
|
||
# data | ||
*.dump | ||
|
||
# npm | ||
node_modules/ | ||
npm-debug.log | ||
|
||
#Folders | ||
.DS_Store | ||
|
||
# Webpack | ||
/frontend/bundles/* | ||
/frontend/webpack_bundles/* | ||
/webpack-stats.json | ||
/jquery-webpack-stats.json | ||
|
||
# Sass | ||
.sass-cache | ||
*.map | ||
|
||
# General | ||
/venv/ | ||
/env/ | ||
/output/ | ||
/cache/ | ||
.vscode/ | ||
|
||
# Spritesmith | ||
spritesmith-generated/ | ||
spritesmith.scss | ||
|
||
# templated email | ||
tmp_email/ |
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,9 @@ | ||
[settings] | ||
line_length=100 | ||
multi_line_output=5 | ||
known_django=django | ||
sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER | ||
lines_after_imports=2 | ||
atomic=True | ||
combine_star=True | ||
skip=venv,env,node_modules,migrations,.env,.venv |
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,41 @@ | ||
fail_fast: true | ||
repos: | ||
- repo: git://github.com/pre-commit/pre-commit-hooks | ||
rev: v0.9.2 | ||
hooks: | ||
- id: check-added-large-files | ||
args: ["--maxkb=500"] | ||
- id: check-byte-order-marker | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: debug-statements | ||
- id: detect-private-key | ||
|
||
- repo: local | ||
hooks: | ||
- id: isort | ||
name: isort-local | ||
entry: isort | ||
language: python | ||
types: [python] | ||
exclude: .+/(settings|migrations)/.+ | ||
pass_filenames: true | ||
- id: eslint | ||
name: eslint-local | ||
entry: npm run lint | ||
language: system | ||
types: [javascript] | ||
exclude: > | ||
(?x)^( | ||
.+\.config\.js| | ||
server\.js| | ||
\.eslintrc\.js | ||
)$ | ||
pass_filenames: true | ||
- id: missing-migrations | ||
name: missing-migrations-local | ||
entry: pipenv run python backend/manage.py has_missing_migrations | ||
language: system | ||
always_run: true | ||
pass_filenames: false |
Oops, something went wrong.