|
| 1 | +# ================== |
| 2 | +# Project definition |
| 3 | +# ================== |
| 4 | + |
| 5 | +# Derived from https://peps.python.org/pep-0621/ |
| 6 | + |
| 7 | +[project] |
| 8 | +name = "sqlalchemy-postgresql-relaxed" |
| 9 | +version = "0.0.0" |
| 10 | +description = "Relaxed PostgreSQL dialects for SQLAlchemy" |
| 11 | +readme = "README.rst" |
| 12 | +keywords = [ |
| 13 | + "dialect", |
| 14 | + "postgresql", |
| 15 | + "sqlalchemy", |
| 16 | +] |
| 17 | +license = {text = "MIT"} |
| 18 | +authors = [ |
| 19 | + {name = "Andreas Motl", email = "andreas.motl@panodata.org"}, |
| 20 | +] |
| 21 | +requires-python = ">=3.7" |
| 22 | +classifiers = [ |
| 23 | + "Development Status :: 4 - Beta", |
| 24 | + "Environment :: Console", |
| 25 | + "Intended Audience :: Customer Service", |
| 26 | + "Intended Audience :: Developers", |
| 27 | + "Intended Audience :: Education", |
| 28 | + "Intended Audience :: Information Technology", |
| 29 | + "Intended Audience :: Manufacturing", |
| 30 | + "Intended Audience :: Science/Research", |
| 31 | + "Intended Audience :: System Administrators", |
| 32 | + "Intended Audience :: Telecommunications Industry", |
| 33 | + "License :: OSI Approved :: MIT License", |
| 34 | + "Operating System :: MacOS :: MacOS X", |
| 35 | + "Operating System :: Microsoft :: Windows", |
| 36 | + "Operating System :: POSIX :: Linux", |
| 37 | + "Operating System :: Unix", |
| 38 | + "Programming Language :: Python", |
| 39 | + "Programming Language :: Python :: 3.7", |
| 40 | + "Programming Language :: Python :: 3.8", |
| 41 | + "Programming Language :: Python :: 3.9", |
| 42 | + "Programming Language :: Python :: 3.10", |
| 43 | + "Programming Language :: Python :: 3.11", |
| 44 | + "Topic :: Communications", |
| 45 | + "Topic :: Database", |
| 46 | + "Topic :: Documentation", |
| 47 | + "Topic :: Education", |
| 48 | + "Topic :: Office/Business", |
| 49 | + "Topic :: Scientific/Engineering", |
| 50 | + "Topic :: Software Development :: Code Generators", |
| 51 | + "Topic :: Software Development :: Libraries", |
| 52 | + "Topic :: Software Development :: Testing", |
| 53 | + "Topic :: System :: Archiving", |
| 54 | + "Topic :: System :: Systems Administration", |
| 55 | + "Topic :: Text Processing", |
| 56 | + "Topic :: Utilities", |
| 57 | +] |
| 58 | +dependencies = [ |
| 59 | + "asyncpg", |
| 60 | + "psycopg[binary]", |
| 61 | + "sqlalchemy>=2", |
| 62 | +] |
| 63 | +[project.optional-dependencies] |
| 64 | +develop = [ |
| 65 | + "black<24", |
| 66 | + "isort<6", |
| 67 | + "poethepoet<0.19", |
| 68 | + "proselint==0.13", |
| 69 | + "pyproject-fmt<0.10", |
| 70 | + "ruff==0.0.253", |
| 71 | + "validate-pyproject<0.13", |
| 72 | +] |
| 73 | +release = [ |
| 74 | + "build<1", |
| 75 | + 'minibump<1; python_version >= "3.10"', |
| 76 | + "twine<5", |
| 77 | +] |
| 78 | +test = [ |
| 79 | + "pytest<8", |
| 80 | + "pytest-asyncio<1", |
| 81 | + "pytest-cov<5", |
| 82 | +] |
| 83 | +[project.urls] |
| 84 | +changelog = "https://github.com/daq-tools/sqlalchemy-postgresql-relaxed/blob/main/CHANGES.rst" |
| 85 | +documentation = "https://github.com/daq-tools/sqlalchemy-postgresql-relaxed" |
| 86 | +homepage = "https://github.com/daq-tools/sqlalchemy-postgresql-relaxed" |
| 87 | +repository = "https://github.com/daq-tools/sqlalchemy-postgresql-relaxed" |
| 88 | + |
| 89 | +[tool.setuptools.packages] |
| 90 | +find = {} |
| 91 | + |
| 92 | +[tool.black] |
| 93 | +line-length = 120 |
| 94 | + |
| 95 | +[tool.isort] |
| 96 | +profile = "black" |
| 97 | +line_length = 120 |
| 98 | +multi_line_output = 3 |
| 99 | + |
| 100 | +[tool.pytest.ini_options] |
| 101 | +minversion = "2.0" |
| 102 | +addopts = "-rsfEX -p pytester --strict-markers --verbosity=3 --cov --cov-report=term-missing --cov-report=xml" |
| 103 | +log_level = "DEBUG" |
| 104 | +testpaths = ["testing"] |
| 105 | +xfail_strict = true |
| 106 | +markers = [ |
| 107 | +] |
| 108 | + |
| 109 | +[tool.coverage.run] |
| 110 | +omit = [ |
| 111 | + "tests/*", |
| 112 | +] |
| 113 | + |
| 114 | +[tool.coverage.report] |
| 115 | +fail_under = 0 |
| 116 | +show_missing = true |
| 117 | + |
| 118 | +[tool.ruff] |
| 119 | +line-length = 120 |
| 120 | + |
| 121 | +select = [ |
| 122 | + # Bandit |
| 123 | + "S", |
| 124 | + # Bugbear |
| 125 | + "B", |
| 126 | + # Builtins |
| 127 | + "A", |
| 128 | + # comprehensions |
| 129 | + "C4", |
| 130 | + # eradicate |
| 131 | + "ERA", |
| 132 | + # flake8-2020 |
| 133 | + "YTT", |
| 134 | + # isort |
| 135 | + "I", |
| 136 | + # pandas-vet |
| 137 | + "PD", |
| 138 | + # print |
| 139 | + "T20", |
| 140 | + # Pycodestyle |
| 141 | + "E", |
| 142 | + "W", |
| 143 | + # Pyflakes |
| 144 | + "F", |
| 145 | + # return |
| 146 | + "RET", |
| 147 | +] |
| 148 | + |
| 149 | +[tool.ruff.per-file-ignores] |
| 150 | +"tests/*" = ["S101"] # Use of `assert` detected |
| 151 | + |
| 152 | + |
| 153 | +# =================== |
| 154 | +# Tasks configuration |
| 155 | +# =================== |
| 156 | + |
| 157 | +[tool.poe.tasks] |
| 158 | + |
| 159 | +check = [ |
| 160 | + "lint", |
| 161 | + "test", |
| 162 | +] |
| 163 | + |
| 164 | +format = [ |
| 165 | + { cmd = "black ." }, |
| 166 | + { cmd = "isort ." }, |
| 167 | + # Configure Ruff not to auto-fix (remove!) unused variables (F841) and `print` statements (T201). |
| 168 | + { cmd = "ruff --fix --ignore=ERA --ignore=F401 --ignore=F841 --ignore=T20 ." }, |
| 169 | + { cmd = "pyproject-fmt pyproject.toml" }, |
| 170 | +] |
| 171 | + |
| 172 | +lint = [ |
| 173 | + { cmd = "ruff check ." }, |
| 174 | + { cmd = "black --check ." }, |
| 175 | + { cmd = "isort --check ." }, |
| 176 | + { cmd = "validate-pyproject pyproject.toml" }, |
| 177 | + { cmd = "proselint *.rst doc/**.rst" }, |
| 178 | + # { cmd = "mypy" }, |
| 179 | +] |
| 180 | + |
| 181 | +release = [ |
| 182 | + { cmd = "minibump bump --relax minor" }, |
| 183 | + { cmd = "python -m build" }, |
| 184 | + { cmd = "twine upload --skip-existing --verbose dist/*.tar.gz dist/*.whl" }, |
| 185 | +] |
| 186 | + |
| 187 | +test = { cmd = "pytest" } |
0 commit comments