Skip to content

Commit

Permalink
Remove ghga-service-commons dep
Browse files Browse the repository at this point in the history
  • Loading branch information
TheByronHimes committed Nov 20, 2024
1 parent 98f227c commit a377e9b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion .pyproject_generation/pyproject_custom.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version = "3.0.0"
description = "The Notification Orchestration Service controls the creation of notification events."
dependencies = [
"typer >= 0.9.0",
"ghga-service-commons >= 3.1.4",
"ghga-event-schemas >= 3.3.0",
"hexkit[akafka,s3,mongodb] >= 3.7.0",
"pydantic[email]>=2, <3"
Expand Down
5 changes: 0 additions & 5 deletions lock/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,6 @@ ghga-event-schemas==3.3.1 \
--hash=sha256:6b21b45efd8a1a5dbbc3b671f3d23390b728dd19669ce39a7153acb5487f1256 \
--hash=sha256:845e72aa8045c52fbb42a215dcd95dd8436c841788b1d8edb80794584faab09a
# via nos (pyproject.toml)
ghga-service-commons==3.1.7 \
--hash=sha256:00d7c22638d456cd1d3caf450b18069ffeb8319db79e7c16f980a3f8b4998909 \
--hash=sha256:ff9c23ed48b97cc0db38df3e05e7243fb3132ce7fd75bf8b49fba92d4152c178
# via nos (pyproject.toml)
h11==0.14.0 \
--hash=sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d \
--hash=sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761
Expand Down Expand Up @@ -416,7 +412,6 @@ pydantic==2.9.2 \
# via
# nos (pyproject.toml)
# ghga-event-schemas
# ghga-service-commons
# hexkit
# pydantic-settings
pydantic-core==2.23.4 \
Expand Down
7 changes: 0 additions & 7 deletions lock/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ ghga-event-schemas==3.3.1 \
# via
# -c lock/requirements-dev.txt
# nos (pyproject.toml)
ghga-service-commons==3.1.7 \
--hash=sha256:00d7c22638d456cd1d3caf450b18069ffeb8319db79e7c16f980a3f8b4998909 \
--hash=sha256:ff9c23ed48b97cc0db38df3e05e7243fb3132ce7fd75bf8b49fba92d4152c178
# via
# -c lock/requirements-dev.txt
# nos (pyproject.toml)
hexkit==3.8.0 \
--hash=sha256:2a6d695350fba8306bf41df669c15586042bfecd55bb8c002c60ec16652b8213 \
--hash=sha256:d65d360fa3e4b8d0ff211c32e7ca76f68c0b5fef21b1dbc3fcf8cdb0080bfa5b
Expand Down Expand Up @@ -160,7 +154,6 @@ pydantic==2.9.2 \
# -c lock/requirements-dev.txt
# nos (pyproject.toml)
# ghga-event-schemas
# ghga-service-commons
# hexkit
# pydantic-settings
pydantic-core==2.23.4 \
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ version = "3.0.0"
description = "The Notification Orchestration Service controls the creation of notification events."
dependencies = [
"typer >= 0.9.0",
"ghga-service-commons >= 3.1.4",
"ghga-event-schemas >= 3.3.0",
"hexkit[akafka,s3,mongodb] >= 3.7.0",
"pydantic[email]>=2, <3",
Expand Down
9 changes: 2 additions & 7 deletions src/nos/inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
"""Module hosting the dependency injection framework."""

from collections.abc import AsyncGenerator
from contextlib import asynccontextmanager
from contextlib import asynccontextmanager, nullcontext

from ghga_service_commons.utils.context import asyncnullcontext
from hexkit.providers.akafka import (
KafkaEventPublisher,
KafkaEventSubscriber,
Expand Down Expand Up @@ -65,11 +64,7 @@ def prepare_core_with_override(
core_override: OrchestratorPort | None = None,
):
"""Resolve the prepare_core context manager based on config and override (if any)."""
return (
asyncnullcontext(core_override)
if core_override
else prepare_core(config=config)
)
return nullcontext(core_override) if core_override else prepare_core(config=config)


@asynccontextmanager
Expand Down

0 comments on commit a377e9b

Please sign in to comment.