Skip to content

Commit

Permalink
Rename package
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
shenanigansd authored Mar 3, 2024
1 parent 5142e9e commit 32c9542
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ COPY --from=builder /app/__pypackages__/3.11/lib pkgs/

COPY src/ src/

CMD ["python", "-m", "uvicorn", "dragonfly_reporter.app:app", "--host", "0.0.0.0"]
CMD ["python", "-m", "uvicorn", "reporter.app:app", "--host", "0.0.0.0"]

EXPOSE 8000
5 changes: 0 additions & 5 deletions src/dragonfly_reporter/__main__.py

This file was deleted.

File renamed without changes.
5 changes: 5 additions & 0 deletions src/reporter/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import uvicorn

from reporter.app import app

uvicorn.run(app)
6 changes: 3 additions & 3 deletions src/dragonfly_reporter/app.py → src/reporter/app.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from fastapi import FastAPI

from dragonfly_reporter.http_client import HTTPClientDependency
from dragonfly_reporter.models import Observation
from dragonfly_reporter.observations import send_observation
from reporter.http_client import HTTPClientDependency
from reporter.models import Observation
from reporter.observations import send_observation

app = FastAPI()

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from azure.identity.aio import ClientSecretCredential
from msgraph import GraphServiceClient

from dragonfly_reporter.constants import Microsoft
from reporter.constants import Microsoft


def build_graph_client() -> GraphServiceClient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import httpx
from fastapi import Depends

from dragonfly_reporter.constants import PyPI
from reporter.constants import PyPI


class BearerAuthentication(httpx.Auth):
Expand Down
4 changes: 2 additions & 2 deletions src/dragonfly_reporter/mailer.py → src/reporter/mailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
SendMailPostRequestBody,
)

from dragonfly_reporter.constants import Mail
from reporter.constants import Mail

logger = getLogger(__name__)

Expand Down Expand Up @@ -53,5 +53,5 @@ async def send_mail(
if attachments is not None:
message.attachments = attachments

request_body = SendMailPostRequestBody(message=message)
request_body = SendMailPostRequestBody(message=message)
await graph_client.users.by_user_id(Mail.sender).send_mail.post(request_body)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import httpx
from fastapi.encoders import jsonable_encoder

from dragonfly_reporter.models import Observation
from reporter.models import Observation


async def send_observation(
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import httpx
import pytest

from dragonfly_reporter.app import app
from dragonfly_reporter.http_client import http_client
from reporter.app import app
from reporter.http_client import http_client


@pytest.fixture(scope="session")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from fastapi.testclient import TestClient

from dragonfly_reporter.app import app
from reporter.app import app

test_client = TestClient(app)

Expand Down

0 comments on commit 32c9542

Please sign in to comment.