Skip to content

Commit

Permalink
Bump required dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
timkpaine committed Feb 15, 2025
1 parent 51e6367 commit d155804
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
10 changes: 3 additions & 7 deletions airflow_supervisor/tests/config/test_airflow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import UTC, datetime
from getpass import getuser
from pathlib import Path
from unittest.mock import patch

Expand All @@ -8,11 +8,9 @@
def test_airflow_inst():
with (
patch("supervisor_pydantic.config.supervisor.gettempdir") as p1,
patch("supervisor_pydantic.config.supervisor.datetime") as p2,
):
pth = Path(__file__).resolve().parent.parent.parent.parent / ".pytest_cache"
p1.return_value = str(pth)
p2.now.return_value = datetime(2000, 1, 1, 0, 0, 0, 1, tzinfo=UTC)
c = SupervisorAirflowConfiguration(
airflow=AirflowConfiguration(port="*:9001"),
program={
Expand All @@ -21,18 +19,16 @@ def test_airflow_inst():
)
},
)
assert str(c.working_dir) == str(pth / "supervisor-2000-01-01T00-00-00")
assert str(c.config_path) == str(pth / "supervisor-2000-01-01T00-00-00" / "supervisor.cfg")
assert str(c.working_dir) == str(pth / f"supervisor-{getuser()}-test")
assert str(c.config_path) == str(pth / f"supervisor-{getuser()}-test" / "supervisor.cfg")


def test_airflow_cfg_roundtrip_json():
with (
patch("supervisor_pydantic.config.supervisor.gettempdir") as p1,
patch("supervisor_pydantic.config.supervisor.datetime") as p2,
):
pth = Path(__file__).resolve().parent.parent.parent.parent / ".pytest_cache"
p1.return_value = str(pth)
p2.now.return_value = datetime(2000, 1, 1, 0, 0, 0, 1, tzinfo=UTC)
c = SupervisorAirflowConfiguration(
airflow=AirflowConfiguration(port="*:9001"),
program={
Expand Down
7 changes: 2 additions & 5 deletions airflow_supervisor/tests/hydra/test_hydra.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import UTC, datetime
from getpass import getuser
from pathlib import Path
from unittest.mock import patch

Expand All @@ -8,12 +8,9 @@
def test_hydra_config():
with (
patch("supervisor_pydantic.config.supervisor.gettempdir") as p1,
patch("supervisor_pydantic.config.supervisor.datetime") as p2,
):
pth = Path(__file__).resolve().parent.parent.parent.parent / ".pytest_cache"
p1.return_value = str(pth)
p2.now.return_value = datetime(2000, 1, 1, 0, 0, 0, 1, tzinfo=UTC)

cfg = load_airflow_config(
"config", overrides=["+program=[sleep,echo]", "+rpcinterface=standard", "+inet_http_server=local"]
)
Expand Down Expand Up @@ -54,6 +51,6 @@ def test_hydra_config():
[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface""".format(
dir=str(pth / "supervisor-2000-01-01T00-00-00")
dir=str(pth / f"supervisor-{getuser()}-sleep-echo")
)
)
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ classifiers = [
]

dependencies = [
"airflow-ha>=1.2,<1.3",
"airflow-ha>=1.2.2,<1.3",
"apache-airflow>=2.8,<3",
"airflow-common-operators>=0.2.0,<0.3",
"supervisor-pydantic>=1.1,<1.2",
"supervisor-pydantic>=1.2,<1.3",
]

[project.optional-dependencies]
Expand Down

0 comments on commit d155804

Please sign in to comment.