|
| 1 | +[build-system] |
| 2 | +requires = ["hatchling"] |
| 3 | +build-backend = "hatchling.build" |
| 4 | + |
| 5 | +[project] |
| 6 | +name = "concurrent-log-handler" |
| 7 | +dynamic = ["version"] |
| 8 | +description = "RotatingFileHandler replacement with concurrency, gzip and Windows support" |
| 9 | +readme = "README.md" |
| 10 | +license = "Apache-2.0" |
| 11 | +requires-python = ">=3.6" |
| 12 | +authors = [ |
| 13 | + { name = "Preston Landers", email = "[email protected]" }, |
| 14 | +] |
| 15 | +keywords = [ |
| 16 | + "QueueHandler", |
| 17 | + "QueueListener", |
| 18 | + "linux", |
| 19 | + "logging", |
| 20 | + "portalocker", |
| 21 | + "rotate", |
| 22 | + "unix", |
| 23 | + "windows", |
| 24 | +] |
| 25 | +classifiers = [ |
| 26 | + "Development Status :: 4 - Beta", |
| 27 | + "License :: OSI Approved :: Apache Software License", |
| 28 | + "Operating System :: Microsoft :: Windows", |
| 29 | + "Operating System :: POSIX", |
| 30 | + "Programming Language :: Python", |
| 31 | + "Programming Language :: Python :: 3", |
| 32 | + "Programming Language :: Python :: 3.6", |
| 33 | + "Programming Language :: Python :: 3.7", |
| 34 | + "Programming Language :: Python :: 3.8", |
| 35 | + "Programming Language :: Python :: 3.9", |
| 36 | + "Programming Language :: Python :: 3.10", |
| 37 | + "Programming Language :: Python :: 3.11", |
| 38 | + "Programming Language :: Python :: 3.12", |
| 39 | + "Topic :: Software Development :: Libraries :: Python Modules", |
| 40 | + "Topic :: System :: Logging", |
| 41 | +] |
| 42 | +dependencies = [ |
| 43 | + "portalocker>=1.6.0", |
| 44 | +] |
| 45 | + |
| 46 | +[project.urls] |
| 47 | +Homepage = "https://github.com/Preston-Landers/concurrent-log-handler" |
| 48 | + |
| 49 | +[tool.hatch.version] |
| 50 | +path = "src/concurrent_log_handler/__version__.py" |
| 51 | + |
| 52 | +[tool.hatch.build.targets.sdist] |
| 53 | +include = [ |
| 54 | + "/src", |
| 55 | +] |
| 56 | + |
| 57 | +[tool.hatch.envs.test] |
| 58 | +dependencies = [ |
| 59 | + "coverage[toml] >= 7.2", |
| 60 | + "pytest >= 7.4", |
| 61 | + "pytest-sugar", |
| 62 | +] |
| 63 | + |
| 64 | +[tool.hatch.envs.test.scripts] |
| 65 | +version = "python3 --version" |
| 66 | +pip-list = "pip list" |
| 67 | +test = "pytest {args:tests}" |
| 68 | +test-cov = "coverage run -m pytest {args:tests}" |
| 69 | +cov-clear = "coverage erase" |
| 70 | +cov-report = [ |
| 71 | + "- coverage combine", |
| 72 | + "coverage report", |
| 73 | +] |
| 74 | +cov-html = "coverage html" |
| 75 | +cov-json = "coverage json" |
| 76 | +cov = [ |
| 77 | + "version", |
| 78 | + "pip-list", |
| 79 | + "cov-clear", |
| 80 | + "test-cov", |
| 81 | + "cov-report", |
| 82 | + "cov-json", |
| 83 | + "cov-html" |
| 84 | +] |
| 85 | + |
| 86 | +[[tool.hatch.envs.test.matrix]] |
| 87 | +python = ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] |
| 88 | + |
| 89 | +[tool.hatch.envs.lint] |
| 90 | +detached = true |
| 91 | +dependencies = [ |
| 92 | + "black>=23.9.1", |
| 93 | + "mypy>=1.6.0", |
| 94 | + "ruff>=0.1.0", |
| 95 | +] |
| 96 | + |
| 97 | +[tool.hatch.envs.lint.scripts] |
| 98 | +style = [ |
| 99 | + "ruff {args:.}", |
| 100 | + "black --check --diff {args:.}", |
| 101 | +] |
| 102 | +fmt = [ |
| 103 | + "black {args:.}", |
| 104 | + "ruff {args:.}", |
| 105 | + "style", |
| 106 | +] |
| 107 | + |
| 108 | +[tool.ruff] |
| 109 | +output-format = "grouped" |
| 110 | +target-version = "py37" |
| 111 | +fix = true |
| 112 | +ignore = [ |
| 113 | + # Never enforce `E501` (line length violations). |
| 114 | + "E501", |
| 115 | + "D415", # First line of docstring should end with a period |
| 116 | + "COM812", # missing trailing comma in Python 3.5+ |
| 117 | + "UP008", # use of super(class, self) - probably can re-apply this at some point |
| 118 | + "SIM115", # Use context handler for open() |
| 119 | + "PLR1711", # useless return stmt |
| 120 | + "EM101", # use of string literal in exception |
| 121 | + "EM102", # using f-string in exception literal |
| 122 | + "T201", # use of print |
| 123 | + "SLF001", # access to _ private members |
| 124 | + "EXE001", # executable bit set (might want to revisit the ignore) |
| 125 | +] |
| 126 | + |
| 127 | +select = [ |
| 128 | + "E", # pycodestyle Errors - https://docs.astral.sh/ruff/rules/#error-e |
| 129 | + "W", # pycodestyle Warnings - https://docs.astral.sh/ruff/rules/#warning-w |
| 130 | + "F", # Pyflakes - https://docs.astral.sh/ruff/rules/#pyflakes-f |
| 131 | + "C90", # McCabe complexity - https://docs.astral.sh/ruff/rules/#mccabe-c90 |
| 132 | + "I", # import sorting - https://docs.astral.sh/ruff/rules/#isort-i |
| 133 | + # "D", # pydoc style - https://docs.astral.sh/ruff/rules/#pydocstyle-d |
| 134 | + # "UP", # python upgrade - https://docs.astral.sh/ruff/rules/#pyupgrade-up |
| 135 | + "YTT", # sys.version misused - https://docs.astral.sh/ruff/rules/#flake8-2020-ytt |
| 136 | + |
| 137 | + # "ANN", # annotations - https://docs.astral.sh/ruff/rules/#flake8-annotations-ann |
| 138 | + "S", # flake8 bandit - https://docs.astral.sh/ruff/rules/#flake8-bandit-s |
| 139 | + # "BLE", # blind exceptions - https://docs.astral.sh/ruff/rules/#flake8-blind-except-ble |
| 140 | + |
| 141 | + # "FBT", # boolean trap - https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt |
| 142 | + "B", # bugbear - https://docs.astral.sh/ruff/rules/#flake8-bugbear-b |
| 143 | + "A", # flake8 builtins - https://docs.astral.sh/ruff/rules/#flake8-builtins-a |
| 144 | + "COM", # flake8 commas - https://docs.astral.sh/ruff/rules/#flake8-commas-com |
| 145 | + "C4", # flake8 comprehensions - https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4 |
| 146 | + "DTZ", # flake8 datetime - https://docs.astral.sh/ruff/rules/#flake8-datetime-dtz |
| 147 | + "EM", # flake8 error messages - https://docs.astral.sh/ruff/rules/#flake8-errmsg-em |
| 148 | + "EXE", # flake8 executables https://docs.astral.sh/ruff/rules/#flake8-executable-exe |
| 149 | + "ISC", # implicit string concat https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc |
| 150 | + "ICN", # import conventions - https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn |
| 151 | + "G", # flake8 logging - https://docs.astral.sh/ruff/rules/#flake8-logging-format-g |
| 152 | + "INP", # https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp |
| 153 | + "PIE", # https://docs.astral.sh/ruff/rules/#flake8-pie-pie |
| 154 | + "T20", # https://docs.astral.sh/ruff/rules/#flake8-print-t20 |
| 155 | + "PYI", # https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi |
| 156 | + "PT", # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt |
| 157 | + "Q", # https://docs.astral.sh/ruff/rules/#flake8-quotes-q |
| 158 | + "RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse |
| 159 | + "RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret |
| 160 | + "SLF", # https://docs.astral.sh/ruff/rules/#flake8-self-slf |
| 161 | + "SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim |
| 162 | + "TID", # https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid |
| 163 | + "TCH", # https://docs.astral.sh/ruff/rules/#flake8-type-checking-tch |
| 164 | + "INT", # https://docs.astral.sh/ruff/rules/#flake8-gettext-int |
| 165 | + "ARG", # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg |
| 166 | + # "PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth |
| 167 | + # "ERA", # https://docs.astral.sh/ruff/rules/#eradicate-era |
| 168 | + "PD", # https://docs.astral.sh/ruff/rules/#pandas-vet-pd |
| 169 | + "PGH", # https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh |
| 170 | + |
| 171 | + # Pylint |
| 172 | + "PLC", # https://docs.astral.sh/ruff/rules/#convention-plc |
| 173 | + "PLE", # https://docs.astral.sh/ruff/rules/#error-ple |
| 174 | + "PLR", # https://docs.astral.sh/ruff/rules/#refactor-plr |
| 175 | + "PLW", # https://docs.astral.sh/ruff/rules/#warning-plw |
| 176 | + |
| 177 | + # "TRY", # https://docs.astral.sh/ruff/rules/#tryceratops-try |
| 178 | + "NPY", # https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy |
| 179 | + "RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf |
| 180 | +] |
| 181 | + |
| 182 | +[tool.pytest.ini_options] |
| 183 | +testpaths =["tests"] |
| 184 | + |
| 185 | +[tool.coverage.run] |
| 186 | +omit = [ |
| 187 | + "tests/stresstest.py" |
| 188 | +] |
0 commit comments