Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 95 additions & 102 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,143 +8,136 @@ version = "0.1.4"
description = "Executor of INTERSECT campaigns"
classifiers = ["Private :: Do Not Upload"]
authors = [
{ name = "Lance Drane", email = "dranelt@ornl.gov" },
{ name = "Marshall McDonnell", email = "mcdonnellmt@ornl.gov" },
{ name = "Lance Drane", email = "dranelt@ornl.gov" },
{ name = "Marshall McDonnell", email = "mcdonnellmt@ornl.gov" },
]
requires-python = ">=3.12,<4.0"
#license = { text = "BSD-3-Clause" }
dependencies = [
"asgi-correlation-id>=4.3.4",
"fastapi>=0.115.12",
"graphviz>=0.21",
"httpx>=0.28.1",
"intersect-sdk-common==0.9.5",
"jsonschema>=4.25.1",
"minio>=7.2.15",
"paho-mqtt>=2.1.0",
"pika>=1.3.2",
"prefect>=3.6.16",
"pydantic-settings>=2.8.1",
"python-multipart>=0.0.20",
"pyyaml>=6.0.3",
"retrying>=1.4.2",
"snakes>=0.9.33",
"sse-starlette>=3.0.2",
"structlog>=25.2.0",
"uvicorn[standard]>=0.34.2",
"websockets>=15.0.1",
"asgi-correlation-id>=4.3.4",
"fastapi>=0.115.12",
"graphviz>=0.21",
"httpx>=0.28.1",
"intersect-sdk-common==0.9.5",
"jsonschema>=4.25.1",
"minio>=7.2.15",
"paho-mqtt>=2.1.0",
"pika>=1.3.2",
"prefect>=3.6.16",
"pydantic-settings>=2.8.1",
"python-multipart>=0.0.20",
"pyyaml>=6.0.3",
"retrying>=1.4.2",
"snakes>=0.9.33",
"sse-starlette>=3.0.2",
"structlog>=25.2.0",
"uvicorn[standard]>=0.34.2",
"websockets>=15.0.1",
]

[project.optional-dependencies]
mongo = [
"pymongo>=4.11.1",
]
postgres = [
"psycopg[binary]>=3.3.2",
]
mongo = ["pymongo>=4.11.1"]
postgres = ["psycopg[binary]>=3.3.2"]

[tool.hatch.build.targets.wheel]
packages = ["src/intersect_orchestrator"]

[dependency-groups]
dev = [
"codespell>=2.4.1",
"mongomock>=4.3.0",
"mypy>=1.15.0",
"pre-commit>=4.2.0",
"pytest>=8.3.5",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.1.0",
"ruff==0.15.4",
"pytest-postgresql>=8.0.0",
"codespell>=2.4.1",
"mongomock>=4.3.0",
"mypy>=1.15.0",
"pre-commit>=4.2.0",
"pytest>=8.3.5",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.1.0",
"ruff==0.15.4",
"pytest-postgresql>=8.0.0",
]

[tool.ruff]
line-length = 100
format = { quote-style = 'single' }
exclude = [
"concepts/**",
"services/**",
]
exclude = ["concepts/**", "services/**"]

