Skip to content

Commit c2490a7

Browse files
Merge pull request #147 from NHSDigital/feature/dh-MESH-2092-deps
MESH-2092 update deps
2 parents fcb557d + d691649 commit c2490a7

File tree

8 files changed

+850
-674
lines changed

8 files changed

+850
-674
lines changed

.github/dependabot.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5-
61
version: 2
2+
73
updates:
84
- package-ecosystem: "pip"
9-
directory: "/" # Location of package manifests
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
groups:
9+
dependencies:
10+
patterns:
11+
- "*"
12+
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
1015
schedule:
11-
interval: "monthly"
16+
interval: "monthly"
17+
groups:
18+
dependencies:
19+
patterns:
20+
- "*"

.github/workflows/merge-develop.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ jobs:
1111
if: github.repository == 'NHSDigital/nhs-aws-helpers' && !contains(github.event.head_commit.message, 'tag release version:')
1212
steps:
1313
- name: checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
1717

1818
- name: setup python
19-
uses: actions/setup-python@v4
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version-file: "pyproject.toml"
2222

2323
- name: setup poetry
24-
uses: abatilo/actions-poetry@v2
24+
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: |
3030
poetry self add "poetry-dynamic-versioning[plugin]"
3131
3232
- name: cache virtualenv
33-
uses: actions/cache@v3
33+
uses: actions/cache@v4
3434
with:
3535
path: |
3636
.venv
@@ -58,7 +58,7 @@ jobs:
5858

5959
- name: setup java
6060
if: github.actor != 'dependabot[bot]' && (success() || failure())
61-
uses: actions/setup-java@v3
61+
uses: actions/setup-java@v4
6262
with:
6363
distribution: "corretto"
6464
java-version: "17"
@@ -83,7 +83,7 @@ jobs:
8383

8484
- name: publish junit reports
8585
if: success() || failure()
86-
uses: mikepenz/action-junit-report@v2
86+
uses: mikepenz/action-junit-report@v5
8787
with:
8888
check_name: junit reports
8989
report_paths: reports/junit/*.xml
@@ -98,7 +98,7 @@ jobs:
9898
if: github.repository == 'NHSDigital/nhs-aws-helpers' && github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, 'tag release version:')
9999
steps:
100100
- name: checkout
101-
uses: actions/checkout@v3
101+
uses: actions/checkout@v4
102102
with:
103103
fetch-depth: 0
104104

@@ -108,14 +108,14 @@ jobs:
108108
find . -type f | xargs chmod g+w
109109
110110
- name: setup python
111-
uses: actions/setup-python@v4
111+
uses: actions/setup-python@v5
112112
with:
113113
python-version-file: "pyproject.toml"
114114

115115
- name: setup poetry
116-
uses: abatilo/actions-poetry@v2
116+
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: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if: github.repository == 'NHSDigital/nhs-aws-helpers'
1919
steps:
2020
- name: checkout
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222
with:
2323
fetch-depth: 0
2424

@@ -44,7 +44,7 @@ jobs:
4444
git merge --ff-only "${{ github.event.pull_request.head.sha }}"
4545
4646
- name: setup python
47-
uses: actions/setup-python@v4
47+
uses: actions/setup-python@v5
4848
with:
4949
python-version: ${{ matrix.python-version }}
5050

@@ -67,7 +67,7 @@ jobs:
6767
if: github.repository == 'NHSDigital/nhs-aws-helpers'
6868
steps:
6969
- name: checkout
70-
uses: actions/checkout@v3
70+
uses: actions/checkout@v4
7171
with:
7272
fetch-depth: 0
7373

@@ -96,21 +96,21 @@ jobs:
9696
git merge --ff-only "${{ github.event.pull_request.head.sha }}"
9797
9898
- name: setup python
99-
uses: actions/setup-python@v4
99+
uses: actions/setup-python@v5
100100
with:
101101
python-version-file: "pyproject.toml"
102102

103103
- name: setup poetry
104-
uses: abatilo/actions-poetry@v2
104+
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: |
110110
poetry self add "poetry-dynamic-versioning[plugin]"
111111
112112
- name: cache virtualenv
113-
uses: actions/cache@v3
113+
uses: actions/cache@v4
114114
with:
115115
path: |
116116
.venv
@@ -141,7 +141,7 @@ jobs:
141141

142142
- name: setup java
143143
if: success() || failure()
144-
uses: actions/setup-java@v3
144+
uses: actions/setup-java@v4
145145
with:
146146
distribution: "corretto"
147147
java-version: "17"
@@ -178,7 +178,7 @@ jobs:
178178

179179
- name: publish junit reports
180180
if: success() || failure()
181-
uses: mikepenz/action-junit-report@v3
181+
uses: mikepenz/action-junit-report@v5
182182
with:
183183
check_name: junit reports
184184
report_paths: reports/junit/*.xml
@@ -192,7 +192,7 @@ jobs:
192192
if: github.repository == 'NHSDigital/nhs-aws-helpers'
193193
steps:
194194
- name: checkout
195-
uses: actions/checkout@v3
195+
uses: actions/checkout@v4
196196
with:
197197
fetch-depth: 0
198198

@@ -213,21 +213,21 @@ jobs:
213213
git merge --ff-only "${{ github.event.pull_request.head.sha }}"
214214
215215
- name: setup python
216-
uses: actions/setup-python@v4
216+
uses: actions/setup-python@v5
217217
with:
218218
python-version-file: "pyproject.toml"
219219

220220
- name: setup poetry
221-
uses: abatilo/actions-poetry@v2
221+
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: |
227227
poetry self add "poetry-dynamic-versioning[plugin]"
228228
229229
- name: cache virtualenv
230-
uses: actions/cache@v3
230+
uses: actions/cache@v4
231231
with:
232232
path: |
233233
.venv
@@ -272,7 +272,7 @@ jobs:
272272
- tox
273273
steps:
274274
- name: checkout
275-
uses: actions/checkout@v3
275+
uses: actions/checkout@v4
276276
with:
277277
fetch-depth: 0
278278

@@ -298,14 +298,14 @@ jobs:
298298
git merge --ff-only "${{ github.event.pull_request.head.sha }}"
299299
300300
- name: setup python
301-
uses: actions/setup-python@v4
301+
uses: actions/setup-python@v5
302302
with:
303303
python-version-file: "pyproject.toml"
304304

305305
- name: setup poetry
306-
uses: abatilo/actions-poetry@v2
306+
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)