Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ jobs:
fail-fast: false
matrix:
py:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.14"
os:
- ubuntu-latest
steps:
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ ENV \
PIP_DEFAULT_TIMEOUT=300 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
REQUESTS_CA_BUNDLE=/etc/pki/tls/cert.pem
PYTHONUNBUFFERED=1

CMD ["/usr/bin/repotracker"]

Expand Down
1 change: 0 additions & 1 deletion repotracker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import pprint
from repotracker import utils, container, messaging


log = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion repotracker/messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import logging
from rhmsg.activemq.producer import AMQProducer


log = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion repotracker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import datetime
import re


FRACTIONAL_SECONDS_RE = re.compile(r"\.\d+(\w*)$")


Expand Down
249 changes: 143 additions & 106 deletions requirements.txt

Large diffs are not rendered by default.

18 changes: 6 additions & 12 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ def test_main_default(tmpdir):
Test that the main() method works as expected with default args.
"""
conf = tmpdir.join("conf")
conf.write(
"""[broker]
conf.write("""[broker]
urls = amqps://broker01.example.com
cert = /cert
key = /key
cacerts = /cacerts
topic_prefix = container
"""
)
""")
data = tmpdir.join("data")
with patch("sys.argv", new=["foo", "-c", str(conf), "-d", str(data)]):
cli.main()
Expand All @@ -60,15 +58,13 @@ def test_main_quiet_verbose(tmpdir):
Test that the main() method works as expected with quiet and verbose options.
"""
conf = tmpdir.join("conf")
conf.write(
"""[broker]
conf.write("""[broker]
urls = amqps://broker01.example.com
cert = /cert
key = /key
cacerts = /cacerts
topic_prefix = container
"""
)
""")
data = tmpdir.join("data")
with patch("sys.argv", new=["foo", "-c", str(conf), "-d", str(data), "-q", "-v"]):
cli.main()
Expand All @@ -84,15 +80,13 @@ def test_main_error(send_container_updates, tmpdir):
Test that the main() method works as expected when handling an error.
"""
conf = tmpdir.join("conf")
conf.write(
"""[broker]
conf.write("""[broker]
urls = amqps://broker01.example.com
cert = /cert
key = /key
cacerts = /cacerts
topic_prefix = container
"""
)
""")
data = tmpdir.join("data")
with patch("sys.argv", new=["foo", "-c", str(conf), "-d", str(data), "-q", "-v"]):
with pytest.raises(RuntimeError):
Expand Down
1 change: 0 additions & 1 deletion tests/test_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import json
import pytest


CONF = {
"broker": {
"urls": "amqps://broker01.example.com",
Expand Down
6 changes: 2 additions & 4 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ def test_load_config(tmpdir):
Test that the config can be loaded.
"""
conf = tmpdir.join("conf")
conf.write(
"""[broker]
conf.write("""[broker]
urls = amqps://broker01.example.com
cert = /cert
key = /key
Expand All @@ -21,8 +20,7 @@ def test_load_config(tmpdir):
[example]
type = container
repo = example.com/repos/testrepo
"""
)
""")
result = utils.load_config(str(conf))
assert result.has_section("broker")
assert result["broker"]["urls"] == "amqps://broker01.example.com"
Expand Down
11 changes: 4 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
[tox]
requires =
tox>=4
env_list = lint, py{39,310,311,312}
env_list = lint, py314

[gh]
python =
3.12 = py312, lint, cov
3.11 = py311
3.10 = py310
3.9 = py39
3.14 = py314, lint, cov

[pytest]
minversion = 7.0
Expand All @@ -32,7 +29,7 @@ deps =
skip_install = true
commands =
flake8 .
black . --check --diff -t py312
black . --check --diff -t py314

[flake8]
# E722 do not use bare 'except'
Expand All @@ -50,7 +47,7 @@ commands = black {posargs:.}

[testenv:pip-compile]
description = generate requirements.txt from dependencies specified in pyproject.toml
basepython = python312
basepython = python314
skip_install = true
deps = pip-tools
commands =
Expand Down
Loading