-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
169 lines (148 loc) · 4.57 KB
/
pyproject.toml
File metadata and controls
169 lines (148 loc) · 4.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[project]
name = "aws-lambda-python"
dynamic = ["version"]
description = 'MPIC standard API implementation leveraging AWS Lambda.'
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
keywords = []
authors = [
{ name = "Henry Birge-Lee", email = "henrybirgelee@gmail.com" },
{ name = "Grace Cimaszewski", email = "ghc2@princeton.edu"},
{ name = "Dmitry Sharkov", email = "dmitry.sharkov@sectigo.com" }
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
#"open-mpic-core @ git+https://github.com/open-mpic/open-mpic-core-python.git@birgelee-version-bump",
"pyyaml==6.0.2",
"requests==2.32.4",
"dnspython==2.7.0",
"pydantic==2.11.7",
"aiohttp==3.13.3",
"aws-lambda-powertools[parser]==3.15.1",
"open-mpic-core==6.3.0",
"aioboto3~=14.3.0",
"black==25.1.0",
]
[project.optional-dependencies]
test = [
"pytest==8.4.1",
"pytest-cov==6.2.1",
"pytest-mock==3.14.1",
"pytest-html==4.1.1",
"pytest-asyncio==1.0.0",
]
[project.urls]
Documentation = "https://github.com/open-mpic/aws-lambda-python"
Issues = "https://github.com/open-mpic/aws-lambda-python/issues"
Source = "https://github.com/open-mpic/aws-lambda-python"
#[dirs.env]
#virtual = ".hatch"
[tool.api]
spec_version = "3.8.0"
spec_repository = "https://github.com/open-mpic/open-mpic-specification"
[tool.hatch]
version.path = "src/aws_lambda_mpic/__about__.py"
build.sources = ["src", "resources"]
build.targets.wheel.packages = ["src/aws_lambda_mpic"]
[tool.hatch.envs.default]
skip-install = false
type="virtual"
path="venv"
[tool.hatch.envs.default.env-vars]
PIP_INDEX_URL = "https://pypi.org/simple/"
#PIP_EXTRA_INDEX_URL = "https://test.pypi.org/simple/" # FIXME here temporarily to test open-mpic-core packaging
PIP_VERBOSE = "1"
[tool.hatch.envs.lambda]
skip-install = true
python = "3.11"
type="virtual"
path="layer/create_layer_virtualenv"
[tool.hatch.envs.lambda.env-vars]
#PIP_EXTRA_INDEX_URL = "https://test.pypi.org/simple/"
PIP_ONLY_BINARY = ":all:"
#PIP_PLATFORM = "manylinux2014_aarch64"
#PIP_TARGET = "layer/create_layer_virtualenv2/lib/python3.11/site-packages" # does not work... bug in pip 24.2?
[tool.hatch.envs.lambda.scripts]
layer-install = "pip install . --upgrade --platform manylinux2014_aarch64 --only-binary=:all: --target layer/create_layer_virtualenv/lib/python3.11/site-packages"
layer-package = "./package-layer.sh"
configure-tf = "python configure.py"
zip-lambdas = "./zip-all.sh"
apply-tf-dnssec = "(cd open-tofu && tofu apply -var=\"dnssec_enabled=true\" -auto-approve)"
apply-tf-no-dnssec = "(cd open-tofu && tofu apply -var=\"dnssec_enabled=false\" -auto-approve)"
destroy-tf = "(cd open-tofu && tofu destroy -auto-approve)"
prepare = [
"layer-install",
"layer-package",
"configure-tf",
"zip-lambdas"
]
clean = "./clean.sh"
deploy-dnssec = [
"clean",
"prepare",
"apply-tf-dnssec"
]
deploy-no-dnssec = [
"clean",
"prepare",
"apply-tf-no-dnssec"
]
[tool.hatch.envs.test]
skip-install = false
features = [
"test",
]
installer = "pip"
#[tool.hatch.envs.test.env-vars]
#PIP_EXTRA_INDEX_URL = "https://test.pypi.org/simple/"
[tool.hatch.envs.test.scripts]
pre-install = "python -m ensurepip"
unit = "pytest"
unit-html = "pytest --html=testreports/index.html" # generate html report (warning: uses an aging plugin, 11-2023)
integration = "pytest tests/integration"
coverage = "pytest --cov=src/aws_lambda_mpic --cov-report=term-missing --cov-report=html"
[tool.hatch.envs.hatch-test]
default-args = ["tests/unit"]
randomize = true
[tool.pytest.ini_options]
pythonpath = [
"src", "tests", "." # need root directory because it has some python utility files we are importing for integration tests
]
testpaths = [
"tests/unit"
]
python_functions = [
"*_should_*",
]
markers = [
"integration: mark test as an integration test",
"unit: mark test as a unit test", # optional
]
addopts = [
"--import-mode=prepend", # explicit default, as the tests rely on it for proper import resolution
]
asyncio_mode = "auto" # defaults to "strict"
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
source = [
"src/aws_lambda_mpic"
]
[tool.coverage.report]
include_namespace_packages = true
omit = [
"*/src/*/__about__.py",
]
[tool.black]
line-length = 120