From 953b8cddcacdf25defc29c9cb1bc11798f519889 Mon Sep 17 00:00:00 2001 From: Stilyan Ivanov Date: Fri, 11 Jan 2019 14:49:38 +0000 Subject: [PATCH] Adding missing dotfiles --- .dockerignore | 7 +++ .editorconfig | 16 +++++ .eslintrc.js | 1 + .gitattributes | 5 ++ .gitignore | 127 ++++++++++++++++++++++++++++++++++++++++ .pre-commit-config.yaml | 24 ++++++++ .pyup.yml | 37 ++++++++++++ .travis.yml | 111 +++++++++++++++++++++++++++++++++++ 8 files changed, 328 insertions(+) create mode 100644 .dockerignore create mode 100644 .editorconfig create mode 100644 .eslintrc.js create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .pre-commit-config.yaml create mode 100644 .pyup.yml create mode 100644 .travis.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000..7adc0011a42 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +node_modules/* +**/node_modules/ +build/ +kolibri/kolibri/dist/ +dist/* +.vscode/ +Dockerfile* \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..8b734030f74 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{ini,py}] +indent_size = 4 + +[Makefile] +indent_style = tab diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000000..36889035daf --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('kolibri-tools/.eslintrc'); diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..af41813acd8 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# use Git LFS to track large binary files +*.otf filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.ttc filter=lfs diff=lfs merge=lfs -text +*.woff filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..fa50292d774 --- /dev/null +++ b/.gitignore @@ -0,0 +1,127 @@ +*.py[cod] + +# Host directory where `make dockerbuild` outputs .pex and .whl files +# same directory is mounted under /docker/mnt inside containers and +# can be used to pass in a pre-build pex file or fixtures for tests +docker/mnt/ + +# C extensions +*.so + +# Packages +.cache +.eggs +*.egg +*.egg-info +dist +dist-packages-temp +dist-packages-cache +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg +lib +lib64 +pip + +# Build configurations +kolibri/utils/build_config +# This can be dynamically changed at build time, and it should never change otherwise +requirements.txt + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage* +.tox +nosetests.xml +htmlcov/ +kolibrihome_test/ + +# Translations +*.mo +kolibri/locale/en/ + +# Mr Developer +.mr.developer.cfg +.project +# vscode files +.vscode +# pycharm project file +kolibri.iml +.pydevproject +.venv +.idea + +# Complexity +output/*.html +output/*/index.html + +# Sphinx +docs/_build + +# node +node_modules +npm-debug.log +yarn-error.log +lerna-debug.log + +# Node coverage data +coverage + +# webpack built files +kolibri/**/build/* +kolibri/**/static/* +js-dist + +# Allow static assets to be checked in. For large binary files, use Git LFS +!kolibri/**/static/assets/ +!kolibri/**/static/assets/* +!kolibri/**/static/assets/**/* + +# swap files +*.swp + +# editor files +*.sublime-project +*.sublime-workspace + +# Content App +storage/* +kolibri/content/content_db/*.sqlite3 + +# virtual environment +venv/ +.python-version +.envrc +.env +Pipfile + +# leftover from hack day - want to ensure people don't check these in +kolibri/plugins/learn/assets/src/demo/ + +# ignore strange OSX icon files. (Note there are special characters after 'Icon') +# see http://stackoverflow.com/a/30755378 +Icon + +#ignore added files with DS_Store +.DS_Store + +# ignore the VERSION file we use to track the version for whl files +kolibri/VERSION + +# Ignore downloaded crowdin client +build_tools/crowdin-cli.jar + +# Ignore pytest cache directory +.pytest_cache/ + +# ignore source font files +*.ttf +*.ttc +*.otf diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000000..86e68d9b634 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,24 @@ +repos: +- repo: git://github.com/pre-commit/pre-commit-hooks + rev: v2.0.0 + hooks: + - id: trailing-whitespace + - id: flake8 + - id: check-yaml + - id: check-added-large-files + - id: debug-statements + - id: end-of-file-fixer + exclude: '^.+?\.json$' +- repo: https://github.com/asottile/reorder_python_imports + rev: v1.3.3 + hooks: + - id: reorder-python-imports + language_version: python2.7 +- repo: local + hooks: + - id: frontend-lint + name: Linting of JS, Vue, SCSS and CSS files + description: This hook handles all frontend linting for Kolibri + entry: yarn run lint -w + language: system + files: \.(js|vue|scss|css)$ diff --git a/.pyup.yml b/.pyup.yml new file mode 100644 index 00000000000..122dbf88913 --- /dev/null +++ b/.pyup.yml @@ -0,0 +1,37 @@ +# update schedule +# default: empty +# allowed: "every day", "every week", .. +schedule: "every two weeks on monday" + +# DON'T CHANGE, BECAUSE WHEN SOMEONE ADDS A NEW REQ +# FILE IN requirements/ IT WON'T BE SCANNED +# default: True +# allowed: True, False +search: True + +# Specify requirement files by hand, default is empty +# default: empty +# allowed: list +requirements: + - requirements/build.txt: + # don't use global 'pin' default + pin: False + - requirements/cext.txt: + # don't use global 'pin' default + pin: False + update: False + - requirements/dev.txt: + # don't use global 'pin' default + pin: False + - requirements/docs.txt: + # Auto-builds, so don't pin things + # don't use global 'pin' default + pin: False + - requirements/pipeline.txt: + # This is only used on buildkite for some build stuff + # so not very important + update: False + pin: False + - requirements/test.txt: + # don't use global 'pin' default + pin: False diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000000..c6fd75704ff --- /dev/null +++ b/.travis.yml @@ -0,0 +1,111 @@ +# Config file for automatic testing at travis-ci.org + +language: python + +dist: trusty + +sudo: required + +addons: + chrome: stable + +services: + - postgresql + +cache: + yarn: true + directories: + - node_modules + - $HOME/.cache/pip + +matrix: + include: + - python: "2.7" + env: + - TOX_ENV=pythonbuild2.7 + - python: "3.4" + env: + - TOX_ENV=pythonbuild3.4 + - python: "3.5" + env: + - TOX_ENV=pythonbuild3.5 + - python: "3.6" + env: + - TOX_ENV=pythonbuild3.6 + - python: "2.7" + env: + - TOX_ENV=pythonlint + - python: "2.7" + env: + - TOX_ENV=licenses + - python: "2.7" + env: + - TOX_ENV=py2.7 + - python: "3.5" + env: + - TOX_ENV=docs + - python: "3.4" + env: + - TOX_ENV=py3.4 + - python: "3.5" + env: + - TOX_ENV=py3.5 + - python: "3.6" + env: + - TOX_ENV=py3.6 + - python: "2.7" + env: + - TOX_ENV=node10.x + - python: "3.5" + env: + - TOX_ENV=postgres + - python: "2.7" + env: + - TOX_ENV=frontendlint + - python: "2.7" + env: + - TOX_ENV=nocext + script: + - tox -e $TOX_ENV + - python: "2.7" + env: + - TOX_ENV=cext + script: + - tox -e $TOX_ENV + + +before_install: + - git fetch + - git describe --tags --always + # Required until this is fixed: https://github.com/travis-ci/travis-ci/issues/9112 + - sudo apt-get update --option Acquire::Retries=100 --option Acquire::http::Timeout="60" + - pip install -U pip codecov tox + - . $HOME/.nvm/nvm.sh + - nvm install 10 + - nvm use 10 + - curl -o- -L https://yarnpkg.com/install.sh | bash + - export PATH=$HOME/.yarn/bin:$PATH + +before_script: + - psql -c 'create database travis_ci_test;' -U postgres + - psql -c 'create database eco_test1;' -U postgres + - psql -c 'create database eco_test2;' -U postgres + - psql -c 'create database eco_test3;' -U postgres + + - psql -c 'create database eco2_test1;' -U postgres + - psql -c 'create database eco2_test2;' -U postgres + - psql -c 'create database eco2_test3;' -U postgres + - psql -c 'create database eco2_test4;' -U postgres + - psql -c 'create database eco2_test5;' -U postgres + +# command to run tests +script: + - tox -e $TOX_ENV + +after_success: + - coverage combine + - codecov + +notifications: + slack: + secure: RH3xqTkkoA2TATYo7onoLlAlw5t7Bek3HqN/e48e1mj3nazTUs05k12e9Cj7I/y7rBu4b1g0Fl4nJ/DOJRD/81o2ML8OAqu4Ngfg149EQysvgHki20CY1LMph0aS5HSACL1yvp8VvDmmpF0F8YGh99ZMeV3qdp0t3AVWSQVIQgVOEjUSPklsf25ikCOqzTRCz90Dp5aIlDUuXtubTATaKQiLfqW8rc/S7Q/JLepmZau5ANFz8cHXn750y6EvEREIE/0gBwH6OWOa1qWCavJPc4z9953zX7rhI85f0eaHVYQ0ojeXJjQG4MOu5kP13tkaLppe1On3fBZLPpeF791EJwgcmEFUd8hDsomfHcxXhHf7+LPwbGjelGr8iY/2ZIWuILY17FmnWyruWyusrHpA1YKBFwjqgo7E06uzwVj9npxbc+WEHuBxTDdaeFYjYRLORvOeJ9y3n+rNs2c9gCvwuq3MzhMWT+KsrrngAibns1Fz/I1YZAY3voipmabeXVLqbLvb8f8xBmwwK14ba0tGMHfnnCfivlruS49qLwpMjASEPY3H8lKyROX94aaWj+B1Fld2kX0L5GN3xkVoT1aJOgOxCF9c7w9Kf1aTcf/T4bfEzjPNf3ZH3rwy/b3YABbQAEdV8SLdrD02+CIYNPzv3/U1y3rmTSg0wLT2elumhv8=