Skip to content

Commit

Permalink
♻️ Maintenance: removes legacy app-config fixture tests from web-serv…
Browse files Browse the repository at this point in the history
…er (#7022)
  • Loading branch information
pcrespov authored Jan 10, 2025
1 parent 8bda78f commit 85c3281
Show file tree
Hide file tree
Showing 81 changed files with 487 additions and 1,183 deletions.
6 changes: 3 additions & 3 deletions .env-devel
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,10 @@ SIMCORE_VCS_RELEASE_TAG=latest
STUDIES_ACCESS_ANONYMOUS_ALLOWED=0
STUDIES_DEFAULT_SERVICE_THUMBNAIL=https://via.placeholder.com/170x120.png
TRACING_OPENTELEMETRY_COLLECTOR_BATCH_SIZE=2
TRACING_OPENTELEMETRY_COLLECTOR_PORT=4318
TRACING_OPENTELEMETRY_COLLECTOR_ENDPOINT=http://opentelemetry-collector
TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE=100
TRACING_OPENTELEMETRY_COLLECTOR_EXPORTER_ENDPOINT=http://jaeger:4318
TRACING_OPENTELEMETRY_COLLECTOR_PORT=4318
TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE=100
TRAEFIK_SIMCORE_ZONE=internal_simcore_stack
TWILIO_ACCOUNT_SID=DUMMY
TWILIO_AUTH_TOKEN=DUMMY
Expand All @@ -365,8 +365,8 @@ WEBSERVER_DEV_FEATURES_ENABLED=0
WEBSERVER_DIAGNOSTICS={}
WEBSERVER_EMAIL={}
WEBSERVER_EXPORTER={}
WEBSERVER_FRONTEND={}
WEBSERVER_FOLDERS=1
WEBSERVER_FRONTEND={}
WEBSERVER_GARBAGE_COLLECTOR=null
WEBSERVER_GROUPS=1
WEBSERVER_GUNICORN_CMD_ARGS=--timeout=180
Expand Down
2 changes: 1 addition & 1 deletion api/specs/web-server/_projects_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from models_library.rest_pagination import Page
from pydantic import BaseModel
from simcore_service_webserver._meta import API_VTAG
from simcore_service_webserver.projects._common_models import ProjectPathParams
from simcore_service_webserver.projects._common.models import ProjectPathParams
from simcore_service_webserver.projects._crud_handlers import ProjectCreateParams
from simcore_service_webserver.projects._crud_handlers_models import (
ProjectActiveQueryParams,
Expand Down
2 changes: 1 addition & 1 deletion api/specs/web-server/_projects_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from fastapi import APIRouter, Depends, status
from models_library.generics import Envelope
from simcore_service_webserver._meta import API_VTAG
from simcore_service_webserver.projects._common_models import ProjectPathParams
from simcore_service_webserver.projects._common.models import ProjectPathParams
from simcore_service_webserver.projects._groups_api import ProjectGroupGet
from simcore_service_webserver.projects._groups_handlers import (
_ProjectsGroupsBodyParams,
Expand Down
2 changes: 1 addition & 1 deletion api/specs/web-server/_projects_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from models_library.projects import ProjectID
from models_library.wallets import WalletID
from simcore_service_webserver._meta import API_VTAG
from simcore_service_webserver.projects._common_models import ProjectPathParams
from simcore_service_webserver.projects._common.models import ProjectPathParams

router = APIRouter(
prefix=f"/{API_VTAG}",
Expand Down
4 changes: 2 additions & 2 deletions services/web/server/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ commit_args = --no-verify
[tool:pytest]
addopts = --strict-markers
asyncio_mode = auto
markers =
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
acceptance_test: "marks tests as 'acceptance tests' i.e. does the system do what the user expects? Typically those are workflows."
testit: "marks test to run during development"
heavy_load: "mark tests that require large amount of data"

[mypy]
plugins =
plugins =
pydantic.mypy
sqlalchemy.ext.mypy.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,13 @@ class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings):
json_schema_extra={"auto_default_from_env": True},
description="director-v2 service client's plugin",
)

WEBSERVER_DYNAMIC_SCHEDULER: DynamicSchedulerSettings | None = Field(
json_schema_extra={"auto_default_from_env": True},
)

WEBSERVER_EMAIL: SMTPSettings | None = Field(
json_schema_extra={"auto_default_from_env": True}, description="email plugin"
json_schema_extra={"auto_default_from_env": True}
)
WEBSERVER_EXPORTER: ExporterSettings | None = Field(
json_schema_extra={"auto_default_from_env": True}, description="exporter plugin"
Expand Down Expand Up @@ -204,9 +209,8 @@ class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings):
description="payments plugin settings",
)

WEBSERVER_DYNAMIC_SCHEDULER: DynamicSchedulerSettings | None = Field(
description="dynamic-scheduler plugin settings",
json_schema_extra={"auto_default_from_env": True},
WEBSERVER_PROJECTS: ProjectsSettings | None = Field(
json_schema_extra={"auto_default_from_env": True}
)

WEBSERVER_REDIS: RedisSettings | None = Field(
Expand Down Expand Up @@ -254,15 +258,19 @@ class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings):
description="tracing plugin", json_schema_extra={"auto_default_from_env": True}
)

WEBSERVER_PROJECTS: ProjectsSettings | None = Field(
description="projects plugin", json_schema_extra={"auto_default_from_env": True}
)
WEBSERVER_RABBITMQ: RabbitSettings | None = Field(
description="rabbitmq plugin", json_schema_extra={"auto_default_from_env": True}
)
WEBSERVER_USERS: UsersSettings | None = Field(
description="users plugin", json_schema_extra={"auto_default_from_env": True}
)
WEBSERVER_RABBITMQ: Annotated[
RabbitSettings | None,
Field(
json_schema_extra={"auto_default_from_env": True},
),
]

WEBSERVER_USERS: Annotated[
UsersSettings | None,
Field(
json_schema_extra={"auto_default_from_env": True},
),
]

# These plugins only require (for the moment) an entry to toggle between enabled/disabled
WEBSERVER_ANNOUNCEMENTS: bool = False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from ..security.decorators import permission_required
from ..utils_aiohttp import envelope_json_response
from . import _comments_api, projects_api
from ._common_models import RequestContext
from ._common.models import RequestContext
from .exceptions import ProjectInvalidRightsError, ProjectNotFoundError

_logger = logging.getLogger(__name__)
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from models_library.projects import ProjectID
from pydantic import BaseModel, ConfigDict, Field

from ..models import RequestContext
from ...models import RequestContext

assert RequestContext.__name__ # nosec

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from ..users.api import get_user_fullname
from ..workspaces.errors import WorkspaceAccessForbiddenError, WorkspaceNotFoundError
from . import _crud_api_create, _crud_api_read, projects_api
from ._common_models import ProjectPathParams, RequestContext
from ._common.models import ProjectPathParams, RequestContext
from ._crud_handlers_models import (
ProjectActiveQueryParams,
ProjectCreateHeaders,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from models_library.folders import FolderID
from models_library.projects import ProjectID
from models_library.utils.common_validators import null_or_none_str_to_none_validator
from pydantic import ConfigDict, BaseModel, field_validator
from pydantic import BaseModel, ConfigDict, field_validator
from servicelib.aiohttp import status
from servicelib.aiohttp.requests_validation import parse_request_path_parameters_as
from servicelib.aiohttp.typing_extension import Handler
Expand All @@ -14,7 +14,7 @@
from ..login.decorators import login_required
from ..security.decorators import permission_required
from . import _folders_api
from ._common_models import RequestContext
from ._common.models import RequestContext
from .exceptions import ProjectGroupNotFoundError, ProjectNotFoundError

_logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -44,9 +44,9 @@ class _ProjectsFoldersPathParams(BaseModel):
model_config = ConfigDict(extra="forbid")

# validators
_null_or_none_str_to_none_validator = field_validator(
"folder_id", mode="before"
)(null_or_none_str_to_none_validator)
_null_or_none_str_to_none_validator = field_validator("folder_id", mode="before")(
null_or_none_str_to_none_validator
)


@routes.put(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ..security.decorators import permission_required
from ..utils_aiohttp import envelope_json_response
from . import _groups_api
from ._common_models import ProjectPathParams, RequestContext
from ._common.models import ProjectPathParams, RequestContext
from ._groups_api import ProjectGroupGet
from .exceptions import ProjectGroupNotFoundError, ProjectNotFoundError

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from ..security.decorators import permission_required
from ..utils_aiohttp import envelope_json_response
from . import _metadata_api
from ._common_models import ProjectPathParams, RequestContext
from ._common.models import ProjectPathParams, RequestContext
from .exceptions import (
NodeNotFoundError,
ParentNodeNotFoundError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
from ..utils_aiohttp import envelope_json_response
from ..wallets.errors import WalletAccessForbiddenError, WalletNotEnoughCreditsError
from . import nodes_utils, projects_api
from ._common_models import ProjectPathParams, RequestContext
from ._common.models import ProjectPathParams, RequestContext
from ._nodes_api import NodeScreenshot, get_node_screenshots
from .exceptions import (
ClustersKeeperNotAvailableError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from ..projects._access_rights_api import check_user_project_permission
from ..security.decorators import permission_required
from . import _ports_api, projects_api
from ._common_models import ProjectPathParams, RequestContext
from ._common.models import ProjectPathParams, RequestContext
from .db import ProjectDBAPI
from .exceptions import (
NodeNotFoundError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ..security.decorators import permission_required
from ..utils_aiohttp import envelope_json_response
from . import projects_api
from ._common_models import RequestContext
from ._common.models import RequestContext
from ._nodes_handlers import NodePathParams
from .db import ProjectDBAPI
from .exceptions import ProjectInvalidRightsError, ProjectNotFoundError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from ..utils_aiohttp import envelope_json_response
from ..wallets.errors import WalletNotEnoughCreditsError
from . import projects_api
from ._common_models import ProjectPathParams, RequestContext
from ._common.models import ProjectPathParams, RequestContext
from .exceptions import (
DefaultPricingUnitNotFoundError,
ProjectInvalidRightsError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
)
from ..login.decorators import get_user_id, login_required
from ..products.api import get_product_name
from ..projects._common_models import ProjectPathParams
from ..security.decorators import permission_required
from . import _trash_api
from ._common_models import RemoveQueryParams
from ._common.models import ProjectPathParams, RemoveQueryParams
from .exceptions import ProjectRunningConflictError, ProjectStoppingError

_logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from ..wallets.errors import WalletAccessForbiddenError
from . import _wallets_api as wallets_api
from . import projects_api
from ._common_models import ProjectPathParams, RequestContext
from ._common.models import ProjectPathParams, RequestContext
from .exceptions import ProjectInvalidRightsError, ProjectNotFoundError

_logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from ..security.decorators import permission_required
from ..workspaces.errors import WorkspaceAccessForbiddenError, WorkspaceNotFoundError
from . import _workspaces_api
from ._common_models import RequestContext
from ._common.models import RequestContext
from .exceptions import ProjectInvalidRightsError, ProjectNotFoundError

_logger = logging.getLogger(__name__)
Expand Down
Loading

0 comments on commit 85c3281

Please sign in to comment.