Skip to content

Commit 479cbd3

Browse files
Lock file maintenance (#283)
* Lock file maintenance * Tweak renovate * Pin python version * Ignore renovate conf * Poetry warning --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dragomir Penev <[email protected]>
1 parent ee8d253 commit 479cbd3

File tree

8 files changed

+76
-92
lines changed

8 files changed

+76
-92
lines changed

.github/renovate.json5

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
"reviewers": ["dragomirp", "marceloneppel", "taurus-forever"],
55
"packageRules": [
66
// Later rules override earlier rules
7+
{
8+
"matchPackageNames": ["pydantic"],
9+
"allowedVersions": "<2.0.0"
10+
}, {
11+
"matchPackageNames": ["python"],
12+
"allowedVersions": "<3.11"
13+
}
714
],
815
"regexManagers": [
916
{

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- '.jujuignore'
1414
- 'LICENSE'
1515
- '**.md'
16-
- 'renovate.json'
16+
- .github/renovate.json5
1717
schedule:
1818
- cron: '53 0 * * *' # Daily at 00:53 UTC
1919
# Triggered on push to branch "main" by .github/workflows/release.yaml

.github/workflows/release.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
paths-ignore:
1010
- 'tests/**'
1111
- 'docs/**'
12-
- renovate.json
13-
- poetry.lock
12+
- .github/renovate.json5
1413
- pyproject.toml
1514
- '.github/workflows/ci.yaml'
1615
- '.github/workflows/lib-check.yaml'

poetry.lock

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ homepage = "https://charmhub.io/postgresql"
1212
repository = "https://github.com/canonical/postgresql-operator"
1313

1414
[tool.poetry.dependencies]
15-
python = "^3.10.6"
15+
python = "^3.10"
1616
ops = "^2.8.0"
1717
cryptography = "^41.0.5"
1818
boto3 = "^1.28.70"

src/backups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _are_backup_settings_ok(self) -> Tuple[bool, Optional[str]]:
8989
"Relation with s3-integrator charm missing, cannot create/restore backup.",
9090
)
9191

92-
s3_parameters, missing_parameters = self._retrieve_s3_parameters()
92+
_, missing_parameters = self._retrieve_s3_parameters()
9393
if missing_parameters:
9494
return False, f"Missing S3 parameters: {missing_parameters}"
9595

src/relations/db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def set_up_relation(self, relation: Relation) -> bool:
131131
"""Set up the relation to be used by the application charm."""
132132
# Do not allow apps requesting extensions to be installed
133133
# (let them now about config options).
134-
required_extensions, disabled_extensions = self._get_extensions(relation)
134+
_, disabled_extensions = self._get_extensions(relation)
135135
if disabled_extensions:
136136
logger.error(
137137
f"ERROR - `extensions` ({', '.join(disabled_extensions)}) cannot be requested through relations"

tox.ini

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ commands_post =
3333
[testenv:format]
3434
description = Apply coding style standards to code
3535
commands_pre =
36-
poetry install --only format
36+
poetry install --only format --no-root
3737
commands =
3838
poetry lock --no-update
3939
poetry run ruff --fix {[vars]all_path}
@@ -45,7 +45,7 @@ allowlist_externals =
4545
{[testenv]allowlist_externals}
4646
find
4747
commands_pre =
48-
poetry install --only lint,format
48+
poetry install --only lint,format --no-root
4949
commands =
5050
poetry check --lock
5151
poetry run codespell {[vars]all_path}
@@ -58,7 +58,7 @@ description = Run unit tests
5858
set_env =
5959
{[testenv]set_env}
6060
commands_pre =
61-
poetry install --only main,charm-libs,unit
61+
poetry install --only main,charm-libs,unit --no-root
6262
commands =
6363
poetry run coverage run --source={[vars]src_path} \
6464
-m pytest -v --tb native -s {posargs} {[vars]tests_path}/unit
@@ -77,7 +77,7 @@ pass_env =
7777
allowlist_externals =
7878
{[testenv:pack-wrapper]allowlist_externals}
7979
commands_pre =
80-
poetry install --only integration
80+
poetry install --only integration --no-root
8181
{[testenv:pack-wrapper]commands_pre}
8282
commands =
8383
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_backups.py
@@ -96,7 +96,7 @@ pass_env =
9696
allowlist_externals =
9797
{[testenv:pack-wrapper]allowlist_externals}
9898
commands_pre =
99-
poetry install --only integration
99+
poetry install --only integration --no-root
100100
{[testenv:pack-wrapper]commands_pre}
101101
commands =
102102
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_charm.py
@@ -115,7 +115,7 @@ pass_env =
115115
allowlist_externals =
116116
{[testenv:pack-wrapper]allowlist_externals}
117117
commands_pre =
118-
poetry install --only integration
118+
poetry install --only integration --no-root
119119
{[testenv:pack-wrapper]commands_pre}
120120
commands =
121121
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/new_relations/test_new_relations.py
@@ -134,7 +134,7 @@ pass_env =
134134
allowlist_externals =
135135
{[testenv:pack-wrapper]allowlist_externals}
136136
commands_pre =
137-
poetry install --only integration
137+
poetry install --only integration --no-root
138138
{[testenv:pack-wrapper]commands_pre}
139139
commands =
140140
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_db.py
@@ -153,7 +153,7 @@ pass_env =
153153
allowlist_externals =
154154
{[testenv:pack-wrapper]allowlist_externals}
155155
commands_pre =
156-
poetry install --only integration
156+
poetry install --only integration --no-root
157157
{[testenv:pack-wrapper]commands_pre}
158158
commands =
159159
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_db_admin.py
@@ -172,7 +172,7 @@ pass_env =
172172
allowlist_externals =
173173
{[testenv:pack-wrapper]allowlist_externals}
174174
commands_pre =
175-
poetry install --only integration
175+
poetry install --only integration --no-root
176176
{[testenv:pack-wrapper]commands_pre}
177177
commands =
178178
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_replication.py
@@ -191,7 +191,7 @@ pass_env =
191191
allowlist_externals =
192192
{[testenv:pack-wrapper]allowlist_externals}
193193
commands_pre =
194-
poetry install --only integration
194+
poetry install --only integration --no-root
195195
{[testenv:pack-wrapper]commands_pre}
196196
commands =
197197
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_self_healing.py
@@ -210,7 +210,7 @@ pass_env =
210210
allowlist_externals =
211211
{[testenv:pack-wrapper]allowlist_externals}
212212
commands_pre =
213-
poetry install --only integration
213+
poetry install --only integration --no-root
214214
{[testenv:pack-wrapper]commands_pre}
215215
commands =
216216
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_restore_cluster.py
@@ -229,7 +229,7 @@ pass_env =
229229
allowlist_externals =
230230
{[testenv:pack-wrapper]allowlist_externals}
231231
commands_pre =
232-
poetry install --only integration
232+
poetry install --only integration --no-root
233233
{[testenv:pack-wrapper]commands_pre}
234234
commands =
235235
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_password_rotation.py
@@ -248,7 +248,7 @@ pass_env =
248248
allowlist_externals =
249249
{[testenv:pack-wrapper]allowlist_externals}
250250
commands_pre =
251-
poetry install --only integration
251+
poetry install --only integration --no-root
252252
{[testenv:pack-wrapper]commands_pre}
253253
commands =
254254
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_plugins.py
@@ -267,7 +267,7 @@ pass_env =
267267
allowlist_externals =
268268
{[testenv:pack-wrapper]allowlist_externals}
269269
commands_pre =
270-
poetry install --only integration
270+
poetry install --only integration --no-root
271271
{[testenv:pack-wrapper]commands_pre}
272272
commands =
273273
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_tls.py
@@ -286,7 +286,7 @@ pass_env =
286286
allowlist_externals =
287287
{[testenv:pack-wrapper]allowlist_externals}
288288
commands_pre =
289-
poetry install --only integration
289+
poetry install --only integration --no-root
290290
{[testenv:pack-wrapper]commands_pre}
291291
commands =
292292
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_upgrade.py
@@ -305,7 +305,7 @@ pass_env =
305305
allowlist_externals =
306306
{[testenv:pack-wrapper]allowlist_externals}
307307
commands_pre =
308-
poetry install --only integration
308+
poetry install --only integration --no-root
309309
{[testenv:pack-wrapper]commands_pre}
310310
commands =
311311
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_upgrade_from_stable.py
@@ -325,7 +325,7 @@ pass_env =
325325
allowlist_externals =
326326
{[testenv:pack-wrapper]allowlist_externals}
327327
commands_pre =
328-
poetry install --only integration
328+
poetry install --only integration --no-root
329329
{[testenv:pack-wrapper]commands_pre}
330330
commands =
331331
poetry run pytest -v --tb native --log-cli-level=INFO -s --ignore={[vars]tests_path}/unit/ {posargs}

0 commit comments

Comments
 (0)