[tool.ruff.lint]
isort = { known-first-party = ['src'] }
pydocstyle = { convention = 'google' }
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' }
mccabe = { max-complexity = 20 }
pylint = { max-args = 10, max-branches = 20, max-returns = 10, max-statements = 75 }
dummy-variable-rgx = '^(request)$' # permit "request" to be a variable name for FastAPI, even if not directly used
dummy-variable-rgx = '^(request$|_)' # permit "request" to be a variable name for FastAPI, even if not directly used
# pyflakes and the relevant pycodestyle rules are already configured
extend-select = [
'C90', # mccabe complexity
'I', # isort
'N', # pep8-naming
'UP', # pyupgrade
'YTT', # flake8-2020
'ANN', # flake8-annotations
'ASYNC', # flake8-async
'S', # flake8-bandit
'BLE', # flake8-blind-except
'B', # flake8-bugbear
'A', # flake8-builtins
'COM', # flake8-commas
'C4', # flake8-comprehensions
'DTZ', # flake8-datetimez
'T10', # flake8-debugger
'EM', # flake8-error-message
'FA', # flake8-future-annotations
'ISC', # flake8-implicit-string-concat
'ICN', # flake8-import-conventions
'G', # flake8-logging-format
'INP', # flake8-no-pep420
'PIE', # flake8-PIE
'T20', # flake8-T20
'PYI', # flake8-pyi
'PT', # flake8-pytest-style
'Q', # flake8-quotes
'RSE', # flake8-raise
'RET', # flake8-return
'SLF', # flake8-self
'SLOT', # flake8-slots
'SIM', # flake8-simplify
'TCH', # flake8-type-checking
'ARG', # flake8-unused-arguments
'PTH', # flake8-use-pathlib
'PGH', # pygrep-hooks
'PL', # pylint
'TRY', # tryceratops
'FLY', # flynt
'RUF', # RUFF additional rules
'FAST', # FastAPI
'C90', # mccabe complexity
'I', # isort
'N', # pep8-naming
'UP', # pyupgrade
'YTT', # flake8-2020
'ANN', # flake8-annotations
'ASYNC', # flake8-async
'S', # flake8-bandit
'BLE', # flake8-blind-except
'B', # flake8-bugbear
'A', # flake8-builtins
'COM', # flake8-commas
'C4', # flake8-comprehensions
'DTZ', # flake8-datetimez
'T10', # flake8-debugger
'EM', # flake8-error-message
'FA', # flake8-future-annotations
'ISC', # flake8-implicit-string-concat
'ICN', # flake8-import-conventions
'G', # flake8-logging-format
'INP', # flake8-no-pep420
'PIE', # flake8-PIE
'T20', # flake8-T20
'PYI', # flake8-pyi
'PT', # flake8-pytest-style
'Q', # flake8-quotes
'RSE', # flake8-raise
'RET', # flake8-return
'SLF', # flake8-self
'SLOT', # flake8-slots
'SIM', # flake8-simplify
'TCH', # flake8-type-checking
'ARG', # flake8-unused-arguments
'PTH', # flake8-use-pathlib
'PGH', # pygrep-hooks
'PL', # pylint
'TRY', # tryceratops
'FLY', # flynt
'RUF', # RUFF additional rules
'FAST', # FastAPI
]
# If you're seeking to disable a rule, first consider whether the rule is overbearing, or if it should only be turned off for your usecase.
ignore = [
'COM812', # formatter, handled by Ruff format
'ISC001', # formatter, handled by Ruff format
'SIM105', # "with contextlib.suppress():" is slower than try-except-pass
'ANN401', # allow explicit "Any" typing, use with care
'PLR2004', # allow "magic numbers"
'RET504', # allow "unnecessary" assignments to variables before return statements
'COM812', # formatter, handled by Ruff format
'ISC001', # formatter, handled by Ruff format
'SIM105', # "with contextlib.suppress():" is slower than try-except-pass
'ANN401', # allow explicit "Any" typing, use with care
'PLR2004', # allow "magic numbers"
'RET504', # allow "unnecessary" assignments to variables before return statements
]

[tool.ruff.lint.extend-per-file-ignores]
'__init__.py' = ['F401'] # __init__.py commonly has unused imports
'docs/*' = [
'D', # the documentation folder does not need documentation
'INP001', # docs are not a namespace package
'D', # the documentation folder does not need documentation
'INP001', # docs are not a namespace package
]
'src/intersect_orchestrator/app/*' = [
'INP001', # not a namespace package
'INP001', # not a namespace package
]
'tests/*' = [
'S101', # allow assert statements in tests
'S106', # don't care about credentials in tests
'S311', # don't care about cryptographic security in tests
'SLF001', # allow private member access in tests
'ANN', # tests in general don't need types, unless they are runtime types.
'ARG', # allow unused parameters in tests
'D', # ignore documentation in tests
'FA100', # tests frequently use runtime typing annotations
'S101', # allow assert statements in tests
'S106', # don't care about credentials in tests
'S311', # don't care about cryptographic security in tests
'SLF001', # allow private member access in tests
'ANN', # tests in general don't need types, unless they are runtime types.
'ARG', # allow unused parameters in tests
'D', # ignore documentation in tests
'FA100', # tests frequently use runtime typing annotations
]

# see https://mypy.readthedocs.io/en/stable/config_file.html for a complete reference
Expand All @@ -165,14 +158,14 @@ log_cli = true
addopts = "-ra"
asyncio_mode = "auto"
markers = [
"integration: mark test as an integration test",
"unit: mark test as a unit test",
"asyncio: mark test as an async test",
"integration: mark test as an integration test",
"unit: mark test as a unit test",
"asyncio: mark test as an async test",
]

[tool.coverage.report]
omit = [
'*__init__*', # __init__ files should just re-export other classes and functions
'*__init__*', # __init__ files should just re-export other classes and functions
]
exclude_also = [
'pragma: no-cover', # standard
Expand Down
Loading
Loading