HexCasting/pyproject.toml
2023-09-29 02:18:09 -04:00

173 lines
4.6 KiB
TOML

[build-system]
requires = ["hatchling", "hatch-gradle-version>=0.6.0"]
build-backend = "hatchling.build"
# project metadata
[project]
name = "hexdoc"
description = "Python web book docgen for Patchouli and Hex Casting."
authors = [
{ name="object-Object" },
{ name="Alwinfy" },
]
readme = "doc/README.md"
license = { file = "doc/LICENSE.txt" }
keywords = ["hexdoc"]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Java",
"Programming Language :: JavaScript",
"Programming Language :: Kotlin",
"Programming Language :: Python :: 3.11",
"Topic :: Documentation",
"Topic :: File Formats :: JSON",
"Topic :: Games/Entertainment",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Localization",
"Topic :: Text Processing :: Markup :: HTML",
"Typing :: Typed",
]
requires-python = ">=3.11"
dependencies = [
"typing_extensions>=4.6.1,<5",
"importlib_resources>=6.0.1,<7",
"more_itertools>=10.1.0,<11",
"pydantic>=2.3.0,<3,!=2.4.0",
"pydantic_settings>=2.0.3,<3",
"Jinja2>=3.1.2,<4",
"pyjson5>=1.6.3,<2",
"pluggy>=1.3.0,<2",
]
dynamic = ["version"]
[project.optional-dependencies]
dev = [
"black==23.7.0",
"isort==5.12.0",
"pytest>=7.3.1",
"syrupy>=4.0.2",
"hatch",
"build",
]
[project.urls]
Homepage = "https://object-object.github.io/HexMod/" # TODO: replace
Source = "https://github.com/object-Object/HexMod/tree/docgen-2-1.20/doc" # TODO: replace
# Gradle version/deps
[tool.hatch.version]
scheme = "gradle"
source = "gradle-properties"
py-path = "doc/src/hexdoc/__version__.py"
# project structure
[tool.hatch.build]
artifacts = [
"/doc/src/hexdoc/_export/generated",
"/doc/src/hexdoc/__gradle_version__.py",
]
[tool.hatch.build.targets.sdist]
only-include = [
"doc/src/hexdoc",
"gradle.properties",
]
[tool.hatch.build.targets.wheel]
packages = [
"doc/src/hexdoc",
]
[project.scripts]
hexdoc = "hexdoc.scripts.hexdoc:main"
hexdoc_merge = "hexdoc.scripts.hexdoc_merge:main"
# hexdoc
[project.entry-points.hexdoc]
hexcasting = "hexdoc.hexcasting._hooks:HexcastingPlugin"
minecraft = "hexdoc.minecraft._hooks:MinecraftPlugin"
patchouli = "hexdoc.patchouli._hooks:PatchouliPlugin"
# Pytest
[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
[tool.coverage.report]
include_namespace_packages = true
# formatting and linting
[tool.isort]
profile = "black"
combine_as_imports = true
known_first_party = ["hexdoc"]
[tool.pyright]
pythonVersion = "3.11"
pythonPlatform = "All"
include = ["doc/src"]
extraPaths = ["doc/src"]
exclude = ["doc/{{cookiecutter.directory}}"]
enableExperimentalFeatures = true
# mostly we use strict mode
# but pyright doesn't allow decreasing error severity in strict mode
# so we need to manually specify all of the strict mode overrides so we can do that :/
typeCheckingMode = "basic"
strictDictionaryInference = true
strictListInference = true
strictSetInference = true
reportAssertAlwaysTrue = "error"
reportConstantRedefinition = "error"
reportDeprecated = "error"
reportDuplicateImport = "error"
reportFunctionMemberAccess = "error"
reportIncompatibleMethodOverride = "error"
reportIncompleteStub = "error"
reportInconsistentConstructor = "error"
reportInvalidStringEscapeSequence = "error"
reportInvalidStubStatement = "error"
reportInvalidTypeVarUse = "error"
reportMatchNotExhaustive = "error"
reportMissingParameterType = "error"
reportMissingTypeStubs = "error"
reportOverlappingOverload = "error"
reportSelfClsParameterName = "error"
reportTypeCommentUsage = "error"
reportUnknownParameterType = "error"
reportUnnecessaryCast = "error"
reportUnnecessaryContains = "error"
reportUnsupportedDunderAll = "error"
reportUntypedBaseClass = "error"
reportUntypedClassDecorator = "error"
reportUntypedFunctionDecorator = "error"
reportUntypedNamedTuple = "error"
reportWildcardImportFromLibrary = "error"
reportMissingTypeArgument = "warning"
reportPrivateUsage = "warning"
reportUnknownArgumentType = "warning"
reportUnknownLambdaType = "warning"
reportUnknownMemberType = "warning"
reportUnnecessaryComparison = "warning"
reportUnnecessaryIsInstance = "warning"
reportUnusedClass = "warning"
reportUnusedExpression = "warning"
reportUnusedFunction = "warning"
reportUnusedImport = "warning"
reportUnusedVariable = "warning"
reportUnknownVariableType = "none"
reportIncompatibleVariableOverride = "none" # TODO: open an issue with Pydantic/Pyright about this