Loading .gitlab-ci.yml +0 −22 Original line number Diff line number Diff line Loading @@ -3,34 +3,12 @@ # * Author: (c) 2011-present GitLab B.V. # * URL: https://docs.gitlab.com/ee/ci/docker/using_kaniko.html#building-a-docker-image-with-kaniko # * License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0) stages: - test - build variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" testing: image: python:latest cache: paths: - .cache/pip stage: test before_script: - pip install pipenv - pipenv requirements --dev > requirements.txt - pip install -r requirements.txt script: - black --check $CI_PROJECT_DIR - mypy . docker-build: image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""] stage: build # Run build stage regardless of the status of the test stage when: always before_script: - mkdir -p /kaniko/.docker - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json Loading README.md +0 −11 Original line number Diff line number Diff line Loading @@ -93,17 +93,6 @@ Alembic must always be up to date in order to update the database schema. Please run `alembic upgrade head` after pulling changes from the repository. --- ## Compliance ### Formatting We use [black](https://github.com/psf/black) as formatting tool. Use `black .` to run the formatter. ### Static Type Checking Run `mypy .` to let [mypy](https://www.mypy-lang.org/) validate the Python types. ## How to move around in this repo ## `/portal/`: Main Application Loading portal/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ from flask_sqlalchemy import SQLAlchemy from .db_config import get_database_uri, get_uri_for_sqlite db: SQLAlchemy = SQLAlchemy() db = SQLAlchemy() from .model import * Loading portal/model/FlaskConfigEntry.py +1 −4 Original line number Diff line number Diff line from flask import Flask from flask_sqlalchemy import DefaultMeta from portal import db BaseModel: DefaultMeta = db.Model class FlaskConfigEntry(BaseModel): class FlaskConfigEntry(db.Model): """ A configuration entry for Flask (a key-value pair) as persisted in a database """ Loading portal/model/Retrievable.py +2 −6 Original line number Diff line number Diff line from abc import abstractmethod from typing import Any, List, Optional, Self from flask_sqlalchemy import DefaultMeta from sqlalchemy import Column from flask import g from portal import db BaseModel: DefaultMeta = db.Model class Retrievable(BaseModel): class Retrievable(db.Model): """ A type whose instances can be retrieved from the database. Loading @@ -21,7 +17,7 @@ class Retrievable(BaseModel): __abstract__ = True @classmethod def get_canonical_order_column(cls) -> Optional[Column]: def get_canonical_order_column(cls) -> Optional[db.Column]: """ Return the colum by which instances of this type should be canonically ordered when retrieving them all from the database. Loading Loading
.gitlab-ci.yml +0 −22 Original line number Diff line number Diff line Loading @@ -3,34 +3,12 @@ # * Author: (c) 2011-present GitLab B.V. # * URL: https://docs.gitlab.com/ee/ci/docker/using_kaniko.html#building-a-docker-image-with-kaniko # * License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0) stages: - test - build variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" testing: image: python:latest cache: paths: - .cache/pip stage: test before_script: - pip install pipenv - pipenv requirements --dev > requirements.txt - pip install -r requirements.txt script: - black --check $CI_PROJECT_DIR - mypy . docker-build: image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""] stage: build # Run build stage regardless of the status of the test stage when: always before_script: - mkdir -p /kaniko/.docker - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json Loading
README.md +0 −11 Original line number Diff line number Diff line Loading @@ -93,17 +93,6 @@ Alembic must always be up to date in order to update the database schema. Please run `alembic upgrade head` after pulling changes from the repository. --- ## Compliance ### Formatting We use [black](https://github.com/psf/black) as formatting tool. Use `black .` to run the formatter. ### Static Type Checking Run `mypy .` to let [mypy](https://www.mypy-lang.org/) validate the Python types. ## How to move around in this repo ## `/portal/`: Main Application Loading
portal/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ from flask_sqlalchemy import SQLAlchemy from .db_config import get_database_uri, get_uri_for_sqlite db: SQLAlchemy = SQLAlchemy() db = SQLAlchemy() from .model import * Loading
portal/model/FlaskConfigEntry.py +1 −4 Original line number Diff line number Diff line from flask import Flask from flask_sqlalchemy import DefaultMeta from portal import db BaseModel: DefaultMeta = db.Model class FlaskConfigEntry(BaseModel): class FlaskConfigEntry(db.Model): """ A configuration entry for Flask (a key-value pair) as persisted in a database """ Loading
portal/model/Retrievable.py +2 −6 Original line number Diff line number Diff line from abc import abstractmethod from typing import Any, List, Optional, Self from flask_sqlalchemy import DefaultMeta from sqlalchemy import Column from flask import g from portal import db BaseModel: DefaultMeta = db.Model class Retrievable(BaseModel): class Retrievable(db.Model): """ A type whose instances can be retrieved from the database. Loading @@ -21,7 +17,7 @@ class Retrievable(BaseModel): __abstract__ = True @classmethod def get_canonical_order_column(cls) -> Optional[Column]: def get_canonical_order_column(cls) -> Optional[db.Column]: """ Return the colum by which instances of this type should be canonically ordered when retrieving them all from the database. Loading