Skip to content

Commit c604424

Browse files
Cleanup and reduce scope to only Python 3.13 projects as a root uv workspace.
1 parent b5e5119 commit c604424

17 files changed

Lines changed: 1787 additions & 144 deletions

File tree

apps/bfd-model-idr/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name = "sythetic-data-generator"
33
version = "0.1.0"
44
description = " IDR Model Sythetic Data Generator"
55
readme = "README.md"
6-
requires-python = "==3.13.*"
76
dependencies = [
87
"faker>=37.1.0",
98
"pandas>=2.2.3",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.14
Lines changed: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,81 @@
11
[project]
22
name = "bfd-pipeline-idr"
3-
version = "0.2.0"
4-
description = "BFD IDR Pipeline"
3+
version = "0.1.0"
4+
description = "Add your description here"
55
readme = "README.md"
6-
requires-python = "==3.14.*"
6+
requires-python = ">=3.14"
77
dependencies = [
8-
"cryptography==45.0.6",
9-
"psycopg[binary,pool]==3.2.13",
10-
"pydantic==2.12.4",
11-
"snowflake-connector-python>=4.1.0",
12-
"python-dateutil==2.9.0",
138
"cryptography>=45.0.6",
149
"psycopg[binary,pool]>=3.2.13",
1510
"pydantic>=2.12.4",
1611
"snowflake-connector-python>=4.1.0",
1712
"sf-hamilton>=1.89.0",
1813
"python-dateutil>=2.9.0",
14+
"usaddress>=0.5.16",
15+
"unidecode>=1.4.0",
1916
]
2017

2118
[dependency-groups]
2219
dev = [
20+
"ruff>=0.14.6",
21+
"uv>=0.9.11",
22+
"pytest>=9.0.1",
2323
"testcontainers>=4.13.3",
24+
"pyright>=1.1.407",
25+
]
26+
27+
# [[tool.mypy.overrides]]
28+
# module = ["testcontainers.*"]
29+
# follow_untyped_imports = true
30+
31+
[tool.ruff]
32+
# Set the maximum line length to 100.
33+
line-length = 100
34+
35+
[tool.ruff.lint]
36+
select = [
37+
"D", # pydocstyle
38+
"E501",
39+
# pycodestyle
40+
"E",
41+
# Pyflakes
42+
"F",
43+
# pyupgrade
44+
"UP",
45+
# flake8-bugbear
46+
"B",
47+
# flake8-simplify
48+
"SIM",
49+
# isort
50+
"I",
51+
"ANN",
52+
"LOG",
53+
"G",
54+
"PT",
55+
"RSE",
56+
"PIE",
57+
"RET",
58+
"SLF",
59+
"ARG",
60+
"PTH",
61+
"PLE",
62+
"PLW",
63+
"PERF",
64+
"FURB",
65+
"RUF",
2466
]
67+
# Don't require docstrings
68+
ignore = ["D100", "D101", "D102", "D103", "D104", "D105", "D107"]
69+
70+
[tool.ruff.lint.pydocstyle]
71+
convention = "pep257"
72+
73+
[tool.ruff.format]
74+
quote-style = "double"
75+
indent-style = "space"
76+
docstring-code-format = true
77+
78+
[tool.pyright]
79+
typeCheckingMode = "strict"
80+
venvPath = "."
81+
venv = ".venv"

apps/bfd-pipeline-idr/uv.lock

Lines changed: 912 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/bfd-server-ng/codegen/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ name = "bfd-server-ng-codegen"
33
version = "0.1.0"
44
description = "BFD Server NG Codegen"
55
readme = "README.md"
6-
requires-python = "==3.13.*"
76
dependencies = []

apps/utils/locust_tests/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[project]
2-
requires-python = "==3.13.*"
32
name = "locust-tests"
43
version = "1.0.0"
54
dependencies = [
Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "samhsa-regression-tests"
33
version = "1.0.0"
4-
requires-python = "==3.14.*"
4+
requires-python = ">=3.14"
55
dependencies = [
66
"aiohttp>=3.13.0",
77
"psycopg[binary]>=3.2.10",
@@ -11,10 +11,54 @@ dependencies = [
1111
"pyyaml>=6.0.3",
1212
]
1313

14-
# Inherits tool configurations from
15-
# ../../pyproject.toml (apps workspace) and
16-
# ../../../pyproject.toml (root)
14+
[tool.ruff]
15+
# Set the maximum line length to 100.
16+
line-length = 100
17+
18+
[tool.ruff.lint]
19+
select = [
20+
"D", # pydocstyle
21+
"E501",
22+
# pycodestyle
23+
"E",
24+
# Pyflakes
25+
"F",
26+
# pyupgrade
27+
"UP",
28+
# flake8-bugbear
29+
"B",
30+
# flake8-simplify
31+
"SIM",
32+
# isort
33+
"I",
34+
"ANN",
35+
"LOG",
36+
"G",
37+
"PT",
38+
"RSE",
39+
"PIE",
40+
"RET",
41+
"SLF",
42+
"ARG",
43+
"PTH",
44+
"PLE",
45+
"PLW",
46+
"PERF",
47+
"FURB",
48+
"RUF",
49+
]
50+
# Don't require docstrings
51+
ignore = ["D100", "D101", "D102", "D103", "D104", "D105", "D107"]
52+
53+
[tool.ruff.lint.pydocstyle]
54+
convention = "pep257"
55+
56+
[tool.ruff.format]
57+
quote-style = "double"
58+
indent-style = "space"
59+
docstring-code-format = true
1760

1861
[tool.pyright]
62+
typeCheckingMode = "strict"
1963
venvPath = "."
2064
venv = ".venv"

apps/utils/samhsa-regression-tests/uv.lock

Lines changed: 474 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/utils/synthetic-load-converter/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[project]
22
version = "0.1.0"
3-
requires-python = "==3.13.*"
43
dependencies = [
54
"boto3<2.0.0,>=1.35.93",
65
"types-boto3[essential]<2.0.0,>=1.35.93",
Lines changed: 118 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,126 @@
11
import argparse
22
from lambda_function import lambda_handler
33

4+
"""
5+
Call / Test lambda handler with params for local development.
46
7+
Edit and use the following params when testing and developing locally.
8+
9+
NOTE: These params are not used when launched via AWS Lambda.
10+
11+
When launching via AWS Lambda you must pass the parameters dictionary
12+
via the "event". This can be included with the Lambda TEST parameters or
13+
via the EventBridge caller.
14+
"""
515
parser = argparse.ArgumentParser(
616
description="Utility to test the lambda_function() locally for development."
717
)
18+
parser.add_argument(
19+
"--region",
20+
"-r",
21+
help="The Athena AWS region.",
22+
default="us-east-1",
23+
type=str,
24+
)
25+
parser.add_argument(
26+
"--workgroup",
27+
"-w",
28+
help="The AWS Glue table workgroup.",
29+
default="bb2",
30+
type=str,
31+
)
32+
parser.add_argument(
33+
"--database",
34+
"-d",
35+
help="The AWS Glue table database.",
36+
default="bb2",
37+
type=str,
38+
)
39+
parser.add_argument(
40+
"--env",
41+
"-e",
42+
help="The BB2 environment (prod/impl/test).",
43+
required=True,
44+
type=str,
45+
)
46+
parser.add_argument(
47+
"--target-report-dates",
48+
"-t",
49+
help="The target report dates. EX: 2023-02-27, 2023-03-06",
50+
default="",
51+
type=str,
52+
)
53+
54+
parser.add_argument(
55+
"--basename-main",
56+
"-m",
57+
help="The basename for the top-level/main metric table. EX: global_state_copy1",
58+
default="global_state_copy1",
59+
type=str,
60+
)
61+
62+
parser.add_argument(
63+
"--basename-per-app",
64+
"-p",
65+
help="The basename for the per-application metric table. EX: global_state_per_app_copy1",
66+
default="global_state_per_app_copy1",
67+
type=str,
68+
)
69+
parser.add_argument(
70+
"--retry-sleep-seconds",
71+
"-s",
72+
help="The time in seconds between query retries. EX: 30",
73+
default="60",
74+
type=str,
75+
)
76+
77+
args = parser.parse_args()
78+
79+
REGION = args.region if args.region else None
80+
WORKGROUP = args.workgroup if args.workgroup else None
81+
DATABASE = args.database if args.database else None
82+
ENV = args.env if args.env else None
83+
TARGET_DATES = args.target_report_dates if args.target_report_dates else ""
84+
BASENAME_MAIN = args.basename_main if args.basename_main else None
85+
BASENAME_PER_APP = args.basename_per_app if args.basename_per_app else None
86+
RETRY_SLEEP_SECONDS = args.retry_sleep_seconds if args.retry_sleep_seconds else None
87+
88+
target_date_list = TARGET_DATES.split(",")
89+
90+
print("--- Testing lambda_function.py")
91+
print("---")
92+
print("--- Using the following parameters:")
93+
print("---")
94+
print("--- TARGET_DATE_LIST: ", str(target_date_list))
95+
print("--- REGION: ", REGION)
96+
print("--- WORKGROUP: ", WORKGROUP)
97+
print("--- DATABASE: ", DATABASE)
98+
print("--- ENV: ", ENV)
99+
print("--- BASENAME_MAIN: ", BASENAME_MAIN)
100+
print("--- BASENAME_PER_APP: ", BASENAME_PER_APP)
101+
print("--- RETRY_SLEEP_SECONDS: ", RETRY_SLEEP_SECONDS)
102+
print("---")
103+
104+
105+
event = {
106+
"REGION": REGION,
107+
"WORKGROUP": WORKGROUP,
108+
"DATABASE": DATABASE,
109+
"ENV": ENV,
110+
"BASENAME_MAIN": BASENAME_MAIN,
111+
"BASENAME_PER_APP": BASENAME_PER_APP,
112+
"RETRY_SLEEP_SECONDS": RETRY_SLEEP_SECONDS
113+
}
114+
8115

9-
parser.add_argument("--region", "-r", default="us-east-1", type=str)
10-
parser.add_argument("--workgroup", "-w", default="bb2", type=str)
11-
parser.add_argument("--database", "-d", default="bb2", type=str)
12-
parser.add_argument("--env", "-e", required=True, type=str)
13-
parser.add_argument("--target-report-dates", "-t", default="", type=str)
14-
parser.add_argument("--basename-main", "-m", default="global_state_copy1", type=str)
15-
parser.add_argument("--basename-per-app", "-p", default="global_state_per_app_copy1", type=str)
16-
parser.add_argument("--retry-sleep-seconds", "-s", default="60", type=str)
17-
18-
19-
def run(args):
20-
REGION = args.region
21-
WORKGROUP = args.workgroup
22-
DATABASE = args.database
23-
ENV = args.env
24-
TARGET_DATES = args.target_report_dates or ""
25-
BASENAME_MAIN = args.basename_main
26-
BASENAME_PER_APP = args.basename_per_app
27-
RETRY_SLEEP_SECONDS = args.retry_sleep_seconds
28-
29-
target_date_list = TARGET_DATES.split(",")
30-
31-
print("--- Testing lambda_function.py")
32-
print("--- Using the following parameters:")
33-
print("--- TARGET_DATE_LIST:", target_date_list)
34-
print("--- REGION:", REGION)
35-
print("--- WORKGROUP:", WORKGROUP)
36-
print("--- DATABASE:", DATABASE)
37-
print("--- ENV:", ENV)
38-
39-
event = {
40-
"REGION": REGION,
41-
"WORKGROUP": WORKGROUP,
42-
"DATABASE": DATABASE,
43-
"ENV": ENV,
44-
"BASENAME_MAIN": BASENAME_MAIN,
45-
"BASENAME_PER_APP": BASENAME_PER_APP,
46-
"RETRY_SLEEP_SECONDS": RETRY_SLEEP_SECONDS,
47-
}
48-
49-
for target_date in target_date_list:
50-
event["TARGET_DATE"] = target_date
51-
status = lambda_handler(event, None)
52-
print("STATUS:", status)
53-
54-
55-
def main():
56-
args = parser.parse_args()
57-
run(args)
58-
59-
60-
if __name__ == "__main__":
61-
main()
116+
for target_date in target_date_list:
117+
event["TARGET_DATE"] = target_date
118+
context = None
119+
status = lambda_handler(event, context)
120+
print("##")
121+
print("## STATUS: ", status)
122+
print("##")
123+
print("##")
124+
print("## -------------------------------")
125+
print("##")
126+
print("##")

0 commit comments

Comments
 (0)