|
| 1 | +[build-system] |
| 2 | +requires = ["hatchling"] |
| 3 | +build-backend = "hatchling.build" |
| 4 | + |
| 5 | +[project] |
| 6 | +name = "aws-durable-execution-sdk-python-examples" |
| 7 | +version = "0.0.0" |
| 8 | +description = "Examples for AWS Durable Execution SDK for Python" |
| 9 | +requires-python = ">=3.11" |
| 10 | +dependencies = [ |
| 11 | + "aws-durable-execution-sdk-python", |
| 12 | + "aws-durable-execution-sdk-python-testing", |
| 13 | +] |
| 14 | + |
| 15 | +[tool.hatch.build.targets.wheel] |
| 16 | +packages = ["src"] |
| 17 | + |
| 18 | +[tool.hatch.envs.default] |
| 19 | +workspace.members = ["../aws-durable-execution-sdk-python"] |
| 20 | + |
| 21 | +[tool.hatch.envs.hatch-test] |
| 22 | +default-args = ["test"] |
| 23 | + |
| 24 | +[tool.pytest.ini_options] |
| 25 | +testpaths = ["test"] |
| 26 | +addopts = "-v --strict-markers" |
| 27 | +pythonpath = ["."] |
| 28 | +markers = [ |
| 29 | + "example: marks tests as example tests (deselect with '-m \"not example\"')", |
| 30 | + "durable_execution: marks tests that use the durable_runner fixture (not used for test selection)", |
| 31 | +] |
| 32 | +[tool.hatch.envs.test] |
| 33 | +dependencies = [ |
| 34 | + "coverage[toml]", |
| 35 | + "pytest", |
| 36 | + "pytest-cov", |
| 37 | + "aws-durable-execution-sdk-python-testing", |
| 38 | +] |
| 39 | + |
| 40 | +[tool.hatch.envs.test.scripts] |
| 41 | +examples = "pytest --runner-mode=local -m example test/ -v" |
| 42 | +examples-integration = "pytest --runner-mode=cloud -m example test/ -v {args}" |
| 43 | +cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml -v test/" |
| 44 | + |
| 45 | +[tool.hatch.envs.examples] |
| 46 | +dependencies = [ |
| 47 | + "aws-durable-execution-sdk-python-testing>=1.0.0", |
| 48 | +] |
| 49 | + |
| 50 | +[tool.hatch.envs.examples.scripts] |
| 51 | +cli = "python cli.py {args}" |
| 52 | +bootstrap = "python cli.py bootstrap" |
| 53 | +generate-sam-template = "python scripts/generate_sam_template.py" |
| 54 | +build = "python cli.py build" |
| 55 | +deploy = "python cli.py deploy {args}" |
| 56 | +invoke = "python cli.py invoke {args}" |
| 57 | +get = "python cli.py get {args}" |
| 58 | +history = "python cli.py history {args}" |
| 59 | +policy = "python cli.py policy {args}" |
| 60 | +list = "python cli.py list" |
| 61 | +clean = "rm -rf build .aws-sam *.zip" |
| 62 | + |
| 63 | +[tool.ruff] |
| 64 | +line-length = 88 |
| 65 | +target-version = "py311" |
| 66 | + |
| 67 | +[tool.ruff.lint] |
| 68 | +preview = true |
| 69 | +select = ["TID252"] # Enforce absolute imports (ban relative imports) |
| 70 | + |
| 71 | +[tool.ruff.lint.isort] |
| 72 | +known-first-party = ["aws_durable_execution_sdk_python"] |
| 73 | +force-single-line = false |
| 74 | +lines-after-imports = 2 |
| 75 | + |
| 76 | +[tool.ruff.lint.per-file-ignores] |
| 77 | +"test/**" = [ |
| 78 | + "ARG001", |
| 79 | + "ARG002", |
| 80 | + "ARG005", |
| 81 | + "S101", |
| 82 | + "PLR2004", |
| 83 | + "SIM117", |
| 84 | + "TRY301", |
| 85 | +] |
0 commit comments