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

Bump flake8 from 5.0.4 to 6.0.0 #95

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
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
31 changes: 26 additions & 5 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,25 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Poetry
run: |
python -m pip install poetry==1.4.1

- name: Install Python3
uses: actions/setup-python@v4
with:
python-version: '3.10.x'
cache: 'pip'
cache-dependency-path: requirements.txt
cache: 'poetry'

- name: Install dependencies and cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: make install-python

- uses: actions/setup-node@v3
with:
Expand All @@ -37,7 +49,6 @@ jobs:

- name: Install dependencies
run: |
make install-python
npm ci

- name: Lint
Expand All @@ -56,14 +67,24 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install Poetry
run: |
python -m pip install poetry==1.4.1

- name: Install Python3
uses: actions/setup-python@v4
with:
python-version: '3.10.x'
cache: 'pip'
cache: 'poetry'

- name: Install dependencies and cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: python3 -m pip install -r requirements.txt
run: make install-python

- name: Run Tests
run: make coverage
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ install-frontend:
npm install
make css-prod js-prod

# Install Python dependencies.
install-python:
.PHONY: check-poetry install-python
check-poetry:
@command -v poetry > /dev/null || { echo >&2 "Poetry is not installed. Please visit https://python-poetry.org/docs/#installation for installation instructions."; exit 1; }

install-python: check-poetry
python3 -m venv env
. env/bin/activate; pip install --upgrade pip
. env/bin/activate; pip install -r requirements.txt
. env/bin/activate; poetry install

# Fetch and build all i18n files.
install-i18n: py-venv-check
Expand Down Expand Up @@ -136,7 +138,7 @@ devserver: py-venv-check
# Run a local Celery instance for background tasks.
celery:
celery -A ambuda.tasks worker --loglevel=INFO


# Docker commands
# ===============================================
Expand Down
2 changes: 1 addition & 1 deletion ambuda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
import logging
import sys

import config
import sentry_sdk
from dotenv import load_dotenv
from flask import Flask, session
from flask_babel import Babel, pgettext
from sentry_sdk.integrations.flask import FlaskIntegration
from sqlalchemy import exc

import config
from ambuda import admin as admin_manager
from ambuda import auth as auth_manager
from ambuda import checks, filters, queries
Expand Down
6 changes: 3 additions & 3 deletions build/containers/Dockerfile.final
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ENV PYTHONFAULTHANDLER=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.2.1
POETRY_VERSION=1.4.1

# Install all dependencies. Python venv
RUN pip install "poetry==$POETRY_VERSION"
Expand All @@ -44,7 +44,7 @@ ENV PYTHONFAULTHANDLER=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.2.1
POETRY_VERSION=1.4.1

# Install all dependencies. Python venv
RUN pip install "poetry==$POETRY_VERSION"
Expand Down Expand Up @@ -96,7 +96,7 @@ ENV PYTHONFAULTHANDLER=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.2.1 \
POETRY_VERSION=1.4.1 \
PYTHONPATH=${PYTHONPATH}:/app/


Expand Down
Loading