Skip to content

Commit

Permalink
little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Mukhamatnurov committed Sep 9, 2024
1 parent 87f67da commit 96860bd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
26 changes: 16 additions & 10 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
CODE = overhave
VENV ?= .venv
WORK_DIR ?= .
MIN_COVERAGE = 89.1

CODE = overhave
ALL = $(CODE) $(DOCS_DIR) tests demo

PACKAGE_BUILD_DIR ?= dist
PYTHON_VERSION ?= 3.11
WORK_DIR ?= .

DOCS_DIR ?= docs
DOCS_BUILD_DIR ?= _build
DOCS_BUILDER ?= html
DOCS_INCLUDES_DIR = $(DOCS_DIR)/includes
DOCS_IMAGES_DIR = $(DOCS_INCLUDES_DIR)/images
COV_BADGE_SVG = $(DOCS_IMAGES_DIR)/coverage.svg
DOCS_REFERENCES_DIR = $(DOCS_INCLUDES_DIR)/_references
SPHINXAPIDOC_OPTS = -f -d 3 --ext-autodoc

COV_BADGE_SVG = $(DOCS_IMAGES_DIR)/coverage.svg
MYPY_CACHE_DIR = .mypy_cache

ALL = $(CODE) $(DOCS_DIR) tests demo
MIN_COVERAGE = 89.1
PYTHON_VERSION ?= 3.11

JOBS ?= 4

pre-init:
UNAME ?= $(shell uname)
pre-init: pre-init-$(UNAME)

pre-init-Linux:
sudo apt install python$(PYTHON_VERSION) python$(PYTHON_VERSION)-venv python$(PYTHON_VERSION)-dev python$(PYTHON_VERSION)-distutils gcc\
libsasl2-dev libldap2-dev libssl-dev libpq-dev g++ libgnutls28-dev

mac-pre-init:
brew install python@$(PYTHON_VERSION) gcc libsasl2 openldap libiconv libpq tmux libxml2 libxslt
pre-init-Darwin:
brew install python@$(PYTHON_VERSION) gcc cyrus-sasl openldap

init:
python$(PYTHON_VERSION) -m venv $(VENV)
test -d $(VENV) || python$(PYTHON_VERSION) -m venv $(VENV)
$(VENV)/bin/python -m pip install --upgrade pip
$(VENV)/bin/python -m pip install poetry
$(VENV)/bin/poetry install
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "overhave"
version = "5.1.7"
version = "5.1.8"
description = "Overhave - web-framework for BDD"
readme = "README.rst"
authors = [
Expand Down
3 changes: 1 addition & 2 deletions tests/db_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from sqlalchemy import event

from overhave import db
from overhave.db import create_session

BEFORE_CURSOR_EXECUTE_EVENT_NAME = "before_cursor_execute"
AFTER_CURSOR_EXECUTE_EVENT_NAME = "after_cursor_execute"
Expand Down Expand Up @@ -81,7 +80,7 @@ def validate_db_session(*args: Any, **kwargs: Any) -> None:
break
else:
raise RuntimeError(
f"Using db.{create_session.__name__}() without {SQLCounter.__name__}! "
f"Using db.{db.create_session.__name__}() without {SQLCounter.__name__}! "
f"Please, add `with {count_queries.__name__}(expected_count=n):` to your test"
)

Expand Down

0 comments on commit 96860bd

Please sign in to comment.