Skip to content

Commit

Permalink
Lock file maintenance (#321)
Browse files Browse the repository at this point in the history
* Lock file maintenance

* Fix linting

* Pin python version

* Poetry warning

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dragomir Penev <[email protected]>
  • Loading branch information
renovate[bot] and dragomirp authored Nov 16, 2023
1 parent b80bca3 commit dbf16df
Show file tree
Hide file tree
Showing 8 changed files with 296 additions and 289 deletions.
7 changes: 7 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
"reviewers": ["dragomirp", "marceloneppel", "taurus-forever"],
"packageRules": [
// Later rules override earlier rules
{
"matchPackageNames": ["pydantic"],
"allowedVersions": "<2.0.0"
}, {
"matchPackageNames": ["python"],
"allowedVersions": "<3.11"
}
],
"regexManagers": [
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- '.jujuignore'
- 'LICENSE'
- '**.md'
- 'renovate.json'
- .github/renovate.json5
schedule:
- cron: '53 0 * * *' # Daily at 00:53 UTC
# Triggered on push to branch "main" by .github/workflows/release.yaml
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
paths-ignore:
- 'tests/**'
- 'docs/**'
- renovate.json
- poetry.lock
- .github/renovate.json5
- pyproject.toml
- '.github/workflows/ci.yaml'
- '.github/workflows/lib-check.yaml'
Expand Down
535 changes: 268 additions & 267 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ homepage = "https://charmhub.io/postgresql-k8s"
repository = "https://github.com/canonical/postgresql-k8s-operator"

[tool.poetry.dependencies]
python = "^3.10.6"
python = "^3.10"
ops = "^2.8.0"
cryptography = "^41.0.5"
boto3 = "^1.28.70"
Expand Down
2 changes: 1 addition & 1 deletion src/backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _are_backup_settings_ok(self) -> Tuple[bool, Optional[str]]:
"Relation with s3-integrator charm missing, cannot create/restore backup.",
)

s3_parameters, missing_parameters = self._retrieve_s3_parameters()
_, missing_parameters = self._retrieve_s3_parameters()
if missing_parameters:
return False, f"Missing S3 parameters: {missing_parameters}"

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/ha_tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ async def list_wal_files(ops_test: OpsTest, app: str) -> Set:
files = {}
for unit in units:
complete_command = f"run --unit {unit} -- {command}"
return_code, stdout, stderr = await ops_test.juju(*complete_command.split())
_, stdout, _ = await ops_test.juju(*complete_command.split())
files[unit] = stdout.splitlines()
files[unit] = {
i for i in files[unit] if ".history" not in i and i != "" and i != "archive_status"
Expand Down
32 changes: 16 additions & 16 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ commands_post =
[testenv:format]
description = Apply coding style standards to code
commands_pre =
poetry install --only format
poetry install --only format --no-root
commands =
poetry lock --no-update
poetry run ruff --fix {[vars]all_path}
Expand All @@ -46,7 +46,7 @@ allowlist_externals =
{[testenv]allowlist_externals}
find
commands_pre =
poetry install --only lint,format
poetry install --only lint,format --no-root
commands =
poetry check --lock
poetry run codespell {[vars]all_path}
Expand All @@ -61,7 +61,7 @@ set_env =
juju2: LIBJUJU="2.9.44.1"
juju3: LIBJUJU="3.2.0.1"
commands_pre =
poetry install --only main,charm-libs,unit
poetry install --only main,charm-libs,unit --no-root
commands =
poetry run coverage run --source={[vars]src_path} \
-m pytest -v --tb native -s {posargs} {[vars]tests_path}/unit
Expand All @@ -80,7 +80,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_backups.py
Expand All @@ -99,7 +99,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_charm.py
Expand All @@ -118,7 +118,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/new_relations/test_new_relations.py
Expand All @@ -137,7 +137,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_db.py
Expand All @@ -156,7 +156,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_db_admin.py
Expand All @@ -175,7 +175,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_replication.py
Expand All @@ -194,7 +194,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_self_healing.py
Expand All @@ -213,7 +213,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_password_rotation.py
Expand All @@ -232,7 +232,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_plugins.py
Expand All @@ -251,7 +251,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/test_tls.py
Expand All @@ -270,7 +270,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_upgrade.py
Expand All @@ -289,7 +289,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tests_path}/integration/ha_tests/test_upgrade_from_stable.py
Expand All @@ -309,7 +309,7 @@ pass_env =
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
poetry install --only integration
poetry install --only integration --no-root
{[testenv:pack-wrapper]commands_pre}
commands =
poetry run pytest -v --tb native --log-cli-level=INFO -s --ignore={[vars]tests_path}/unit/ {posargs}
Expand Down

0 comments on commit dbf16df

Please sign in to comment.