Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to pass gitlab-ci #78

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ workflow:
# Similar to "MergeRequest-Pipelines" default template.
# Adds extra "EXTERNAL_PULL_REQUEST_IID"
# see: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Workflows/MergeRequest-Pipelines.gitlab-ci.yml
rules:
- if: $CI_MERGE_REQUEST_IID
- if: $CI_EXTERNAL_PULL_REQUEST_IID
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# rules:
# - if: $CI_MERGE_REQUEST_IID
# - if: $CI_EXTERNAL_PULL_REQUEST_IID
# - if: $CI_COMMIT_TAG
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
default:
tags:
~

stages:
- test
Expand Down
2 changes: 1 addition & 1 deletion caramel/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def get_log_level(argument_level, logger=None, env=None):
logger = logging.getLogger()
current_level = logger.level

argument_verbosity = logging.ERROR - argument_level * 10 # level steps are 10
argument_verbosity = logging.ERROR - argument_level * 10 # level steps are 10
verbosity = min(argument_verbosity, env_level, current_level)
log_level = (
verbosity if logging.DEBUG <= verbosity <= logging.ERROR else logging.ERROR
Expand Down
7 changes: 2 additions & 5 deletions caramel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
# vim: expandtab shiftwidth=4 softtabstop=4 tabstop=17 filetype=python :

import sqlalchemy as _sa
from sqlalchemy.ext.declarative import (
declared_attr,
as_declarative
)
from sqlalchemy.ext.declarative import declared_attr, as_declarative
import sqlalchemy.orm as _orm
from zope.sqlalchemy import register

Expand Down Expand Up @@ -92,7 +89,7 @@ def _fkcolumn(referent, *args, **kwargs):
class Base(object):
@declared_attr # type: ignore
def __tablename__(cls) -> str: # pylint: disable=no-self-argument
return cls.__name__.lower() # pylint: disable=no-member
return cls.__name__.lower() # pylint: disable=no-member

id = _sa.Column(_sa.Integer, primary_key=True)

Expand Down