Verified Commit 8571cd36 authored by erdnaxe's avatar erdnaxe 🎇

Update project base

parent 9ebe2002
Pipeline #1378 failed with stage
in 1 minute and 34 seconds
[run]
source =
logs
med
media
search
static
templates
users
omit =
media/tests/*.py
media/migrations/*.py
users/tests/*.py
users/migrations/*.py
settings_local.py
# Byte-compiled / optimized / DLL files
dist
build
__pycache__
*.py[cod]
*$py.class
*.swp
*.pyc
re2o.png
__pycache__/*
*.egg-info
_build
.tox
.coverage
coverage
# Translations
*.mo
*.pot
# Jupyter Notebook
.ipynb_checkpoints
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# PyCharm project settings
.idea
# Local data
settings_local.py
static_files/*
*.log
# Virtualenv
env/
venv/
db.sqlite3
# Ignore migrations during first phase dev
migrations/
image: python:3.6
stages:
- test
before_script:
- pip install tox
python36:
image: python:3.6
stage: test
script: tox -e py36
python37:
image: python:3.7
stage: test
script: tox -e py37
linters:
stage: test
script: tox -e linters
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python3
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "med.settings")
from django.core.management import execute_from_command_line
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'note_kfet.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()
[tox]
envlist = py36,py37,linters
skipsdist = True
[testenv]
basepython = python3
deps =
-r{toxinidir}/requirements.txt
coverage
commands =
./manage.py makemigrations
coverage run ./manage.py test {posargs}
coverage report -m
[testenv:pre-commit]
deps = pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:linters]
deps =
-r{toxinidir}/requirements.txt
flake8
flake8-colors
flake8-import-order
flake8-typing-imports
pep8-naming
pyflakes
pylint
commands =
flake8 logs med media search users
pylint .
[flake8]
ignore = D203, W503, E203
exclude =
.tox,
.git,
__pycache__,
build,
dist,
*.pyc,
*.egg-info,
.cache,
.eggs,
*migrations*
max-complexity = 10
import-order-style = google
application-import-names = flake8
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment