Rename the import package app to fluksio
A wheel whose top-level module is `app` collides with anything else in a user's venv, so the package that is about to be published takes the name it is published under. Only the Python package moves; the repo, the Docker WORKDIR and the compose project keep theirs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,8 @@ from typing import Any
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.core.config import settings
|
||||
from app.flow.alerts import AlertsConfig, Channel
|
||||
from fluksio.core.config import settings
|
||||
from fluksio.flow.alerts import AlertsConfig, Channel
|
||||
|
||||
PREFIX = f"{settings.API_V1_STR}/alerts"
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ from fastapi.testclient import TestClient
|
||||
from sqlalchemy import func
|
||||
from sqlmodel import Session, select
|
||||
|
||||
from app.core.config import settings
|
||||
from app.models import Run, RunArtifact, RunMetric, RunNode
|
||||
from fluksio.core.config import settings
|
||||
from fluksio.models import Run, RunArtifact, RunMetric, RunNode
|
||||
|
||||
PREFIX = f"{settings.API_V1_STR}/flows"
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ from fastapi.testclient import TestClient
|
||||
from pwdlib.hashers.bcrypt import BcryptHasher
|
||||
from sqlmodel import Session
|
||||
|
||||
from app.core.config import settings
|
||||
from app.core.security import get_password_hash, verify_password
|
||||
from app.crud import create_user
|
||||
from app.models import User, UserCreate
|
||||
from app.utils import generate_password_reset_token
|
||||
from fluksio.core.config import settings
|
||||
from fluksio.core.security import get_password_hash, verify_password
|
||||
from fluksio.crud import create_user
|
||||
from fluksio.models import User, UserCreate
|
||||
from fluksio.utils import generate_password_reset_token
|
||||
from tests.utils.user import user_authentication_headers
|
||||
from tests.utils.utils import random_email, random_lower_string
|
||||
|
||||
@@ -50,8 +50,8 @@ def test_recovery_password(
|
||||
client: TestClient, normal_user_token_headers: dict[str, str]
|
||||
) -> None:
|
||||
with (
|
||||
patch("app.core.config.settings.SMTP_HOST", "smtp.example.com"),
|
||||
patch("app.core.config.settings.SMTP_USER", "admin@example.com"),
|
||||
patch("fluksio.core.config.settings.SMTP_HOST", "smtp.example.com"),
|
||||
patch("fluksio.core.config.settings.SMTP_USER", "admin@example.com"),
|
||||
):
|
||||
email = "test@example.com"
|
||||
r = client.post(
|
||||
|
||||
@@ -8,7 +8,7 @@ from urllib.parse import parse_qs, urlparse
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.core.config import settings
|
||||
from fluksio.core.config import settings
|
||||
|
||||
PREFIX = f"{settings.API_V1_STR}/oauth"
|
||||
REDIRECT = "http://127.0.0.1:41234/callback"
|
||||
|
||||
@@ -3,8 +3,8 @@ from datetime import datetime, timedelta, timezone
|
||||
from fastapi.testclient import TestClient
|
||||
from sqlmodel import Session
|
||||
|
||||
from app.core.config import settings
|
||||
from app.models import EngineEvent, FlowRun, MetricBucket
|
||||
from fluksio.core.config import settings
|
||||
from fluksio.models import EngineEvent, FlowRun, MetricBucket
|
||||
|
||||
PREFIX = f"{settings.API_V1_STR}/observability"
|
||||
FLOW = "observability-test"
|
||||
@@ -90,7 +90,7 @@ def test_a_flow_that_cannot_run_makes_the_summary_degraded(
|
||||
knows is what this reports — and reporting it is the whole point: a flow
|
||||
with a dependency loop cannot run, and the screen used to say "ok".
|
||||
"""
|
||||
from app.flow.pipeline import ValidationIssue
|
||||
from fluksio.flow.pipeline import ValidationIssue
|
||||
|
||||
controller = client.app.state.flow_controller
|
||||
before = controller.issues
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.cloud import config as cloud_config
|
||||
from app.core.config import settings
|
||||
from fluksio.cloud import config as cloud_config
|
||||
from fluksio.core.config import settings
|
||||
|
||||
PREFIX = f"{settings.API_V1_STR}/panels"
|
||||
DASHBOARDS = f"{settings.API_V1_STR}/dashboards"
|
||||
@@ -276,7 +276,7 @@ def test_a_remote_device_is_paired_at_the_portal(
|
||||
"""
|
||||
import httpx
|
||||
|
||||
from app.api.routes import panels as panels_route
|
||||
from fluksio.api.routes import panels as panels_route
|
||||
|
||||
calls: list[dict[str, object]] = []
|
||||
|
||||
@@ -378,7 +378,7 @@ def test_a_panels_socket_carries_only_what_it_draws(
|
||||
applied to what goes out: no node status, no logs, no shape of the graph,
|
||||
and no value belonging to a dashboard this panel does not show.
|
||||
"""
|
||||
from app.api.routes.flows import (
|
||||
from fluksio.api.routes.flows import (
|
||||
event_for_panel,
|
||||
panel_scope,
|
||||
snapshot_payload,
|
||||
|
||||
@@ -2,8 +2,8 @@ import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
from sqlmodel import Session, select
|
||||
|
||||
from app.core.config import settings
|
||||
from app.models import User
|
||||
from fluksio.core.config import settings
|
||||
from fluksio.models import User
|
||||
|
||||
|
||||
def test_create_user(client: TestClient, db: Session) -> None:
|
||||
|
||||
@@ -10,8 +10,8 @@ from datetime import timedelta
|
||||
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from app.core import security
|
||||
from app.core.config import settings
|
||||
from fluksio.core import security
|
||||
from fluksio.core.config import settings
|
||||
|
||||
PROTECTED = [
|
||||
f"{settings.API_V1_STR}/users/me",
|
||||
|
||||
@@ -4,10 +4,10 @@ from unittest.mock import patch
|
||||
from fastapi.testclient import TestClient
|
||||
from sqlmodel import Session, select
|
||||
|
||||
from app import crud
|
||||
from app.core.config import settings
|
||||
from app.core.security import verify_password
|
||||
from app.models import User, UserCreate
|
||||
from fluksio import crud
|
||||
from fluksio.core.config import settings
|
||||
from fluksio.core.security import verify_password
|
||||
from fluksio.models import User, UserCreate
|
||||
from tests.utils.user import create_random_user
|
||||
from tests.utils.utils import random_email, random_lower_string
|
||||
|
||||
@@ -38,9 +38,9 @@ def test_create_user_new_email(
|
||||
client: TestClient, superuser_token_headers: dict[str, str], db: Session
|
||||
) -> None:
|
||||
with (
|
||||
patch("app.utils.send_email", return_value=None),
|
||||
patch("app.core.config.settings.SMTP_HOST", "smtp.example.com"),
|
||||
patch("app.core.config.settings.SMTP_USER", "admin@example.com"),
|
||||
patch("fluksio.utils.send_email", return_value=None),
|
||||
patch("fluksio.core.config.settings.SMTP_HOST", "smtp.example.com"),
|
||||
patch("fluksio.core.config.settings.SMTP_USER", "admin@example.com"),
|
||||
):
|
||||
username = random_email()
|
||||
password = random_lower_string()
|
||||
|
||||
Reference in New Issue
Block a user