-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump python to 3.8/3.9/3.10 and test requirements, fix pytest command in makefile, fix tests * tox 4, isort + ruff + mypy instead of flake8 + pylint * move project config from setup.py to pyproject.toml, move CI from travis to github actions --------- Co-authored-by: aras2137 <[email protected]>
- Loading branch information
Showing
20 changed files
with
206 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: nameko-sqlalchemy CI build | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 2 | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
- name: Upgrade pip | ||
run: pip install pip setuptools wheel --upgrade | ||
- name: Install tox | ||
run: pip install tox tox-gh-actions | ||
- name: Run tox | ||
run: python -m tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
.coverage | ||
*.pyc | ||
.venv | ||
.idea | ||
|
||
## Packages | ||
*.egg-info | ||
dist | ||
.tox | ||
.tox |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
from nameko_sqlalchemy.database import ( # noqa: F401 | ||
Database, | ||
DB_URIS_KEY, | ||
DB_ENGINE_OPTIONS_KEY, | ||
DB_SESSION_OPTIONS_KEY, | ||
DB_URIS_KEY, | ||
Database, | ||
) | ||
from nameko_sqlalchemy.database_session import DatabaseSession # noqa: F401 | ||
from nameko_sqlalchemy.transaction_retry import transaction_retry # noqa: F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import pytest | ||
|
||
from sqlalchemy import create_engine | ||
from sqlalchemy.orm import sessionmaker | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
[build-system] | ||
requires = ["setuptools>=68.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "nameko-sqlalchemy" | ||
version = "2.0.0" | ||
description = "SQLAlchemy dependency for nameko services" | ||
license = {file = "LICENSE.txt"} | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
authors = [{name="onefinestay", email="[email protected]"}] | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: POSIX", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Topic :: Internet", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dependencies = [ | ||
"nameko>=2.0.0", | ||
"sqlalchemy>=1.4,<2" | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/onefinestay/nameko-sqlalchemy" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"coverage==7.3.2", | ||
"isort==5.12.0", | ||
"mypy==1.7.1", | ||
"pytest==7.4.3", | ||
"requests==2.31.0", | ||
"ruff==0.1.6", | ||
"PyMySQL==1.1.0", | ||
"types-mock==5.1.0.3", | ||
"types-requests==2.31.0.10", | ||
] | ||
|
||
[project.entry-points."pytest11"] | ||
nameko_sqlalchemy = "nameko_sqlalchemy.pytest_fixtures" | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
zip-safe = true | ||
|
||
[tool.isort] | ||
profile = "black" | ||
multi_line_output = 3 | ||
src_paths = [ | ||
"nameko_sqlalchemy/", | ||
"test/", | ||
] | ||
known_first_party = "nameko_chassis" | ||
|
||
[tool.ruff] | ||
extend-exclude = [ | ||
".venv", | ||
"migrations", | ||
] | ||
ignore = [ | ||
"E402", | ||
"E501", | ||
] | ||
select = [ | ||
"E", | ||
"F", | ||
"W", | ||
] | ||
|
||
[tool.mypy] | ||
python_version = "3.10" | ||
plugins = "sqlalchemy.ext.mypy.plugin" | ||
mypy_path = "nameko_sqlalchemy/" | ||
namespace_packages = true | ||
no_implicit_optional = true | ||
no_implicit_reexport = true | ||
strict_equality = true | ||
warn_redundant_casts = true | ||
|
||
ignore_missing_imports = true | ||
|
||
[tool.pytest.ini_options] | ||
norecursedirs = [".git", ".tox", "dist", "build"] | ||
testpaths = ["test"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
nameko>=2.0.0 | ||
sqlalchemy>=1.4,<2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.