Skip to content

Commit d691649

Browse files
MESH-2092 update deps and add three more client accessors
1 parent 06da755 commit d691649

File tree

7 files changed

+810
-643
lines changed

7 files changed

+810
-643
lines changed

.github/workflows/merge-develop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: setup poetry
2424
uses: abatilo/actions-poetry@v4
2525
with:
26-
poetry-version: 1.5.1
26+
poetry-version: 2.1.4
2727

2828
- name: add poetry plugins
2929
run: |
@@ -115,7 +115,7 @@ jobs:
115115
- name: setup poetry
116116
uses: abatilo/actions-poetry@v4
117117
with:
118-
poetry-version: 1.5.1
118+
poetry-version: 2.1.4
119119

120120
- name: add poetry plugins
121121
run: |

.github/workflows/pull-request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
- name: setup poetry
104104
uses: abatilo/actions-poetry@v4
105105
with:
106-
poetry-version: 1.5.1
106+
poetry-version: 2.1.4
107107

108108
- name: add poetry plugins
109109
run: |
@@ -220,7 +220,7 @@ jobs:
220220
- name: setup poetry
221221
uses: abatilo/actions-poetry@v4
222222
with:
223-
poetry-version: 1.5.1
223+
poetry-version: 2.1.4
224224

225225
- name: add poetry plugins
226226
run: |
@@ -305,7 +305,7 @@ jobs:
305305
- name: setup poetry
306306
uses: abatilo/actions-poetry@v4
307307
with:
308-
poetry-version: 1.5.1
308+
poetry-version: 2.1.4
309309

310310
- name: add poetry plugins
311311
run: |

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
poetry 1.8.5
2-
python 3.10.12 3.9.12 3.11.5
1+
poetry 2.1.4
2+
python 3.13.5 3.12.11 3.11.13 3.10.18 3.9.23

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3.9'
2-
31
services:
42

53
localstack:

nhs_aws_helpers/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,15 @@
4444
StandardRetryConditions,
4545
)
4646
from mypy_boto3_athena import AthenaClient
47+
from mypy_boto3_backup import BackupClient
48+
from mypy_boto3_ce import CostExplorerClient
49+
from mypy_boto3_cloudwatch import CloudWatchClient
4750
from mypy_boto3_dynamodb.client import DynamoDBClient
4851
from mypy_boto3_dynamodb.service_resource import DynamoDBServiceResource, Table
4952
from mypy_boto3_dynamodb.type_defs import KeysAndAttributesTypeDef
5053
from mypy_boto3_events import EventBridgeClient
5154
from mypy_boto3_firehose import FirehoseClient
55+
from mypy_boto3_glue import GlueClient
5256
from mypy_boto3_kms.client import KMSClient
5357
from mypy_boto3_lambda.client import LambdaClient
5458
from mypy_boto3_logs.client import CloudWatchLogsClient
@@ -183,6 +187,10 @@ def s3_client(session: Optional[Session] = None, config: Optional[Config] = None
183187
return _aws("s3", "client", session, config) # type: ignore[no-any-return]
184188

185189

190+
def backup_client(session: Optional[Session] = None, config: Optional[Config] = None) -> BackupClient:
191+
return _aws("backup", "client", session, config) # type: ignore[no-any-return]
192+
193+
186194
def register_retry_handler(
187195
client_or_resource: Union[S3ServiceResource, S3Client],
188196
on_error: Optional[Callable] = None,
@@ -305,6 +313,18 @@ def secrets_client(session: Optional[Session] = None, config: Optional[Config] =
305313
return _aws("secretsmanager", "client", session, config) # type: ignore[no-any-return]
306314

307315

316+
def glue_client(session: Optional[Session] = None, config: Optional[Config] = None) -> GlueClient:
317+
return _aws("glue", "client", session, config) # type: ignore[no-any-return]
318+
319+
320+
def cost_explorer_client(session: Optional[Session] = None, config: Optional[Config] = None) -> CostExplorerClient:
321+
return _aws("ce", "client", session, config) # type: ignore[no-any-return]
322+
323+
324+
def cloudwatch_client(session: Optional[Session] = None, config: Optional[Config] = None) -> CloudWatchClient:
325+
return _aws("cloudwatch", "client", session, config) # type: ignore[no-any-return]
326+
327+
308328
def secret_value(name: str, session: Optional[Session] = None, config: Optional[Config] = None) -> str:
309329
return secrets_client(session=session, config=config).get_secret_value(SecretId=name)["SecretString"]
310330

poetry.lock

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

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repository = "https://github.com/NHSDigital/nhs-aws-helpers"
1515
# core dependencies
1616
python = ">=3.9,<4.0"
1717
boto3 = "^1.38.14"
18-
boto3-stubs = {extras = ["s3", "ssm", "secretsmanager", "dynamodb", "stepfunctions", "sqs", "lambda", "logs", "ses", "sns", "events", "kms", "firehose", "athena"], version = "^1.38.6"}
18+
boto3-stubs = {extras = ["s3", "ssm", "secretsmanager", "dynamodb", "stepfunctions", "sqs", "lambda", "logs", "ses", "sns", "events", "kms", "firehose", "athena", "glue", "ce", "cloudwatch", "backup"], version = "^1.38.6"}
1919
botocore-stubs = "^1.38.46"
2020

2121

@@ -43,7 +43,7 @@ pytest = ["pytest", "petname"]
4343

4444
[tool.black]
4545
line-length = 120
46-
target-version = ['py39', 'py310', 'py311']
46+
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
4747
include = '\.pyi?$'
4848
#extend-exclude = '''
4949
#/(
@@ -139,13 +139,15 @@ check_untyped_defs = true
139139
[tool.tox]
140140
legacy_tox_ini = """
141141
[tox]
142-
envlist = py39,py310,py311
142+
envlist = py39,py310,py311,py312,py313
143143
144144
[gh-actions]
145145
python =
146146
3.9: py39
147147
3.10: py310
148148
3.11: py311
149+
3.12: py312
150+
3.13: py313
149151
150152
[testenv]
151153
deps =

0 commit comments

Comments
 (0)