Loading Pipfile +10 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,16 @@ name = "pypi" common = {editable = true, path = "./src"} [dev-packages] pytest = "*" isort = "*" black = "*" flake8 = "*" pylint = "*" tox = "*" [scripts] lint = "tox -e lint" format = "tox -e format" [requires] python_version = "3.11" src/common/mixins/mssql.py +9 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,15 @@ # -*- coding: utf-8 -*- """Allow opening with a pymssql connection.""" import traceback try: import pymssql except ImportError: from common.logz import create_logger import sys logger = create_logger() logger.warn("PyMSSQL extra must be installed to use mixin. ") sys.exit(1) from common.env import check_multi_environment as cme Loading src/common/mixins/postgres.py +9 −1 Original line number Diff line number Diff line #!/usr/bin/env python3 # -*- coding: utf-8 -*- """Allow opening with a psycopg2 connection.""" try: import psycopg2 except ImportError: from common.logz import create_logger import sys logger = create_logger() logger.warn("Postgres extra must be installed to use postgres \ mixin. ") sys.exit(1) from common.env import check_multi_environment as cme from common.env import check_environment as ce Loading src/pyproject.toml +4 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,10 @@ dependencies = [ "pymssql==2.2.11", "SQLAlchemy~=2.0.23" ] optional-dependencies = {"postgres": ["psycopg2-binary==2.9.9"], "mssql": ["pymssql==2.2.11"], "all": ["psycopg2-binary==2.9.9", "pymssql==2.2.11"]} [project.urls] Source = "https://code.ornl.gov/nset-utilities/common-package" Loading src/setup.py +4 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,9 @@ _version = '0.3.1' # '0.1.14' # packages _packages = find_packages() #['common', 'common.mixins' ] _extras = {"postgres": "psycopg2-binary"} _extras = {"postgres": ["psycopg2-binary==2.9.9"], "mssql": ["pymssql==2.2.11"]} _extras["all"] = sum(_extras.values(), []) # retrieve metadata and packages based on files _here = os.path.abspath(os.path.dirname(__file__)) Loading Loading @@ -47,4 +49,5 @@ setup( scripts=_scripts, install_requires=_requirements, long_description=_long_description, extras_require=_extras, ) Loading
Pipfile +10 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,16 @@ name = "pypi" common = {editable = true, path = "./src"} [dev-packages] pytest = "*" isort = "*" black = "*" flake8 = "*" pylint = "*" tox = "*" [scripts] lint = "tox -e lint" format = "tox -e format" [requires] python_version = "3.11"
src/common/mixins/mssql.py +9 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,15 @@ # -*- coding: utf-8 -*- """Allow opening with a pymssql connection.""" import traceback try: import pymssql except ImportError: from common.logz import create_logger import sys logger = create_logger() logger.warn("PyMSSQL extra must be installed to use mixin. ") sys.exit(1) from common.env import check_multi_environment as cme Loading
src/common/mixins/postgres.py +9 −1 Original line number Diff line number Diff line #!/usr/bin/env python3 # -*- coding: utf-8 -*- """Allow opening with a psycopg2 connection.""" try: import psycopg2 except ImportError: from common.logz import create_logger import sys logger = create_logger() logger.warn("Postgres extra must be installed to use postgres \ mixin. ") sys.exit(1) from common.env import check_multi_environment as cme from common.env import check_environment as ce Loading
src/pyproject.toml +4 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,10 @@ dependencies = [ "pymssql==2.2.11", "SQLAlchemy~=2.0.23" ] optional-dependencies = {"postgres": ["psycopg2-binary==2.9.9"], "mssql": ["pymssql==2.2.11"], "all": ["psycopg2-binary==2.9.9", "pymssql==2.2.11"]} [project.urls] Source = "https://code.ornl.gov/nset-utilities/common-package" Loading
src/setup.py +4 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,9 @@ _version = '0.3.1' # '0.1.14' # packages _packages = find_packages() #['common', 'common.mixins' ] _extras = {"postgres": "psycopg2-binary"} _extras = {"postgres": ["psycopg2-binary==2.9.9"], "mssql": ["pymssql==2.2.11"]} _extras["all"] = sum(_extras.values(), []) # retrieve metadata and packages based on files _here = os.path.abspath(os.path.dirname(__file__)) Loading Loading @@ -47,4 +49,5 @@ setup( scripts=_scripts, install_requires=_requirements, long_description=_long_description, extras_require=_extras, )