Skip to content

Commit

Permalink
Spring cleaning
Browse files Browse the repository at this point in the history
* Fix __all__ to contain strings
* Bump version to 1.3.1
* Drop support for Python 3.7 due to EOL
* List Python 3.11 and 3.12 as supported
* Rework development environment
DevL committed Mar 20, 2024
1 parent 171a556 commit 5b4f252
Showing 5 changed files with 39 additions and 17 deletions.
22 changes: 14 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
PYTHON_VERSION ?= 3.8
PYTHON_VERSION ?= 3.9

dist: clean-dist
python3 setup.py sdist
dist: clean-dist setup
. venv/bin/activate && python3 -m build .

setup: venv
.PHONY: setup
setup: venv/setup.txt

venv: dev-packages.txt
venv:
virtualenv venv --python=${PYTHON_VERSION}

venv/setup.txt: venv dev-requirements.txt
. venv/bin/activate && \
pip3 install --upgrade pip && \
pip3 install -r dev-packages.txt
pip3 install --requirement dev-requirements.txt
touch venv/setup.txt

.PHONY: test
test: venv
test: setup
@ . venv/bin/activate && PYTHONPATH=src/ pytest -rsx tests/ src/ --cov ./src/rules_engine/ --no-cov-on-fail --cov-report term-missing --doctest-modules --doctest-continue-on-failure
@ . venv/bin/activate && flake8 src --exclude '#*,~*,.#*'
@ . venv/bin/activate && flake8 src --exclude '#*,~*,.#*'
@ . venv/bin/activate && black --check src tests
@ . venv/bin/activate && mypy src

.PHONY: clean
clean: clean-dist
4 changes: 0 additions & 4 deletions dev-packages.txt

This file was deleted.

9 changes: 9 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
black
build
flake8
mypy
pytest
pytest-clarity
pytest-cov
twine
types-requests
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -22,18 +22,19 @@
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
],
keywords="rules engine",
long_description=readme,
long_description_content_type="text/markdown",
package_dir={"": "src"},
packages=find_packages(where="src"),
python_requires="~=3.7",
python_requires="~=3.8",
project_urls={
"Bug Reports": "https://github.com/funnel-io/funnel-rules-engine/issues",
"Source": "https://github.com/funnel-io/funnel-rules-engine",
16 changes: 13 additions & 3 deletions src/rules_engine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
from .rules_engine import RulesEngine, Rule, Otherwise, NoAction, then, when
from .rules_engine import NoAction, Otherwise, Rule, RulesEngine, then, when

VERSION = "1.3.0"

__all__ = [RulesEngine, Rule, Otherwise, NoAction, then, when]
__all__ = [
"NoAction",
"Otherwise",
"Rule",
"RulesEngine",
"then",
"when",
]

__version__ = "1.3.1"

VERSION = __version__

0 comments on commit 5b4f252

Please sign in to comment.