Skip to content
Snippets Groups Projects
Commit c1c82445 authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

Conform to pep8 and remove unnecessary stuff

parent 36b7e85c
No related branches found
No related tags found
No related merge requests found
from __future__ import with_statement
from compendium_v2.db import base_schema
import logging
from logging.config import fileConfig
......@@ -19,7 +20,6 @@ logger = logging.getLogger('alembic.env')
# for 'autogenerate' support
# from myapp import mymodel
# from compendium_v2.db.models import DataEntryItem, DataEntrySection
from compendium_v2.db import base_schema
target_metadata = base_schema.metadata
......
"""Initial Data Entry models
Revision ID: 1e8ba780b977
Revises:
Revises:
Create Date: 2022-11-28 12:23:36.478734
"""
......@@ -20,7 +20,8 @@ def upgrade():
op.create_table('data_entry_sections',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=128), nullable=True),
sa.Column('description', sa.String(length=2048), nullable=True),
sa.Column('description', sa.String(
length=2048), nullable=True),
sa.Column('sort_order', sa.Integer(), nullable=True),
sa.Column('is_active', sa.Boolean(), nullable=True),
sa.PrimaryKeyConstraint('id'),
......@@ -29,32 +30,43 @@ def upgrade():
op.create_table('data_entry_settings',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('setting_type',
sa.Enum('COLOUR_PALLETE', 'CHART_TYPE', 'HELP_ITEM', name='settingtype'),
sa.Enum('COLOUR_PALLETE', 'CHART_TYPE',
'HELP_ITEM', name='settingtype'),
nullable=True),
sa.Column('setting_value', sa.String(length=512), nullable=True),
sa.Column('setting_value', sa.String(
length=512), nullable=True),
sa.PrimaryKeyConstraint('id'),
schema='presentation'
)
op.create_table('data_entry_items',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('title', sa.String(length=128), nullable=True),
sa.Column('description', sa.String(length=2048), nullable=True),
sa.Column('description', sa.String(
length=2048), nullable=True),
sa.Column('sort_order', sa.Integer(), nullable=True),
sa.Column('is_visible', sa.Boolean(), nullable=True),
sa.Column('is_active', sa.Boolean(), nullable=True),
sa.Column('data_source',
sa.Enum('BUDGETS_BY_YEAR', 'BUDGETS_BY_NREN', name='datasourcetype'),
sa.Enum('BUDGETS_BY_YEAR',
'BUDGETS_BY_NREN',
name='datasourcetype'),
nullable=True),
sa.Column('section_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['section_id'], ['presentation.data_entry_sections.id'], ),
sa.ForeignKeyConstraint(
['section_id'],
['presentation.data_entry_sections.id'], ),
sa.PrimaryKeyConstraint('id'),
schema='presentation'
)
op.create_table('data_entry_settings_assoc_table',
sa.Column('item_id', sa.Integer(), nullable=True),
sa.Column('setting_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['item_id'], ['presentation.data_entry_items.id'], ),
sa.ForeignKeyConstraint(['setting_id'], ['presentation.data_entry_settings.id'], ),
sa.ForeignKeyConstraint(
['item_id'],
['presentation.data_entry_items.id'], ),
sa.ForeignKeyConstraint(
['setting_id'],
['presentation.data_entry_settings.id'], ),
schema='presentation'
)
# ### end Alembic commands ###
......
-r requirements.txt
flake8==5.0.4
flake8-quotes
isort
mypy
pytest
tox
types-docutils
types-jsonschema
types-Flask-Cors
types-setuptools
types-sqlalchemy
types-flask_migrate
\ No newline at end of file
......@@ -3,12 +3,13 @@ envlist = py39
[flake8]
exclude = ./.tox,./webapp,./compendium_v2/migrations,./setup.py
exclude = venv,.tox,webapp
[testenv]
deps =
coverage
-r requirements-dev.txt
flake8
-r requirements.txt
commands =
coverage erase
......@@ -17,7 +18,6 @@ commands =
coverage html
coverage report --fail-under 85
flake8
isort -c --df compendium_v2 docs/source test
# Disable mypy in tox until build server supports python 3.9
# mypy .
sphinx-build -M html docs/source docs/build
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment