Skip to content

Commit

Permalink
Merge pull request #80 from bycs/dev
Browse files Browse the repository at this point in the history
Updating environments
  • Loading branch information
bycs authored Jan 14, 2023
2 parents ec179e1 + bf8738b commit 4f1b270
Show file tree
Hide file tree
Showing 9 changed files with 926 additions and 931 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.10'
python-version: '3.11'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.2.0
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.10'
python-version: '3.11'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.2.0
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
Expand Down
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[settings]
py_version = 310
py_version = 311
profile = black
force_single_line = true
combine_as_imports = true
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand All @@ -10,12 +10,12 @@ repos:


- repo: https://github.com/psf/black
rev: 22.8.0
rev: 22.12.0
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.11.4
hooks:
- id: isort

Expand All @@ -36,11 +36,11 @@ repos:
additional_dependencies: ["django-stubs", "djangorestframework-stubs", "python-dotenv", "djangorestframework", "psycopg2-binary", 'drf_spectacular']

- repo: https://github.com/wemake-services/dotenv-linter
rev: 0.2.0
rev: 0.4.0
hooks:
- id: dotenv-linter
args: [.env_template]

default_language_version:
python: python3.10
python: python3.11
default_stages: [commit, push]
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
###############################################
# Base Image
###############################################
FROM --platform=amd64 python:3.10.8-slim as python-base
FROM python:3.11.1-slim as python-base

ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PIP_NO_CACHE_DIR=off
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
ENV PIP_DEFAULT_TIMEOUT=100
ENV POETRY_VERSION=1.2.0
ENV POETRY_VERSION=1.3.2
ENV POETRY_HOME="/opt/poetry"
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
ENV POETRY_NO_INTERACTION=1
Expand Down
3 changes: 1 addition & 2 deletions bot/logics/beers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from random import random
from random import shuffle

from aiogram import Dispatcher
Expand Down Expand Up @@ -81,7 +80,7 @@ async def filter_finish(message: types.Message, state: FSMContext) -> None:
bar = data["bar"]
filter_dict = {data["search_terms"]: data["request"]}
beers = list(filter_beers(bar, filter_dict))
shuffle(beers, random)
shuffle(beers)
if len(beers) > 5:
beers = beers[:5]
for beer in beers:
Expand Down
1,794 changes: 895 additions & 899 deletions poetry.lock

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
[tool.poetry]
name = "beer_finder"
version = "0.3.4"
version = "0.3.5"
description = "The app will help you find the best beer for you and your friends."
authors = ["Stas Cartoon <bycs@mail.ru>"]

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.11"

Django = "4.1.3"
Django = "4.1.5"
djangorestframework = "3.14.0"
drf-spectacular = "0.24.2"
drf-spectacular = "0.25.1"
psycopg2-binary = "2.9.5"
gunicorn = "20.1.0"

aiogram = "2.23.1"
aiogram = "2.24"

requests = "2.28.1"
requests = "2.28.2"
beautifulsoup4 = "4.11.1"

python-dotenv = "0.21.0"

[tool.poetry.dev-dependencies]
# code linters
black = "22.10.0"
isort = "5.10.1"
black = "22.12.0"
isort = "5.11.4"

flake8 = "5.0.4"
flake8-black = "0.3.3"
flake8-builtins = "1.5.3"
flake8-black = "0.3.6"
flake8-builtins = "2.1.0"
flake8-django = "1.1.5"
flake8-isort = "5.0.3"
flake8-isort = "6.0.0"
dotenv-linter = "0.4.0"

mypy = "0.991"
django-stubs = "1.13.0"
django-stubs = "1.13.1"
djangorestframework-stubs = "1.8.0"

pre-commit = "2.20.0"
pre-commit = "2.21.0"

# testing code
pytest = "7.2.0"
Expand All @@ -49,7 +49,7 @@ build-backend = "poetry.core.masonry.api"

[tool.black]
line-length = 100
target-version = ['py310']
target-version = ['py311']
exclude = """
('
|.idea/
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exclude =
*/migrations/
max-line-length = 100
max-complexity = 8
min_python_version = 3.10.0
min_python_version = 3.11.0
extend-ignore =
# E203: Whitespace before ':' (pycqa/pycodestyle#373)
E203,
Expand All @@ -22,7 +22,7 @@ extend-ignore =
[mypy]
no_implicit_optional = True
show_error_codes = True
python_version = 3.10
python_version = 3.11
warn_return_any = True
warn_unused_configs = True
exclude = (?x)
Expand Down

0 comments on commit 4f1b270

Please sign in to comment.