diff --git a/.env.docker b/.env.docker index 285ee82e..8ded2a0d 100644 --- a/.env.docker +++ b/.env.docker @@ -32,10 +32,10 @@ SYNCMASTER__AUTH__KEYCLOAK__CLIENT_SECRET=generated_by_keycloak SYNCMASTER__AUTH__KEYCLOAK__REDIRECT_URI=http://localhost:8000/auth/callback SYNCMASTER__AUTH__KEYCLOAK__SCOPE=email SYNCMASTER__AUTH__KEYCLOAK__VERIFY_SSL=False -SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.keycloak_provider.KeycloakAuthProvider +SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.keycloak_provider.KeycloakAuthProvider # Dummy Auth -SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.dummy_provider.DummyAuthProvider +SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.dummy_provider.DummyAuthProvider SYNCMASTER__AUTH__ACCESS_TOKEN__SECRET_KEY=secret # S3 diff --git a/.env.local b/.env.local index a4222cf4..b710dca2 100644 --- a/.env.local +++ b/.env.local @@ -32,10 +32,10 @@ export SYNCMASTER__AUTH__KEYCLOAK__CLIENT_SECRET=generated_by_keycloak export SYNCMASTER__AUTH__KEYCLOAK__REDIRECT_URI=http://localhost:8000/auth/callback export SYNCMASTER__AUTH__KEYCLOAK__SCOPE=email export SYNCMASTER__AUTH__KEYCLOAK__VERIFY_SSL=False -export SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.keycloak_provider.KeycloakAuthProvider +export SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.keycloak_provider.KeycloakAuthProvider # Dummy Auth -export SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.dummy_provider.DummyAuthProvider +export SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.dummy_provider.DummyAuthProvider export SYNCMASTER__AUTH__ACCESS_TOKEN__SECRET_KEY=secret export TEST_S3_HOST_FOR_CONFTEST=localhost diff --git a/.github/labels.yml b/.github/labels.yml index e68f7bde..6babbbb0 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -14,8 +14,8 @@ description: Add this label to skip changelog file check color: 04990f - - name: component:backend - description: Backend-related changes + - name: component:server + description: Server-related changes color: '5319e7' - name: component:worker diff --git a/.github/workflows/backend_docker_image.yml b/.github/workflows/backend_docker_image.yml index 9a86aa82..b1d7f42c 100644 --- a/.github/workflows/backend_docker_image.yml +++ b/.github/workflows/backend_docker_image.yml @@ -1,4 +1,4 @@ -name: Backend docker image +name: Server docker image on: push: @@ -14,7 +14,7 @@ concurrency: jobs: release: - name: Build & push backend image to Dockerhub + name: Build & push server image to Dockerhub runs-on: ubuntu-latest if: github.repository == 'MobileTeleSystems/syncmaster' # prevent running on forks @@ -38,22 +38,22 @@ jobs: id: set_tag run: | if [[ "${{ github.ref_type }}" == "branch" && "${{ github.ref_name }}" == "develop" ]]; then - echo "TAG=mtsrus/syncmaster-backend:develop" >> $GITHUB_ENV + echo "TAG=mtsrus/syncmaster-server:develop" >> $GITHUB_ENV elif [[ "${{ github.ref_type }}" == "tag" ]]; then - echo "TAG=mtsrus/syncmaster-backend:latest,mtsrus/syncmaster-backend:${{ github.ref_name }}" >> $GITHUB_ENV + echo "TAG=mtsrus/syncmaster-server:latest,mtsrus/syncmaster-server:${{ github.ref_name }}" >> $GITHUB_ENV fi - - name: Build Backend image + - name: Build Server image uses: docker/build-push-action@v6 with: tags: ${{ env.TAG }} context: . target: prod - file: docker/Dockerfile.backend + file: docker/Dockerfile.server pull: true push: true cache-to: type=inline - cache-from: mtsrus/syncmaster-backend:develop + cache-from: mtsrus/syncmaster-server:develop platforms: | linux/amd64 linux/arm64/v8 @@ -76,6 +76,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} # this requires token with read+write+delete permissions. read+write is not enough! password: ${{ secrets.DOCKERHUB_TOKEN }} - repository: mtsrus/syncmaster-backend + repository: mtsrus/syncmaster-server short-description: ${{ github.event.repository.description }} enable-url-completion: true diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 636615bc..93014300 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -60,7 +60,7 @@ jobs: run: poetry run flake8 syncmaster/ - name: Run mypy - run: poetry run mypy --config-file ./pyproject.toml ./syncmaster/backend + run: poetry run mypy --config-file ./pyproject.toml ./syncmaster/server codeql: name: CodeQL diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 51172041..cf87eddb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -58,7 +58,7 @@ jobs: - name: Generate OpenAPI Schema run: | source .env.local - poetry run python -m syncmaster.backend.scripts.export_openapi_schema openapi.json + poetry run python -m syncmaster.server.scripts.export_openapi_schema openapi.json - name: Fix logo in Readme run: | diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 292138c9..cd580a5c 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -56,7 +56,7 @@ jobs: run: | source .env.local poetry run python -m syncmaster.db.migrations upgrade head - poetry run coverage run -m pytest -vvv -s -m "backend or scheduler" + poetry run coverage run -m pytest -vvv -s -m "server or scheduler" - name: Shutdown if: always() diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09044194..ccad6feb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,16 +39,16 @@ repos: - id: chmod args: ['644'] exclude_types: [shell] - exclude: ^(.*__main__\.py|syncmaster/backend/scripts/export_openapi_schema\.py)$ + exclude: ^(.*__main__\.py|syncmaster/server/scripts/export_openapi_schema\.py)$ - id: chmod args: ['755'] types: [shell] - id: chmod args: ['755'] - files: ^(.*__main__\.py|syncmaster/backend/scripts/export_openapi_schema\.py)$ + files: ^(.*__main__\.py|syncmaster/server/scripts/export_openapi_schema\.py)$ - id: insert-license files: .*\.py$ - exclude: ^(syncmaster/backend/dependencies/stub.py|docs/.*\.py|tests/.*\.py)$ + exclude: ^(syncmaster/server/dependencies/stub.py|docs/.*\.py|tests/.*\.py)$ args: - --license-filepath - .spdx-license-header.txt @@ -109,7 +109,7 @@ repos: - id: mypy name: mypy - entry: mypy ./syncmaster/backend --config-file ./pyproject.toml + entry: mypy ./syncmaster/server --config-file ./pyproject.toml language: python require_serial: true pass_filenames: false diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 1fc1c578..9eb850aa 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -54,7 +54,7 @@ It allows to keep development environment the same for all developers due to usi There are *extra* dependencies (included into package as optional): -* ``backend`` - for running backend +* ``server`` - for running server * ``worker`` - for running Celery workers And *groups* (not included into package, used locally and in CI): @@ -330,7 +330,7 @@ Examples for adding changelog entries to your Pull Requests .. code-block:: rst :caption: docs/changelog/next_release/2345.bugfix.rst - Fixed behavior of ``backend`` -- by :github:user:`someuser` + Fixed behavior of ``server`` -- by :github:user:`someuser` .. code-block:: rst :caption: docs/changelog/next_release/3456.feature.rst diff --git a/Makefile b/Makefile index 924021fe..72990992 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ test-cleanup: ##@Test Cleanup tests dependencies dev-server: db-start ##@Application Run development server (without docker) - ${POETRY} run python -m syncmaster.backend $(ARGS) + ${POETRY} run python -m syncmaster.server $(ARGS) dev-worker: db-start broker-start ##@Application Run development broker (without docker) ${POETRY} run python -m celery -A syncmaster.worker.celery worker --max-tasks-per-child=1 $(ARGS) @@ -130,7 +130,7 @@ dev-worker: db-start broker-start ##@Application Run development broker (without prod-build-server: ##@Application Build docker image for server - docker build --progress=plain -t mtsrus/syncmaster-backend:develop -f ./docker/Dockerfile.backend --target=prod $(ARGS) . + docker build --progress=plain -t mtsrus/syncmaster-server:develop -f ./docker/Dockerfile.server --target=prod $(ARGS) . prod-build-scheduler: ##@Application Build docker image for scheduler docker build --progress=plain -t mtsrus/syncmaster-scheduler:develop -f ./docker/Dockerfile.scheduler --target=prod $(ARGS) . @@ -164,4 +164,4 @@ docs-cleanup: ##@Docs Cleanup docs docs-fresh: docs-cleanup docs-build ##@Docs Cleanup & build docs openapi: ##@Docs Generate OpenAPI schema - python -m syncmaster.backend.scripts.export_openapi_schema docs/_static/openapi.json \ No newline at end of file + python -m syncmaster.server.scripts.export_openapi_schema docs/_static/openapi.json \ No newline at end of file diff --git a/README.rst b/README.rst index 3cca2cfe..a13219da 100644 --- a/README.rst +++ b/README.rst @@ -14,8 +14,8 @@ Data.SyncMaster :target: https://github.com/MobileTeleSystems/syncmaster/blob/develop/LICENSE.txt .. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/data-syncmaster.svg :target: https://badge.fury.io/py/data-syncmaster -.. |Docker image| image:: https://img.shields.io/docker/v/mtsrus/syncmaster-backend?sort=semver&label=docker - :target: https://hub.docker.com/r/mtsrus/syncmaster-backend +.. |Docker image| image:: https://img.shields.io/docker/v/mtsrus/syncmaster-server?sort=semver&label=docker + :target: https://hub.docker.com/r/mtsrus/syncmaster-server .. |Documentation| image:: https://readthedocs.org/projects/syncmaster/badge/?version=stable :target: https://syncmaster.readthedocs.io .. |Build Status| image:: https://github.com/MobileTeleSystems/syncmaster/workflows/Run%20All%20Tests/badge.svg diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 9cec1d81..41553952 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -28,7 +28,7 @@ services: timeout: 5s retries: 3 - # Using worker image here to skip building backend image build in CI. + # Using worker image here to skip building server image build in CI. # Worker test image already has all neccessary dependencies migrations: image: mtsrus/syncmaster-worker:${WORKER_IMAGE_TAG:-test} @@ -46,11 +46,11 @@ services: db: condition: service_healthy - backend: - image: mtsrus/syncmaster-backend:${BACKEND_IMAGE_TAG:-test} + server: + image: mtsrus/syncmaster-server:${SERVER_IMAGE_TAG:-test} restart: unless-stopped build: - dockerfile: docker/Dockerfile.backend + dockerfile: docker/Dockerfile.server context: . target: test env_file: .env.docker @@ -75,7 +75,7 @@ services: timeout: 5s retries: 3 start_period: 5s - profiles: [backend, all] + profiles: [server, all] scheduler: image: mtsrus/syncmaster-scheduler:${SCHEDULER_IMAGE_TAG:-test} diff --git a/docker-compose.yml b/docker-compose.yml index 0d03640c..f3bf1d16 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,10 +29,10 @@ services: retries: 3 migrations: - image: mtsrus/syncmaster-backend:${TAG:-develop} + image: mtsrus/syncmaster-server:${TAG:-develop} restart: no build: - dockerfile: docker/Dockerfile.backend + dockerfile: docker/Dockerfile.server context: . target: prod entrypoint: [python, -m, syncmaster.db.migrations, upgrade, head] @@ -41,11 +41,11 @@ services: db: condition: service_healthy - backend: - image: mtsrus/syncmaster-backend:${TAG:-develop} + server: + image: mtsrus/syncmaster-server:${TAG:-develop} restart: unless-stopped build: - dockerfile: docker/Dockerfile.backend + dockerfile: docker/Dockerfile.server context: . target: prod ports: diff --git a/docker/Dockerfile.scheduler b/docker/Dockerfile.scheduler index af91bfb7..afca1593 100644 --- a/docker/Dockerfile.scheduler +++ b/docker/Dockerfile.scheduler @@ -13,7 +13,7 @@ ENV PYTHONPATH=/app COPY ./pyproject.toml ./poetry.lock* /app/ RUN pip install --upgrade pip setuptools wheel packaging -RUN poetry install --no-root --extras "scheduler" --extras "backend" --without test,docs,dev +RUN poetry install --no-root --extras "scheduler" --extras "server" --without test,docs,dev COPY ./docker/entrypoint_scheduler.sh /app/entrypoint.sh ENTRYPOINT ["/app/entrypoint.sh"] diff --git a/docker/Dockerfile.backend b/docker/Dockerfile.server similarity index 71% rename from docker/Dockerfile.backend rename to docker/Dockerfile.server index 86856f11..6b64b2d9 100644 --- a/docker/Dockerfile.backend +++ b/docker/Dockerfile.server @@ -14,9 +14,9 @@ ENV PYTHONPATH=/app COPY ./pyproject.toml ./poetry.lock* /app/ RUN pip install --upgrade pip setuptools wheel packaging -RUN poetry install --no-root --extras "backend" --without test,docs,dev +RUN poetry install --no-root --extras "server" --without test,docs,dev -COPY ./docker/entrypoint_backend.sh /app/entrypoint.sh +COPY ./docker/entrypoint_server.sh /app/entrypoint.sh ENTRYPOINT ["/app/entrypoint.sh"] @@ -24,22 +24,22 @@ FROM base AS prod COPY ./syncmaster/ /app/syncmaster/ # add this when logo will be ready -# COPY ./docs/_static/*.svg ./syncmaster/backend/static/ +# COPY ./docs/_static/*.svg ./syncmaster/server/static/ # Swagger UI -ADD https://cdn.jsdelivr.net/npm/swagger-ui-dist@latest/swagger-ui-bundle.js /app/syncmaster/backend/static/swagger/swagger-ui-bundle.js -ADD https://cdn.jsdelivr.net/npm/swagger-ui-dist@latest/swagger-ui.css /app/syncmaster/backend/static/swagger/swagger-ui.css +ADD https://cdn.jsdelivr.net/npm/swagger-ui-dist@latest/swagger-ui-bundle.js /app/syncmaster/server/static/swagger/swagger-ui-bundle.js +ADD https://cdn.jsdelivr.net/npm/swagger-ui-dist@latest/swagger-ui.css /app/syncmaster/server/static/swagger/swagger-ui.css # Redoc -ADD https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js /app/syncmaster/backend/static/redoc/redoc.standalone.js +ADD https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js /app/syncmaster/server/static/redoc/redoc.standalone.js ENV SYNCMASTER__SERVER__OPENAPI__SWAGGER__JS_URL=/static/swagger/swagger-ui-bundle.js \ SYNCMASTER__SERVER__OPENAPI__SWAGGER__CSS_URL=/static/swagger/swagger-ui.css \ SYNCMASTER__SERVER__OPENAPI__REDOC__JS_URL=/static/redoc/redoc.standalone.js \ - SYNCMASTER__SERVER__STATIC_FILES__DIRECTORY=/app/syncmaster/backend/static + SYNCMASTER__SERVER__STATIC_FILES__DIRECTORY=/app/syncmaster/server/static FROM base AS test -RUN poetry install --no-root --extras "backend" --with test --without docs,dev +RUN poetry install --no-root --extras "server" --with test --without docs,dev RUN sed -i 's/python -m/coverage run -m/g' /app/entrypoint.sh diff --git a/docker/Dockerfile.worker b/docker/Dockerfile.worker index 7f2e6606..bbd0d8dd 100644 --- a/docker/Dockerfile.worker +++ b/docker/Dockerfile.worker @@ -37,7 +37,7 @@ ENTRYPOINT ["/app/entrypoint.sh"] CMD ["--loglevel=info"] -FROM base as prod +FROM base AS prod COPY ./syncmaster/ /app/syncmaster/ @@ -46,6 +46,6 @@ FROM base AS test ENV SYNCMASTER__WORKER__CREATE_SPARK_SESSION_FUNCTION=tests.spark.get_worker_spark_session -# CI runs tests in the worker container, so we need backend dependencies too +# CI runs tests in the worker container, so we need server dependencies too RUN poetry install --no-root --all-extras --with test --without docs,dev RUN sed -i 's/python -m/coverage run -m/g' /app/entrypoint.sh diff --git a/docker/entrypoint_backend.sh b/docker/entrypoint_server.sh old mode 100755 new mode 100644 similarity index 53% rename from docker/entrypoint_backend.sh rename to docker/entrypoint_server.sh index 00d75f3b..6033dc12 --- a/docker/entrypoint_backend.sh +++ b/docker/entrypoint_server.sh @@ -3,9 +3,9 @@ set -e if [[ "x${SYNCMASTER__ENTRYPOINT__SUPERUSERS}" != "x" ]]; then superusers=$(echo "${SYNCMASTER__ENTRYPOINT__SUPERUSERS}" | tr "," " ") - python -m syncmaster.backend.scripts.manage_superusers add ${superusers} - python -m syncmaster.backend.scripts.manage_superusers list + python -m syncmaster.server.scripts.manage_superusers add ${superusers} + python -m syncmaster.server.scripts.manage_superusers list fi # exec is required to forward all signals to the main process -exec python -m syncmaster.backend --host 0.0.0.0 --port 8000 "$@" +exec python -m syncmaster.server --host 0.0.0.0 --port 8000 "$@" diff --git a/docs/backend/auth/dummy.rst b/docs/backend/auth/dummy.rst deleted file mode 100644 index a991c0ac..00000000 --- a/docs/backend/auth/dummy.rst +++ /dev/null @@ -1,82 +0,0 @@ -.. _backend-auth-dummy: - -Dummy Auth provider -=================== - -Description ------------ - -This auth provider allows to sign-in with any username and password, and and then issues an access token. - -After successful auth, username is saved to backend database. It is then used for creating audit records for any object change, see ``changed_by`` field. - -Interaction schema ------------------- - -.. dropdown:: Interaction schema - - .. plantuml:: - - @startuml - title DummyAuthProvider - participant "Client" - participant "Backend" - - == POST v1/auth/token == - - activate "Client" - alt Successful case - "Client" -> "Backend" ++ : login + password - "Backend" --> "Backend" : Password is completely ignored - "Backend" --> "Backend" : Check user in internal backend database - "Backend" -> "Backend" : Create user if not exist - "Backend" -[#green]> "Client" -- : Generate and return access_token - - else User is blocked - "Client" -> "Backend" ++ : login + password - "Backend" --> "Backend" : Password is completely ignored - "Backend" --> "Backend" : Check user in internal backend database - "Backend" x-[#red]> "Client" -- : 401 Unauthorized - - else User is deleted - "Client" -> "Backend" ++ : login + password - "Backend" --> "Backend" : Password is completely ignored - "Backend" --> "Backend" : Check user in internal backend database - "Backend" x-[#red]> "Client" -- : 404 Not found - end - - == GET v1/namespaces == - - alt Successful case - "Client" -> "Backend" ++ : access_token - "Backend" --> "Backend" : Validate token - "Backend" --> "Backend" : Check user in internal backend database - "Backend" -> "Backend" : Get data - "Backend" -[#green]> "Client" -- : Return data - - else Token is expired - "Client" -> "Backend" ++ : access_token - "Backend" --> "Backend" : Validate token - "Backend" x-[#red]> "Client" -- : 401 Unauthorized - - else User is blocked - "Client" -> "Backend" ++ : access_token - "Backend" --> "Backend" : Validate token - "Backend" --> "Backend" : Check user in internal backend database - "Backend" x-[#red]> "Client" -- : 401 Unauthorized - - else User is deleted - "Client" -> "Backend" ++ : access_token - "Backend" --> "Backend" : Validate token - "Backend" --> "Backend" : Check user in internal backend database - "Backend" x-[#red]> "Client" -- : 404 Not found - end - - deactivate "Client" - @enduml - -Configuration -------------- - -.. autopydantic_model:: syncmaster.backend.settings.auth.dummy.DummyAuthProviderSettings -.. autopydantic_model:: syncmaster.backend.settings.auth.jwt.JWTSettings diff --git a/docs/backend/configuration/openapi.rst b/docs/backend/configuration/openapi.rst deleted file mode 100644 index 27620d89..00000000 --- a/docs/backend/configuration/openapi.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. _backend-configuration-server-openapi: - -OpenAPI settings -================ - -These settings used to control exposing OpenAPI.json and SwaggerUI/ReDoc endpoints. - -.. autopydantic_model:: syncmaster.backend.settings.server.openapi.OpenAPISettings -.. autopydantic_model:: syncmaster.backend.settings.server.openapi.SwaggerSettings -.. autopydantic_model:: syncmaster.backend.settings.server.openapi.RedocSettings -.. autopydantic_model:: syncmaster.backend.settings.server.openapi.LogoSettings -.. autopydantic_model:: syncmaster.backend.settings.server.openapi.FaviconSettings diff --git a/docs/backend/configuration/static_files.rst b/docs/backend/configuration/static_files.rst deleted file mode 100644 index 6628a962..00000000 --- a/docs/backend/configuration/static_files.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. _backend-configuration-server-static-files: - -Serving static files -==================== - -These settings used to control serving static files by a server. - -.. autopydantic_model:: syncmaster.backend.settings.server.static_files.StaticFilesSettings diff --git a/docs/index.rst b/docs/index.rst index 9308729b..74e22443 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,14 +11,14 @@ .. toctree:: :maxdepth: 2 - :caption: Backend + :caption: Server :hidden: - backend/install - backend/architecture - backend/auth/index - backend/configuration/index - backend/openapi + server/install + server/architecture + server/auth/index + server/configuration/index + server/openapi .. toctree:: diff --git a/docs/scheduler/start_scheduler.rst b/docs/scheduler/start_scheduler.rst index 84e198a4..264d6183 100644 --- a/docs/scheduler/start_scheduler.rst +++ b/docs/scheduler/start_scheduler.rst @@ -7,7 +7,7 @@ With docker Installation process ~~~~~~~~~~~~~~~~~~~~ -Docker will download worker image of syncmaster scheduler (same as backend image) & broker, and run them. +Docker will download worker image of syncmaster scheduler & broker, and run them. Options can be set via ``.env`` file or ``environment`` section in ``docker-compose.yml`` .. dropdown:: ``docker-compose.yml`` diff --git a/docs/backend/architecture.rst b/docs/server/architecture.rst similarity index 72% rename from docs/backend/architecture.rst rename to docs/server/architecture.rst index a6f26218..fc71104d 100644 --- a/docs/backend/architecture.rst +++ b/docs/server/architecture.rst @@ -1,4 +1,4 @@ -.. _backend-architecture: +.. _server-architecture: Architecture ============ diff --git a/docs/backend/auth/custom.rst b/docs/server/auth/custom.rst similarity index 68% rename from docs/backend/auth/custom.rst rename to docs/server/auth/custom.rst index 03490d6b..899a493c 100644 --- a/docs/backend/auth/custom.rst +++ b/docs/server/auth/custom.rst @@ -1,10 +1,10 @@ -.. _backend-auth-custom: +.. _server-auth-custom: Custom Auth provider ==================== You can implement custom auth provider by inheriting from class below and implementing necessary methods. -.. autoclass:: syncmaster.backend.providers.auth.AuthProvider +.. autoclass:: syncmaster.server.providers.auth.AuthProvider :members: :member-order: bysource diff --git a/docs/server/auth/dummy.rst b/docs/server/auth/dummy.rst new file mode 100644 index 00000000..29804c9d --- /dev/null +++ b/docs/server/auth/dummy.rst @@ -0,0 +1,82 @@ +.. _server-auth-dummy: + +Dummy Auth provider +=================== + +Description +----------- + +This auth provider allows to sign-in with any username and password, and and then issues an access token. + +After successful auth, username is saved to server database. It is then used for creating audit records for any object change, see ``changed_by`` field. + +Interaction schema +------------------ + +.. dropdown:: Interaction schema + + .. plantuml:: + + @startuml + title DummyAuthProvider + participant "Client" + participant "Server" + + == POST v1/auth/token == + + activate "Client" + alt Successful case + "Client" -> "Server" ++ : login + password + "Server" --> "Server" : Password is completely ignored + "Server" --> "Server" : Check user in internal server database + "Server" -> "Server" : Create user if not exist + "Server" -[#green]> "Client" -- : Generate and return access_token + + else User is blocked + "Client" -> "Server" ++ : login + password + "Server" --> "Server" : Password is completely ignored + "Server" --> "Server" : Check user in internal server database + "Server" x-[#red]> "Client" -- : 401 Unauthorized + + else User is deleted + "Client" -> "Server" ++ : login + password + "Server" --> "Server" : Password is completely ignored + "Server" --> "Server" : Check user in internal server database + "Server" x-[#red]> "Client" -- : 404 Not found + end + + == GET v1/namespaces == + + alt Successful case + "Client" -> "Server" ++ : access_token + "Server" --> "Server" : Validate token + "Server" --> "Server" : Check user in internal server database + "Server" -> "Server" : Get data + "Server" -[#green]> "Client" -- : Return data + + else Token is expired + "Client" -> "Server" ++ : access_token + "Server" --> "Server" : Validate token + "Server" x-[#red]> "Client" -- : 401 Unauthorized + + else User is blocked + "Client" -> "Server" ++ : access_token + "Server" --> "Server" : Validate token + "Server" --> "Server" : Check user in internal server database + "Server" x-[#red]> "Client" -- : 401 Unauthorized + + else User is deleted + "Client" -> "Server" ++ : access_token + "Server" --> "Server" : Validate token + "Server" --> "Server" : Check user in internal server database + "Server" x-[#red]> "Client" -- : 404 Not found + end + + deactivate "Client" + @enduml + +Configuration +------------- + +.. autopydantic_model:: syncmaster.server.settings.auth.dummy.DummyAuthProviderSettings +.. autopydantic_model:: syncmaster.server.settings.auth.jwt.JWTSettings diff --git a/docs/backend/auth/index.rst b/docs/server/auth/index.rst similarity index 75% rename from docs/backend/auth/index.rst rename to docs/server/auth/index.rst index 5ad6982f..b2b575ba 100644 --- a/docs/backend/auth/index.rst +++ b/docs/server/auth/index.rst @@ -1,11 +1,11 @@ -.. _backend-auth-providers: +.. _server-auth-providers: Auth Providers ============== Syncmaster supports different auth provider implementations. You can change implementation via settings: -.. autopydantic_model:: keycloak.backend.settings.auth.AuthSettings +.. autopydantic_model:: keycloak.server.settings.auth.AuthSettings .. toctree:: :maxdepth: 2 diff --git a/docs/backend/auth/keycloak/images/keycloak-client-authentication.png b/docs/server/auth/keycloak/images/keycloak-client-authentication.png similarity index 100% rename from docs/backend/auth/keycloak/images/keycloak-client-authentication.png rename to docs/server/auth/keycloak/images/keycloak-client-authentication.png diff --git a/docs/backend/auth/keycloak/images/keycloak-client-redirect_uri.png b/docs/server/auth/keycloak/images/keycloak-client-redirect_uri.png similarity index 100% rename from docs/backend/auth/keycloak/images/keycloak-client-redirect_uri.png rename to docs/server/auth/keycloak/images/keycloak-client-redirect_uri.png diff --git a/docs/backend/auth/keycloak/images/keycloak-client-secret.png b/docs/server/auth/keycloak/images/keycloak-client-secret.png similarity index 100% rename from docs/backend/auth/keycloak/images/keycloak-client-secret.png rename to docs/server/auth/keycloak/images/keycloak-client-secret.png diff --git a/docs/backend/auth/keycloak/images/keycloak-login.png b/docs/server/auth/keycloak/images/keycloak-login.png similarity index 100% rename from docs/backend/auth/keycloak/images/keycloak-login.png rename to docs/server/auth/keycloak/images/keycloak-login.png diff --git a/docs/backend/auth/keycloak/images/keycloak-new-client.png b/docs/server/auth/keycloak/images/keycloak-new-client.png similarity index 100% rename from docs/backend/auth/keycloak/images/keycloak-new-client.png rename to docs/server/auth/keycloak/images/keycloak-new-client.png diff --git a/docs/backend/auth/keycloak/images/keycloak-new-client_name.png b/docs/server/auth/keycloak/images/keycloak-new-client_name.png similarity index 100% rename from docs/backend/auth/keycloak/images/keycloak-new-client_name.png rename to docs/server/auth/keycloak/images/keycloak-new-client_name.png diff --git a/docs/backend/auth/keycloak/images/keycloak-new-realm.png b/docs/server/auth/keycloak/images/keycloak-new-realm.png similarity index 100% rename from docs/backend/auth/keycloak/images/keycloak-new-realm.png rename to docs/server/auth/keycloak/images/keycloak-new-realm.png diff --git a/docs/backend/auth/keycloak/images/keycloak-new-realm_name.png b/docs/server/auth/keycloak/images/keycloak-new-realm_name.png similarity index 100% rename from docs/backend/auth/keycloak/images/keycloak-new-realm_name.png rename to docs/server/auth/keycloak/images/keycloak-new-realm_name.png diff --git a/docs/backend/auth/keycloak/index.rst b/docs/server/auth/keycloak/index.rst similarity index 85% rename from docs/backend/auth/keycloak/index.rst rename to docs/server/auth/keycloak/index.rst index 436a6af3..3b8c8f38 100644 --- a/docs/backend/auth/keycloak/index.rst +++ b/docs/server/auth/keycloak/index.rst @@ -47,8 +47,8 @@ Interaction schema Syncmaster --> Client : Set JWT token in user's browser in cookies and redirect /v1/users Client --> Syncmaster : Redirect to /v1/users - Syncmaster -> Syncmaster : Get user info from JWT token and check user in internal backend database - Syncmaster -> Syncmaster : Create user in internal backend database if not exist + Syncmaster -> Syncmaster : Get user info from JWT token and check user in internal server database + Syncmaster -> Syncmaster : Create user in internal server database if not exist Syncmaster -[#green]> Client -- : Return requested data @@ -56,15 +56,15 @@ Interaction schema == GET v1/users == alt Successful case Client -> Syncmaster : Request data with JWT token - Syncmaster --> Syncmaster : Get user info from JWT token and check user in internal backend database - Syncmaster -> Syncmaster : Create user in internal backend database if not exist + Syncmaster --> Syncmaster : Get user info from JWT token and check user in internal server database + Syncmaster -> Syncmaster : Create user in internal server database if not exist Syncmaster -[#green]> Client -- : Return requested data else Access token is expired Syncmaster -> Keycloak : Get new JWT token via refresh token Keycloak --> Syncmaster : Return new JWT token - Syncmaster --> Syncmaster : Get user info from JWT token and check user in internal backend database - Syncmaster -> Syncmaster : Create user in internal backend database if not exist + Syncmaster --> Syncmaster : Get user info from JWT token and check user in internal server database + Syncmaster -> Syncmaster : Create user in internal server database if not exist Syncmaster -[#green]> Client -- : Return requested data and set new JWT token in user's browser in cookies else Refresh token is expired @@ -77,9 +77,9 @@ Interaction schema Basic configuration ------------------- -.. autopydantic_model:: syncmaster.backend.settings.auth.keycloak.KeycloakAuthProviderSettings -.. autopydantic_model:: syncmaster.backend.settings.auth.keycloak.KeycloakSettings -.. autopydantic_model:: syncmaster.backend.settings.auth.jwt.JWTSettings +.. autopydantic_model:: syncmaster.server.settings.auth.keycloak.KeycloakAuthProviderSettings +.. autopydantic_model:: syncmaster.server.settings.auth.keycloak.KeycloakSettings +.. autopydantic_model:: syncmaster.server.settings.auth.jwt.JWTSettings .. toctree:: :maxdepth: 1 diff --git a/docs/backend/auth/keycloak/local_installation.rst b/docs/server/auth/keycloak/local_installation.rst similarity index 97% rename from docs/backend/auth/keycloak/local_installation.rst rename to docs/server/auth/keycloak/local_installation.rst index 75533f2c..3d85a5c4 100644 --- a/docs/backend/auth/keycloak/local_installation.rst +++ b/docs/server/auth/keycloak/local_installation.rst @@ -118,4 +118,4 @@ After this you can user `KeycloakAuthProvider` in your application with provided $ export SYNCMASTER__AUTH__KEYCLOAK__CLIENT_SECRET=6x6gn8uJdWSBmP8FqbNRSoGdvaoaFeez $ export SYNCMASTER__AUTH__KEYCLOAK__SCOPE=email $ export SYNCMASTER__AUTH__KEYCLOAK__VERIFY_SSL=False - $ export SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.keycloak_provider.KeycloakAuthProvider + $ export SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.keycloak_provider.KeycloakAuthProvider diff --git a/docs/backend/configuration/broker.rst b/docs/server/configuration/broker.rst similarity index 100% rename from docs/backend/configuration/broker.rst rename to docs/server/configuration/broker.rst diff --git a/docs/backend/configuration/cors.rst b/docs/server/configuration/cors.rst similarity index 54% rename from docs/backend/configuration/cors.rst rename to docs/server/configuration/cors.rst index 6c4bd5cf..a14239b3 100644 --- a/docs/backend/configuration/cors.rst +++ b/docs/server/configuration/cors.rst @@ -1,8 +1,8 @@ -.. _backend-configuration-server-cors: +.. _server-configuration-cors: CORS settings ============= These settings used to control `CORS `_ options. -.. autopydantic_model:: syncmaster.backend.settings.server.cors.CORSSettings \ No newline at end of file +.. autopydantic_model:: syncmaster.server.settings.server.cors.CORSSettings \ No newline at end of file diff --git a/docs/backend/configuration/database.rst b/docs/server/configuration/database.rst similarity index 100% rename from docs/backend/configuration/database.rst rename to docs/server/configuration/database.rst diff --git a/docs/backend/configuration/index.rst b/docs/server/configuration/index.rst similarity index 61% rename from docs/backend/configuration/index.rst rename to docs/server/configuration/index.rst index 9256bcde..e5735321 100644 --- a/docs/backend/configuration/index.rst +++ b/docs/server/configuration/index.rst @@ -18,5 +18,5 @@ Configuration static_files openapi -.. autopydantic_settings:: syncmaster.backend.settings.ServerAppSettings -.. autopydantic_settings:: syncmaster.backend.settings.server.ServerSettings +.. autopydantic_settings:: syncmaster.server.settings.ServerAppSettings +.. autopydantic_settings:: syncmaster.server.settings.server.ServerSettings diff --git a/docs/backend/configuration/logging.rst b/docs/server/configuration/logging.rst similarity index 100% rename from docs/backend/configuration/logging.rst rename to docs/server/configuration/logging.rst diff --git a/docs/backend/configuration/monitoring.rst b/docs/server/configuration/monitoring.rst similarity index 74% rename from docs/backend/configuration/monitoring.rst rename to docs/server/configuration/monitoring.rst index c2b8273e..63ca10b7 100644 --- a/docs/backend/configuration/monitoring.rst +++ b/docs/server/configuration/monitoring.rst @@ -1,4 +1,4 @@ -.. _backend-configuration-server-monitoring: +.. _server-configuration-monitoring: Server monitoring ================= @@ -13,4 +13,4 @@ REST API server provides the following endpoints with Prometheus compatible metr These endpoints are enabled and configured using settings below: -.. autopydantic_model:: syncmaster.backend.settings.server.monitoring.MonitoringSettings +.. autopydantic_model:: syncmaster.server.settings.server.monitoring.MonitoringSettings diff --git a/docs/server/configuration/openapi.rst b/docs/server/configuration/openapi.rst new file mode 100644 index 00000000..d4c235a9 --- /dev/null +++ b/docs/server/configuration/openapi.rst @@ -0,0 +1,12 @@ +.. _server-configuration-openapi: + +OpenAPI settings +================ + +These settings used to control exposing OpenAPI.json and SwaggerUI/ReDoc endpoints. + +.. autopydantic_model:: syncmaster.server.settings.server.openapi.OpenAPISettings +.. autopydantic_model:: syncmaster.server.settings.server.openapi.SwaggerSettings +.. autopydantic_model:: syncmaster.server.settings.server.openapi.RedocSettings +.. autopydantic_model:: syncmaster.server.settings.server.openapi.LogoSettings +.. autopydantic_model:: syncmaster.server.settings.server.openapi.FaviconSettings diff --git a/docs/backend/configuration/session.rst b/docs/server/configuration/session.rst similarity index 54% rename from docs/backend/configuration/session.rst rename to docs/server/configuration/session.rst index 893dd76b..097df71b 100644 --- a/docs/backend/configuration/session.rst +++ b/docs/server/configuration/session.rst @@ -1,8 +1,8 @@ -.. _backend-configuration-server-session: +.. _server-configuration-session: Session settings ================ These settings used to control `Session `_ options. -.. autopydantic_model:: syncmaster.backend.settings.server.session.SessionSettings \ No newline at end of file +.. autopydantic_model:: syncmaster.server.settings.server.session.SessionSettings \ No newline at end of file diff --git a/docs/server/configuration/static_files.rst b/docs/server/configuration/static_files.rst new file mode 100644 index 00000000..fb6449b6 --- /dev/null +++ b/docs/server/configuration/static_files.rst @@ -0,0 +1,8 @@ +.. _server-configuration-static-files: + +Serving static files +==================== + +These settings used to control serving static files by a server. + +.. autopydantic_model:: syncmaster.server.settings.server.static_files.StaticFilesSettings diff --git a/docs/backend/install.rst b/docs/server/install.rst similarity index 79% rename from docs/backend/install.rst rename to docs/server/install.rst index 8d445768..a855b70a 100644 --- a/docs/backend/install.rst +++ b/docs/server/install.rst @@ -1,6 +1,6 @@ -.. _backend-install: +.. _server-install: -Install & run backend +Install & run server ===================== With docker @@ -15,7 +15,7 @@ Requirements Installation process ~~~~~~~~~~~~~~~~~~~~ -Docker will download backend image of syncmaster & Postgres, and run them. +Docker will download server image of syncmaster & Postgres, and run them. Options can be set via ``.env`` file or ``environment`` section in ``docker-compose.yml`` .. dropdown:: ``docker-compose.yml`` @@ -37,19 +37,19 @@ Adding superusers: .. code-block:: console - $ python -m syncmaster.backend.scripts.manage_superusers add + $ python -m syncmaster.server.scripts.manage_superusers add Removing superusers: .. code-block:: console - $ python -m syncmaster.backend.scripts.manage_superusers remove + $ python -m syncmaster.server.scripts.manage_superusers remove Viewing list of superusers: .. code-block:: console - $ python -m syncmaster.backend.scripts.manage_superusers list + $ python -m syncmaster.server.scripts.manage_superusers list Without docker -------------- @@ -68,11 +68,11 @@ Install ``data-syncmaster`` package with following *extra* dependencies: .. code-block:: console - $ pip install data-syncmaster[backend,worker] + $ pip install data-syncmaster[server,worker] Available *extras* are: -* ``backend`` - main backend requirements, like FastAPI, SQLAlchemy and so on. +* ``server`` - main server requirements, like FastAPI, SQLAlchemy and so on. * ``worker`` - this dependency is needed to install the worker. @@ -113,13 +113,13 @@ Start RabbitMQ instance somewhere, and set up environment variable: SYNCMASTER__BROKER__URL=amqp://guest:guest@rabbitmq:5672/ -Run backend +Run server ~~~~~~~~~~~ -To start backend server you need to execute following command: +To start server server you need to execute following command: .. code-block:: console - $ python -m syncmaster.backend --host 0.0.0.0 --port 8000 + $ python -m syncmaster.server --host 0.0.0.0 --port 8000 After server is started and ready, open http://localhost:8000/docs. diff --git a/docs/backend/openapi.rst b/docs/server/openapi.rst similarity index 90% rename from docs/backend/openapi.rst rename to docs/server/openapi.rst index ad142ff2..6911157f 100644 --- a/docs/backend/openapi.rst +++ b/docs/server/openapi.rst @@ -1,4 +1,4 @@ -.. _backend-openapi: +.. _server-openapi: OpenAPI specification ===================== diff --git a/docs/worker/log_url.rst b/docs/worker/log_url.rst index 78bdef21..e4b44b53 100644 --- a/docs/worker/log_url.rst +++ b/docs/worker/log_url.rst @@ -1,7 +1,7 @@ Setting the `Run.log_url` value =============================== -Each run in the system is linked to a log URL where the Celery worker logs are available. This log URL might point to an Elastic instance or another logging tool such as Grafana. The log URL is generated based on a template configured in the backend. +Each run in the system is linked to a log URL where the Celery worker logs are available. This log URL might point to an Elastic instance or another logging tool such as Grafana. The log URL is generated based on a template configured in the server. The configuration parameter is: diff --git a/poetry.lock b/poetry.lock index 580a99d2..42c80399 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "alabaster" @@ -434,13 +434,13 @@ zstd = ["zstandard (==0.22.0)"] [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -825,6 +825,7 @@ files = [ {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:761817a3377ef15ac23cd7834715081791d4ec77f9297ee694ca1ee9c2c7e5eb"}, {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3c672a53c0fb4725a29c303be906d3c1fa99c32f58abe008a82705f9ee96f40b"}, {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:4ac4c9f37eba52cb6fbeaf5b59c152ea976726b865bd4cf87883a7e7006cc543"}, + {file = "cryptography-44.0.0-cp37-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:60eb32934076fa07e4316b7b2742fa52cbb190b42c2df2863dbc4230a0a9b385"}, {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ed3534eb1090483c96178fcb0f8893719d96d5274dfde98aa6add34614e97c8e"}, {file = "cryptography-44.0.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f3f6fdfa89ee2d9d496e2c087cebef9d4fcbb0ad63c40e821b39f74bf48d9c5e"}, {file = "cryptography-44.0.0-cp37-abi3-win32.whl", hash = "sha256:eb33480f1bad5b78233b0ad3e1b0be21e8ef1da745d8d2aecbb20671658b9053"}, @@ -835,6 +836,7 @@ files = [ {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:c5eb858beed7835e5ad1faba59e865109f3e52b3783b9ac21e7e47dc5554e289"}, {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f53c2c87e0fb4b0c00fa9571082a057e37690a8f12233306161c8f4b819960b7"}, {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:9e6fc8a08e116fb7c7dd1f040074c9d7b51d74a8ea40d4df2fc7aa08b76b9e6c"}, + {file = "cryptography-44.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9abcc2e083cbe8dde89124a47e5e53ec38751f0d7dfd36801008f316a127d7ba"}, {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:d2436114e46b36d00f8b72ff57e598978b37399d2786fd39793c36c6d5cb1c64"}, {file = "cryptography-44.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a01956ddfa0a6790d594f5b34fc1bfa6098aca434696a03cfdbe469b8ed79285"}, {file = "cryptography-44.0.0-cp39-abi3-win32.whl", hash = "sha256:eca27345e1214d1b9f9490d200f9db5a874479be914199194e746c893788d417"}, @@ -1622,13 +1624,13 @@ files = [ [[package]] name = "minio" -version = "7.2.12" +version = "7.2.13" description = "MinIO Python SDK for Amazon S3 Compatible Cloud Storage" optional = false python-versions = ">=3.9" files = [ - {file = "minio-7.2.12-py3-none-any.whl", hash = "sha256:4b63370ca83f82c23e6fb0a094a1e2b08b275884ae43f6a90c4388a45633e3f5"}, - {file = "minio-7.2.12.tar.gz", hash = "sha256:2a3fcf4ab753824de8ae3ffeb14da33d6ad416f83a7e82363a27b34da8e91f27"}, + {file = "minio-7.2.13-py3-none-any.whl", hash = "sha256:ad806be056e6b49510ad27f0782976c0b9d4c16baccd9d75518d97709bd5c105"}, + {file = "minio-7.2.13.tar.gz", hash = "sha256:0fc878da4c5139138f66d3f00ae898ed74cead854b900420b02cd68cf4be7133"}, ] [package.dependencies] @@ -2177,18 +2179,18 @@ files = [ [[package]] name = "pydantic" -version = "2.10.3" +version = "2.10.4" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.10.3-py3-none-any.whl", hash = "sha256:be04d85bbc7b65651c5f8e6b9976ed9c6f41782a55524cef079a34a0bb82144d"}, - {file = "pydantic-2.10.3.tar.gz", hash = "sha256:cb5ac360ce894ceacd69c403187900a02c4b20b693a9dd1d643e1effab9eadf9"}, + {file = "pydantic-2.10.4-py3-none-any.whl", hash = "sha256:597e135ea68be3a37552fb524bc7d0d66dcf93d395acd93a00682f1efcb8ee3d"}, + {file = "pydantic-2.10.4.tar.gz", hash = "sha256:82f12e9723da6de4fe2ba888b5971157b3be7ad914267dea8f05f82b28254f06"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.27.1" +pydantic-core = "2.27.2" typing-extensions = ">=4.12.2" [package.extras] @@ -2197,111 +2199,111 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.27.1" +version = "2.27.2" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, - {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, - {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, - {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, - {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, - {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, - {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, - {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, - {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, - {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, - {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, - {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, - {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, - {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, - {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, - {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, - {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, + {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"}, + {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"}, + {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"}, + {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"}, + {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"}, + {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"}, + {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"}, + {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"}, + {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"}, + {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"}, + {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"}, + {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"}, + {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, + {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"}, + {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"}, + {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"}, + {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"}, + {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"}, + {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"}, + {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"}, + {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"}, + {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, + {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, + {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, + {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, ] [package.dependencies] @@ -2521,13 +2523,13 @@ pycryptodome = ["pyasn1", "pycryptodome (>=3.3.1,<4.0.0)"] [[package]] name = "python-json-logger" -version = "3.2.0" +version = "3.2.1" description = "JSON Log Formatter for the Python Logging Package" optional = true python-versions = ">=3.8" files = [ - {file = "python_json_logger-3.2.0-py3-none-any.whl", hash = "sha256:d73522ddcfc6d0461394120feaddea9025dc64bf804d96357dd42fa878cc5fe8"}, - {file = "python_json_logger-3.2.0.tar.gz", hash = "sha256:2c11056458d3f56614480b24e9cb28f7aba69cbfbebddbb77c92f0ec0d4947ab"}, + {file = "python_json_logger-3.2.1-py3-none-any.whl", hash = "sha256:cdc17047eb5374bd311e748b42f99d71223f3b0e186f4206cc5d52aefe85b090"}, + {file = "python_json_logger-3.2.1.tar.gz", hash = "sha256:8eb0554ea17cb75b05d2848bc14fb02fbdbd9d6972120781b974380bfa162008"}, ] [package.extras] @@ -3476,11 +3478,11 @@ test = ["coverage[toml]", "zope.event", "zope.testing"] testing = ["coverage[toml]", "zope.event", "zope.testing"] [extras] -backend = ["alembic", "asgi-correlation-id", "asyncpg", "celery", "coloredlogs", "fastapi", "itsdangerous", "jinja2", "psycopg", "pydantic-settings", "python-jose", "python-json-logger", "python-keycloak", "python-multipart", "pyyaml", "sqlalchemy", "sqlalchemy-utils", "starlette-exporter", "uuid6", "uvicorn"] scheduler = ["apscheduler", "asyncpg", "celery", "coloredlogs", "pydantic-settings", "python-jose", "python-json-logger", "python-multipart", "pyyaml", "sqlalchemy", "sqlalchemy-utils"] +server = ["alembic", "asgi-correlation-id", "asyncpg", "celery", "coloredlogs", "fastapi", "itsdangerous", "jinja2", "psycopg", "pydantic-settings", "python-jose", "python-json-logger", "python-keycloak", "python-multipart", "pyyaml", "sqlalchemy", "sqlalchemy-utils", "starlette-exporter", "uuid6", "uvicorn"] worker = ["asgi-correlation-id", "celery", "coloredlogs", "jinja2", "onetl", "psycopg", "pydantic-settings", "python-jose", "python-json-logger", "python-multipart", "pyyaml", "sqlalchemy", "sqlalchemy-utils", "uuid6"] [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "d4306d77adec3ace74e3a9e5c480ce21e579445806822e12ff56f813e1afbc13" +content-hash = "b1c5251f9ddd87b4c9f9b4e8ac091e5072889f5613c951cea998d3e144033afc" diff --git a/pyproject.toml b/pyproject.toml index 7feb3383..b6f33c7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ itsdangerous = {version = "*", optional = true} python-keycloak = {version = ">=4.7,<6.0", optional = true} [tool.poetry.extras] -backend = [ +server = [ "pydantic-settings", "sqlalchemy", "sqlalchemy-utils", @@ -234,7 +234,7 @@ ignore_missing_imports = true [tool.pytest.ini_options] markers = [ - "backend: tests for backend (require running database)", + "server: tests for server (require running database)", "scheduler: tests for scheduler (require running database)", "worker: tests for syncmaster worker", "hive: tests for Hive", diff --git a/syncmaster/backend/api/v1/router.py b/syncmaster/backend/api/v1/router.py deleted file mode 100644 index 1d626b2a..00000000 --- a/syncmaster/backend/api/v1/router.py +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-FileCopyrightText: 2023-2024 MTS PJSC -# SPDX-License-Identifier: Apache-2.0 -from fastapi import APIRouter - -from syncmaster.backend.api.v1.auth import router as auth_router -from syncmaster.backend.api.v1.connections import router as connection_router -from syncmaster.backend.api.v1.groups import router as group_router -from syncmaster.backend.api.v1.queue import router as queue_router -from syncmaster.backend.api.v1.runs import router as runs_router -from syncmaster.backend.api.v1.transfers import router as transfer_router -from syncmaster.backend.api.v1.users import router as user_router - -router = APIRouter(prefix="/v1") -router.include_router(user_router) -router.include_router(auth_router) -router.include_router(group_router) -router.include_router(connection_router) -router.include_router(transfer_router) -router.include_router(queue_router) -router.include_router(runs_router) diff --git a/syncmaster/backend/dependencies/__init__.py b/syncmaster/backend/dependencies/__init__.py deleted file mode 100644 index 48aa914c..00000000 --- a/syncmaster/backend/dependencies/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2023-2024 MTS PJSC -# SPDX-License-Identifier: Apache-2.0 - -from syncmaster.backend.dependencies.get_access_token import get_access_token -from syncmaster.backend.dependencies.stub import Stub diff --git a/syncmaster/backend/providers/auth/__init__.py b/syncmaster/backend/providers/auth/__init__.py deleted file mode 100644 index bae07ad5..00000000 --- a/syncmaster/backend/providers/auth/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2023-2024 MTS PJSC -# SPDX-License-Identifier: Apache-2.0 -from syncmaster.backend.providers.auth.base_provider import AuthProvider -from syncmaster.backend.providers.auth.dummy_provider import DummyAuthProvider -from syncmaster.backend.providers.auth.keycloak_provider import KeycloakAuthProvider diff --git a/syncmaster/backend/services/__init__.py b/syncmaster/backend/services/__init__.py deleted file mode 100644 index 84b01c58..00000000 --- a/syncmaster/backend/services/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-FileCopyrightText: 2023-2024 MTS PJSC -# SPDX-License-Identifier: Apache-2.0 -from syncmaster.backend.services.get_user import get_user -from syncmaster.backend.services.unit_of_work import UnitOfWork diff --git a/syncmaster/db/factory.py b/syncmaster/db/factory.py index d018dde9..ccfaf1c0 100644 --- a/syncmaster/db/factory.py +++ b/syncmaster/db/factory.py @@ -10,8 +10,8 @@ create_async_engine, ) -from syncmaster.backend.services import UnitOfWork -from syncmaster.backend.settings import ServerAppSettings as Settings +from syncmaster.server.services.unit_of_work import UnitOfWork +from syncmaster.server.settings import ServerAppSettings as Settings def create_engine(connection_uri: str, **engine_kwargs: Any) -> AsyncEngine: diff --git a/syncmaster/db/migrations/env.py b/syncmaster/db/migrations/env.py index 97ac3e57..3143e7df 100644 --- a/syncmaster/db/migrations/env.py +++ b/syncmaster/db/migrations/env.py @@ -11,8 +11,8 @@ from sqlalchemy.engine import Connection from sqlalchemy.ext.asyncio import async_engine_from_config -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import Base +from syncmaster.server.settings import ServerAppSettings as Settings config = context.config diff --git a/syncmaster/db/repositories/credentials_repository.py b/syncmaster/db/repositories/credentials_repository.py index 9bcfd36d..ff450c13 100644 --- a/syncmaster/db/repositories/credentials_repository.py +++ b/syncmaster/db/repositories/credentials_repository.py @@ -15,8 +15,8 @@ from syncmaster.exceptions.credentials import AuthDataNotFoundError if TYPE_CHECKING: - from syncmaster.backend.settings import ServerAppSettings from syncmaster.scheduler.settings import SchedulerAppSettings + from syncmaster.server.settings import ServerAppSettings from syncmaster.worker.settings import WorkerAppSettings diff --git a/syncmaster/db/repositories/utils.py b/syncmaster/db/repositories/utils.py index 065d6f71..9cf91c3e 100644 --- a/syncmaster/db/repositories/utils.py +++ b/syncmaster/db/repositories/utils.py @@ -9,8 +9,8 @@ from pydantic import SecretStr if TYPE_CHECKING: - from syncmaster.backend.settings import ServerAppSettings from syncmaster.scheduler.settings import SchedulerAppSettings + from syncmaster.server.settings import ServerAppSettings from syncmaster.worker.settings import WorkerAppSettings diff --git a/syncmaster/scheduler/transfer_job_manager.py b/syncmaster/scheduler/transfer_job_manager.py index e6ef0e2b..58c12462 100644 --- a/syncmaster/scheduler/transfer_job_manager.py +++ b/syncmaster/scheduler/transfer_job_manager.py @@ -7,7 +7,6 @@ from kombu.exceptions import KombuError from sqlalchemy import any_, select -from syncmaster.backend.services.unit_of_work import UnitOfWork from syncmaster.db.models import RunType, Status, Transfer from syncmaster.exceptions.run import CannotConnectToTaskQueueError from syncmaster.exceptions.transfer import TransferNotFoundError @@ -15,6 +14,7 @@ from syncmaster.scheduler.settings import SchedulerAppSettings as Settings from syncmaster.scheduler.utils import get_async_session from syncmaster.schemas.v1.connections.connection_base import ReadAuthDataSchema +from syncmaster.server.services.unit_of_work import UnitOfWork class TransferJobManager: diff --git a/syncmaster/backend/__init__.py b/syncmaster/server/__init__.py similarity index 84% rename from syncmaster/backend/__init__.py rename to syncmaster/server/__init__.py index c00158b0..eebf1e87 100644 --- a/syncmaster/backend/__init__.py +++ b/syncmaster/server/__init__.py @@ -6,19 +6,21 @@ from pydantic import ValidationError from sqlalchemy.ext.asyncio import async_engine_from_config -from syncmaster.backend.api.router import api_router -from syncmaster.backend.handler import ( +from syncmaster.db.factory import create_session_factory, get_uow +from syncmaster.exceptions import SyncmasterError +from syncmaster.server.api.router import api_router +from syncmaster.server.handler import ( http_exception_handler, syncmsater_exception_handler, unknown_exception_handler, validation_exception_handler, ) -from syncmaster.backend.middlewares import apply_middlewares -from syncmaster.backend.providers.auth import AuthProvider -from syncmaster.backend.services.unit_of_work import UnitOfWork -from syncmaster.backend.settings import ServerAppSettings as Settings -from syncmaster.db.factory import create_session_factory, get_uow -from syncmaster.exceptions import SyncmasterError +from syncmaster.server.middlewares import apply_middlewares +from syncmaster.server.providers.auth import AuthProvider +from syncmaster.server.services.unit_of_work import UnitOfWork +from syncmaster.server.settings import ServerAppSettings as Settings + +__all__ = ["get_application", "application_factory"] def celery_factory(settings: Settings) -> Celery: diff --git a/syncmaster/backend/__main__.py b/syncmaster/server/__main__.py old mode 100755 new mode 100644 similarity index 92% rename from syncmaster/backend/__main__.py rename to syncmaster/server/__main__.py index 2fd2be14..f2fa3617 --- a/syncmaster/backend/__main__.py +++ b/syncmaster/server/__main__.py @@ -25,7 +25,7 @@ def main(prog_name: str | None = None, args: list[str] | None = None): args = args.copy() # prepend config path before command line arguments args.insert(0, "--factory") - args.insert(1, "syncmaster.backend:get_application") + args.insert(1, "syncmaster.server:get_application") # call uvicorn uvicorn.main.main(args=args, prog_name=prog_name) diff --git a/syncmaster/backend/api/__init__.py b/syncmaster/server/api/__init__.py similarity index 100% rename from syncmaster/backend/api/__init__.py rename to syncmaster/server/api/__init__.py diff --git a/syncmaster/backend/api/monitoring.py b/syncmaster/server/api/monitoring.py similarity index 100% rename from syncmaster/backend/api/monitoring.py rename to syncmaster/server/api/monitoring.py diff --git a/syncmaster/backend/api/router.py b/syncmaster/server/api/router.py similarity index 66% rename from syncmaster/backend/api/router.py rename to syncmaster/server/api/router.py index 820120f9..cead8222 100644 --- a/syncmaster/backend/api/router.py +++ b/syncmaster/server/api/router.py @@ -2,8 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 from fastapi import APIRouter -from syncmaster.backend.api import monitoring -from syncmaster.backend.api.v1.router import router as v1_router +from syncmaster.server.api import monitoring +from syncmaster.server.api.v1.router import router as v1_router api_router = APIRouter() api_router.include_router(monitoring.router) diff --git a/syncmaster/backend/api/v1/__init__.py b/syncmaster/server/api/v1/__init__.py similarity index 100% rename from syncmaster/backend/api/v1/__init__.py rename to syncmaster/server/api/v1/__init__.py diff --git a/syncmaster/backend/api/v1/auth.py b/syncmaster/server/api/v1/auth.py similarity index 92% rename from syncmaster/backend/api/v1/auth.py rename to syncmaster/server/api/v1/auth.py index 5d433618..bede92ff 100644 --- a/syncmaster/backend/api/v1/auth.py +++ b/syncmaster/server/api/v1/auth.py @@ -6,17 +6,17 @@ from fastapi.responses import RedirectResponse from fastapi.security import OAuth2PasswordRequestForm -from syncmaster.backend.dependencies import Stub -from syncmaster.backend.providers.auth import ( - AuthProvider, - DummyAuthProvider, - KeycloakAuthProvider, -) -from syncmaster.backend.utils.state import validate_state from syncmaster.errors.registration import get_error_responses from syncmaster.errors.schemas.invalid_request import InvalidRequestSchema from syncmaster.errors.schemas.not_authorized import NotAuthorizedSchema from syncmaster.schemas.v1.auth import AuthTokenSchema +from syncmaster.server.dependencies import Stub +from syncmaster.server.providers.auth import ( + AuthProvider, + DummyAuthProvider, + KeycloakAuthProvider, +) +from syncmaster.server.utils.state import validate_state router = APIRouter( prefix="/auth", diff --git a/syncmaster/backend/api/v1/connections.py b/syncmaster/server/api/v1/connections.py similarity index 98% rename from syncmaster/backend/api/v1/connections.py rename to syncmaster/server/api/v1/connections.py index 67cef2f2..cfebc81e 100644 --- a/syncmaster/backend/api/v1/connections.py +++ b/syncmaster/server/api/v1/connections.py @@ -6,7 +6,6 @@ from fastapi import APIRouter, Depends, Query, status from pydantic import TypeAdapter -from syncmaster.backend.services import UnitOfWork, get_user from syncmaster.db.models import Connection, ConnectionType, Transfer, User from syncmaster.db.utils import Permission from syncmaster.errors.registration import get_error_responses @@ -37,6 +36,8 @@ ) from syncmaster.schemas.v1.page import MetaPageSchema from syncmaster.schemas.v1.status import StatusResponseSchema +from syncmaster.server.services.get_user import get_user +from syncmaster.server.services.unit_of_work import UnitOfWork router = APIRouter(tags=["Connections"], responses=get_error_responses()) diff --git a/syncmaster/backend/api/v1/groups.py b/syncmaster/server/api/v1/groups.py similarity index 98% rename from syncmaster/backend/api/v1/groups.py rename to syncmaster/server/api/v1/groups.py index ce335abc..70c09de9 100644 --- a/syncmaster/backend/api/v1/groups.py +++ b/syncmaster/server/api/v1/groups.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 from fastapi import APIRouter, Depends, Query -from syncmaster.backend.services import UnitOfWork, get_user from syncmaster.db.models import User from syncmaster.db.models.group import GroupMemberRole from syncmaster.db.utils import Permission @@ -19,6 +18,8 @@ ) from syncmaster.schemas.v1.status import StatusResponseSchema from syncmaster.schemas.v1.users import UserPageSchemaAsGroupMember +from syncmaster.server.services.get_user import get_user +from syncmaster.server.services.unit_of_work import UnitOfWork router = APIRouter(tags=["Groups"], responses=get_error_responses()) diff --git a/syncmaster/backend/api/v1/queue.py b/syncmaster/server/api/v1/queue.py similarity index 97% rename from syncmaster/backend/api/v1/queue.py rename to syncmaster/server/api/v1/queue.py index 8620eca3..7dc25e35 100644 --- a/syncmaster/backend/api/v1/queue.py +++ b/syncmaster/server/api/v1/queue.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 from fastapi import APIRouter, Depends, Query, status -from syncmaster.backend.services import UnitOfWork, get_user from syncmaster.db.models import User from syncmaster.db.utils import Permission from syncmaster.errors.registration import get_error_responses @@ -16,6 +15,8 @@ UpdateQueueSchema, ) from syncmaster.schemas.v1.status import StatusResponseSchema +from syncmaster.server.services.get_user import get_user +from syncmaster.server.services.unit_of_work import UnitOfWork router = APIRouter(tags=["Queues"], responses=get_error_responses()) diff --git a/syncmaster/server/api/v1/router.py b/syncmaster/server/api/v1/router.py new file mode 100644 index 00000000..95d14ee5 --- /dev/null +++ b/syncmaster/server/api/v1/router.py @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: 2023-2024 MTS PJSC +# SPDX-License-Identifier: Apache-2.0 +from fastapi import APIRouter + +from syncmaster.server.api.v1.auth import router as auth_router +from syncmaster.server.api.v1.connections import router as connection_router +from syncmaster.server.api.v1.groups import router as group_router +from syncmaster.server.api.v1.queue import router as queue_router +from syncmaster.server.api.v1.runs import router as runs_router +from syncmaster.server.api.v1.transfers import router as transfer_router +from syncmaster.server.api.v1.users import router as user_router + +router = APIRouter(prefix="/v1") +router.include_router(user_router) +router.include_router(auth_router) +router.include_router(group_router) +router.include_router(connection_router) +router.include_router(transfer_router) +router.include_router(queue_router) +router.include_router(runs_router) diff --git a/syncmaster/backend/api/v1/runs.py b/syncmaster/server/api/v1/runs.py similarity index 96% rename from syncmaster/backend/api/v1/runs.py rename to syncmaster/server/api/v1/runs.py index cc9ca13d..d4505a12 100644 --- a/syncmaster/backend/api/v1/runs.py +++ b/syncmaster/server/api/v1/runs.py @@ -10,9 +10,6 @@ from jinja2 import Template from kombu.exceptions import KombuError -from syncmaster.backend.dependencies import Stub -from syncmaster.backend.services import UnitOfWork, get_user -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import RunType, Status, User from syncmaster.db.utils import Permission from syncmaster.errors.registration import get_error_responses @@ -25,6 +22,10 @@ ReadRunSchema, RunPageSchema, ) +from syncmaster.server.dependencies import Stub +from syncmaster.server.services.get_user import get_user +from syncmaster.server.services.unit_of_work import UnitOfWork +from syncmaster.server.settings import ServerAppSettings as Settings router = APIRouter(tags=["Runs"], responses=get_error_responses()) diff --git a/syncmaster/backend/api/v1/transfers.py b/syncmaster/server/api/v1/transfers.py similarity index 99% rename from syncmaster/backend/api/v1/transfers.py rename to syncmaster/server/api/v1/transfers.py index ed4a9da0..919a588c 100644 --- a/syncmaster/backend/api/v1/transfers.py +++ b/syncmaster/server/api/v1/transfers.py @@ -3,7 +3,6 @@ from fastapi import APIRouter, Depends, Query, status -from syncmaster.backend.services import UnitOfWork, get_user from syncmaster.db.models import ConnectionType, User from syncmaster.db.utils import Permission from syncmaster.errors.registration import get_error_responses @@ -27,6 +26,8 @@ TransferPageSchema, UpdateTransferSchema, ) +from syncmaster.server.services.get_user import get_user +from syncmaster.server.services.unit_of_work import UnitOfWork router = APIRouter(tags=["Transfers"], responses=get_error_responses()) diff --git a/syncmaster/backend/api/v1/users.py b/syncmaster/server/api/v1/users.py similarity index 92% rename from syncmaster/backend/api/v1/users.py rename to syncmaster/server/api/v1/users.py index 1913ad0d..168241f5 100644 --- a/syncmaster/backend/api/v1/users.py +++ b/syncmaster/server/api/v1/users.py @@ -4,10 +4,11 @@ from fastapi import APIRouter, Depends, Query -from syncmaster.backend.services import UnitOfWork, get_user from syncmaster.db.models import User from syncmaster.errors.registration import get_error_responses from syncmaster.schemas.v1.users import ReadUserSchema, UserPageSchema +from syncmaster.server.services.get_user import get_user +from syncmaster.server.services.unit_of_work import UnitOfWork logger = logging.getLogger(__name__) diff --git a/syncmaster/server/dependencies/__init__.py b/syncmaster/server/dependencies/__init__.py new file mode 100644 index 00000000..52a47ce2 --- /dev/null +++ b/syncmaster/server/dependencies/__init__.py @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2023-2024 MTS PJSC +# SPDX-License-Identifier: Apache-2.0 + +from syncmaster.server.dependencies.get_access_token import get_access_token +from syncmaster.server.dependencies.stub import Stub diff --git a/syncmaster/backend/dependencies/get_access_token.py b/syncmaster/server/dependencies/get_access_token.py similarity index 100% rename from syncmaster/backend/dependencies/get_access_token.py rename to syncmaster/server/dependencies/get_access_token.py diff --git a/syncmaster/backend/dependencies/stub.py b/syncmaster/server/dependencies/stub.py similarity index 100% rename from syncmaster/backend/dependencies/stub.py rename to syncmaster/server/dependencies/stub.py diff --git a/syncmaster/backend/handler.py b/syncmaster/server/handler.py similarity index 100% rename from syncmaster/backend/handler.py rename to syncmaster/server/handler.py diff --git a/syncmaster/backend/middlewares/__init__.py b/syncmaster/server/middlewares/__init__.py similarity index 63% rename from syncmaster/backend/middlewares/__init__.py rename to syncmaster/server/middlewares/__init__.py index 6f08c2da..de392c72 100644 --- a/syncmaster/backend/middlewares/__init__.py +++ b/syncmaster/server/middlewares/__init__.py @@ -3,15 +3,15 @@ from fastapi import FastAPI -from syncmaster.backend.middlewares.cors import apply_cors_middleware -from syncmaster.backend.middlewares.monitoring.metrics import ( +from syncmaster.server.middlewares.cors import apply_cors_middleware +from syncmaster.server.middlewares.monitoring.metrics import ( apply_monitoring_metrics_middleware, ) -from syncmaster.backend.middlewares.openapi import apply_openapi_middleware -from syncmaster.backend.middlewares.request_id import apply_request_id_middleware -from syncmaster.backend.middlewares.session import apply_session_middleware -from syncmaster.backend.middlewares.static_files import apply_static_files -from syncmaster.backend.settings import ServerAppSettings as Settings +from syncmaster.server.middlewares.openapi import apply_openapi_middleware +from syncmaster.server.middlewares.request_id import apply_request_id_middleware +from syncmaster.server.middlewares.session import apply_session_middleware +from syncmaster.server.middlewares.static_files import apply_static_files +from syncmaster.server.settings import ServerAppSettings as Settings from syncmaster.settings.log import setup_logging diff --git a/syncmaster/backend/middlewares/cors.py b/syncmaster/server/middlewares/cors.py similarity index 88% rename from syncmaster/backend/middlewares/cors.py rename to syncmaster/server/middlewares/cors.py index 24dbd5e3..145ad07e 100644 --- a/syncmaster/backend/middlewares/cors.py +++ b/syncmaster/server/middlewares/cors.py @@ -3,7 +3,7 @@ from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware -from syncmaster.backend.settings.server import CORSSettings +from syncmaster.server.settings.server import CORSSettings def apply_cors_middleware(app: FastAPI, settings: CORSSettings) -> FastAPI: diff --git a/syncmaster/backend/middlewares/monitoring/__init__.py b/syncmaster/server/middlewares/monitoring/__init__.py similarity index 73% rename from syncmaster/backend/middlewares/monitoring/__init__.py rename to syncmaster/server/middlewares/monitoring/__init__.py index 7cf7d732..13a6d0a7 100644 --- a/syncmaster/backend/middlewares/monitoring/__init__.py +++ b/syncmaster/server/middlewares/monitoring/__init__.py @@ -1,6 +1,6 @@ # SPDX-FileCopyrightText: 2023-2024 MTS PJSC # SPDX-License-Identifier: Apache-2.0 -from syncmaster.backend.middlewares.monitoring.metrics import ( +from syncmaster.server.middlewares.monitoring.metrics import ( apply_monitoring_metrics_middleware, ) diff --git a/syncmaster/backend/middlewares/monitoring/metrics.py b/syncmaster/server/middlewares/monitoring/metrics.py similarity index 90% rename from syncmaster/backend/middlewares/monitoring/metrics.py rename to syncmaster/server/middlewares/monitoring/metrics.py index 4ce1f455..42f32281 100644 --- a/syncmaster/backend/middlewares/monitoring/metrics.py +++ b/syncmaster/server/middlewares/monitoring/metrics.py @@ -4,8 +4,8 @@ from starlette.responses import PlainTextResponse from starlette_exporter import PrometheusMiddleware, handle_metrics -from syncmaster.backend.settings.server.monitoring import MonitoringSettings -from syncmaster.backend.utils.slug import slugify +from syncmaster.server.settings.server.monitoring import MonitoringSettings +from syncmaster.server.utils.slug import slugify DEFAULT_SKIP_PATHS = { "/monitoring/metrics", diff --git a/syncmaster/backend/middlewares/openapi.py b/syncmaster/server/middlewares/openapi.py similarity index 98% rename from syncmaster/backend/middlewares/openapi.py rename to syncmaster/server/middlewares/openapi.py index 190f401b..7612af95 100644 --- a/syncmaster/backend/middlewares/openapi.py +++ b/syncmaster/server/middlewares/openapi.py @@ -12,7 +12,7 @@ from starlette.requests import Request from starlette.responses import JSONResponse -from syncmaster.backend.settings.server.openapi import OpenAPISettings +from syncmaster.server.settings.server.openapi import OpenAPISettings async def custom_openapi(request: Request) -> JSONResponse: diff --git a/syncmaster/backend/middlewares/request_id.py b/syncmaster/server/middlewares/request_id.py similarity index 89% rename from syncmaster/backend/middlewares/request_id.py rename to syncmaster/server/middlewares/request_id.py index f286b1d8..76c5755c 100644 --- a/syncmaster/backend/middlewares/request_id.py +++ b/syncmaster/server/middlewares/request_id.py @@ -4,7 +4,7 @@ from fastapi import FastAPI from uuid6 import uuid7 -from syncmaster.backend.settings.server import RequestIDSettings +from syncmaster.server.settings.server import RequestIDSettings def apply_request_id_middleware(app: FastAPI, settings: RequestIDSettings) -> FastAPI: diff --git a/syncmaster/backend/middlewares/session.py b/syncmaster/server/middlewares/session.py similarity index 85% rename from syncmaster/backend/middlewares/session.py rename to syncmaster/server/middlewares/session.py index d29d30a4..f091f0be 100644 --- a/syncmaster/backend/middlewares/session.py +++ b/syncmaster/server/middlewares/session.py @@ -4,7 +4,7 @@ from fastapi import FastAPI from starlette.middleware.sessions import SessionMiddleware -from syncmaster.backend.settings.server.session import SessionSettings +from syncmaster.server.settings.server.session import SessionSettings def apply_session_middleware(app: FastAPI, settings: SessionSettings) -> FastAPI: diff --git a/syncmaster/backend/middlewares/static_files.py b/syncmaster/server/middlewares/static_files.py similarity index 86% rename from syncmaster/backend/middlewares/static_files.py rename to syncmaster/server/middlewares/static_files.py index 0ed68023..acac45e4 100644 --- a/syncmaster/backend/middlewares/static_files.py +++ b/syncmaster/server/middlewares/static_files.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 from fastapi import FastAPI -from syncmaster.backend.settings.server.static_files import StaticFilesSettings +from syncmaster.server.settings.server.static_files import StaticFilesSettings def apply_static_files(app: FastAPI, settings: StaticFilesSettings) -> FastAPI: diff --git a/syncmaster/backend/providers/__init__.py b/syncmaster/server/providers/__init__.py similarity index 100% rename from syncmaster/backend/providers/__init__.py rename to syncmaster/server/providers/__init__.py diff --git a/syncmaster/server/providers/auth/__init__.py b/syncmaster/server/providers/auth/__init__.py new file mode 100644 index 00000000..ff6c48c3 --- /dev/null +++ b/syncmaster/server/providers/auth/__init__.py @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2023-2024 MTS PJSC +# SPDX-License-Identifier: Apache-2.0 +from syncmaster.server.providers.auth.base_provider import AuthProvider +from syncmaster.server.providers.auth.dummy_provider import DummyAuthProvider +from syncmaster.server.providers.auth.keycloak_provider import KeycloakAuthProvider diff --git a/syncmaster/backend/providers/auth/base_provider.py b/syncmaster/server/providers/auth/base_provider.py similarity index 94% rename from syncmaster/backend/providers/auth/base_provider.py rename to syncmaster/server/providers/auth/base_provider.py index 9faed5e3..1f5c10d8 100644 --- a/syncmaster/backend/providers/auth/base_provider.py +++ b/syncmaster/server/providers/auth/base_provider.py @@ -20,7 +20,7 @@ class AuthProvider(ABC): @abstractmethod def setup(cls, app: FastAPI) -> FastAPI: """ - This method is called by :obj:`syncmaster.backend.application_factory`. + This method is called by :obj:`syncmaster.server.application_factory`. Here you should add dependency overrides for auth provider, and return new ``app`` object. @@ -32,7 +32,7 @@ def setup(cls, app: FastAPI) -> FastAPI: from fastapi import FastAPI from my_awesome_auth_provider.settings import MyAwesomeAuthProviderSettings - from syncmaster.backend.dependencies import Stub + from syncmaster.server.dependencies import Stub class MyAwesomeAuthProvider(AuthProvider): def setup(app): @@ -63,7 +63,7 @@ async def get_current_user(self, access_token: Any, *args, **kwargs) -> User: Returns ------- - :obj:`syncmaster.backend.db.models.User` + :obj:`syncmaster.server.db.models.User` Current user object """ ... diff --git a/syncmaster/backend/providers/auth/dummy_provider.py b/syncmaster/server/providers/auth/dummy_provider.py similarity index 92% rename from syncmaster/backend/providers/auth/dummy_provider.py rename to syncmaster/server/providers/auth/dummy_provider.py index 972e6a57..52abb676 100644 --- a/syncmaster/backend/providers/auth/dummy_provider.py +++ b/syncmaster/server/providers/auth/dummy_provider.py @@ -8,14 +8,14 @@ from fastapi import Depends, FastAPI -from syncmaster.backend.dependencies import Stub -from syncmaster.backend.providers.auth.base_provider import AuthProvider -from syncmaster.backend.services import UnitOfWork -from syncmaster.backend.settings.auth.dummy import DummyAuthProviderSettings -from syncmaster.backend.utils.jwt import decode_jwt, sign_jwt from syncmaster.db.models import User from syncmaster.exceptions import EntityNotFoundError from syncmaster.exceptions.auth import AuthorizationError +from syncmaster.server.dependencies import Stub +from syncmaster.server.providers.auth.base_provider import AuthProvider +from syncmaster.server.services.unit_of_work import UnitOfWork +from syncmaster.server.settings.auth.dummy import DummyAuthProviderSettings +from syncmaster.server.utils.jwt import decode_jwt, sign_jwt log = logging.getLogger(__name__) diff --git a/syncmaster/backend/providers/auth/keycloak_provider.py b/syncmaster/server/providers/auth/keycloak_provider.py similarity index 94% rename from syncmaster/backend/providers/auth/keycloak_provider.py rename to syncmaster/server/providers/auth/keycloak_provider.py index 61ef585d..603b7039 100644 --- a/syncmaster/backend/providers/auth/keycloak_provider.py +++ b/syncmaster/server/providers/auth/keycloak_provider.py @@ -6,14 +6,14 @@ from fastapi import Depends, FastAPI, Request from keycloak import KeycloakOpenID -from syncmaster.backend.dependencies import Stub -from syncmaster.backend.providers.auth.base_provider import AuthProvider -from syncmaster.backend.services import UnitOfWork -from syncmaster.backend.settings.auth.keycloak import KeycloakAuthProviderSettings -from syncmaster.backend.utils.state import generate_state from syncmaster.exceptions import EntityNotFoundError from syncmaster.exceptions.auth import AuthorizationError from syncmaster.exceptions.redirect import RedirectException +from syncmaster.server.dependencies import Stub +from syncmaster.server.providers.auth.base_provider import AuthProvider +from syncmaster.server.services.unit_of_work import UnitOfWork +from syncmaster.server.settings.auth.keycloak import KeycloakAuthProviderSettings +from syncmaster.server.utils.state import generate_state log = logging.getLogger(__name__) diff --git a/syncmaster/backend/scripts/export_openapi_schema.py b/syncmaster/server/scripts/export_openapi_schema.py old mode 100755 new mode 100644 similarity index 91% rename from syncmaster/backend/scripts/export_openapi_schema.py rename to syncmaster/server/scripts/export_openapi_schema.py index fac804b4..8026cd13 --- a/syncmaster/backend/scripts/export_openapi_schema.py +++ b/syncmaster/server/scripts/export_openapi_schema.py @@ -7,7 +7,7 @@ from fastapi import FastAPI -from syncmaster.backend import get_application +from syncmaster.server import get_application def get_openapi_schema(app: FastAPI) -> dict: diff --git a/syncmaster/backend/scripts/manage_superusers.py b/syncmaster/server/scripts/manage_superusers.py similarity index 96% rename from syncmaster/backend/scripts/manage_superusers.py rename to syncmaster/server/scripts/manage_superusers.py index 73dd0979..6611d1f8 100644 --- a/syncmaster/backend/scripts/manage_superusers.py +++ b/syncmaster/server/scripts/manage_superusers.py @@ -11,9 +11,9 @@ from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine from sqlalchemy.future import select -from syncmaster.backend.middlewares import setup_logging -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models.user import User +from syncmaster.server.middlewares import setup_logging +from syncmaster.server.settings import ServerAppSettings as Settings async def add_superusers(session: AsyncSession, usernames: list[str]) -> None: diff --git a/syncmaster/backend/utils/__init__.py b/syncmaster/server/services/__init__.py similarity index 100% rename from syncmaster/backend/utils/__init__.py rename to syncmaster/server/services/__init__.py diff --git a/syncmaster/backend/services/get_user.py b/syncmaster/server/services/get_user.py similarity index 93% rename from syncmaster/backend/services/get_user.py rename to syncmaster/server/services/get_user.py index ac0b0adc..ba33ecc0 100644 --- a/syncmaster/backend/services/get_user.py +++ b/syncmaster/server/services/get_user.py @@ -6,10 +6,10 @@ from fastapi import Depends, Request from fastapi.security import OAuth2PasswordBearer -from syncmaster.backend.dependencies import Stub -from syncmaster.backend.providers.auth import AuthProvider from syncmaster.db.models import User from syncmaster.exceptions import ActionNotAllowedError, EntityNotFoundError +from syncmaster.server.dependencies import Stub +from syncmaster.server.providers.auth import AuthProvider oauth_schema = OAuth2PasswordBearer(tokenUrl="v1/auth/token", auto_error=False) diff --git a/syncmaster/backend/services/unit_of_work.py b/syncmaster/server/services/unit_of_work.py similarity index 91% rename from syncmaster/backend/services/unit_of_work.py rename to syncmaster/server/services/unit_of_work.py index 8a5e570b..0ca5e03a 100644 --- a/syncmaster/backend/services/unit_of_work.py +++ b/syncmaster/server/services/unit_of_work.py @@ -5,8 +5,6 @@ from fastapi import Depends from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.dependencies import Stub -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData from syncmaster.db.repositories import ( ConnectionRepository, @@ -17,6 +15,8 @@ TransferRepository, UserRepository, ) +from syncmaster.server.dependencies import Stub +from syncmaster.server.settings import ServerAppSettings as Settings class UnitOfWork: diff --git a/syncmaster/backend/settings/__init__.py b/syncmaster/server/settings/__init__.py similarity index 88% rename from syncmaster/backend/settings/__init__.py rename to syncmaster/server/settings/__init__.py index ec6f6431..b747c1db 100644 --- a/syncmaster/backend/settings/__init__.py +++ b/syncmaster/server/settings/__init__.py @@ -3,8 +3,8 @@ from pydantic import Field from pydantic_settings import BaseSettings -from syncmaster.backend.settings.auth import AuthSettings -from syncmaster.backend.settings.server import ServerSettings +from syncmaster.server.settings.auth import AuthSettings +from syncmaster.server.settings.server import ServerSettings from syncmaster.settings import ( CredentialsEncryptionSettings, DatabaseSettings, @@ -14,11 +14,11 @@ class ServerAppSettings(BaseSettings): - """Syncmaster backend settings. + """Syncmaster server settings. - Backend can be configured in 2 ways: + Server can be configured in 2 ways: - * By explicitly passing ``settings`` object as an argument to :obj:`application_factory ` + * By explicitly passing ``settings`` object as an argument to :obj:`application_factory ` * By setting up environment variables matching a specific key. All environment variable names are written in uppercase and should be prefixed with ``SYNCMASTER__``. diff --git a/syncmaster/backend/settings/auth/__init__.py b/syncmaster/server/settings/auth/__init__.py similarity index 71% rename from syncmaster/backend/settings/auth/__init__.py rename to syncmaster/server/settings/auth/__init__.py index 415204d2..ca1ca1f0 100644 --- a/syncmaster/backend/settings/auth/__init__.py +++ b/syncmaster/server/settings/auth/__init__.py @@ -3,7 +3,7 @@ from pydantic import BaseModel, Field, ImportString -from syncmaster.backend.settings.auth.keycloak import KeycloakAuthProviderSettings +from syncmaster.server.settings.auth.keycloak import KeycloakAuthProviderSettings class AuthSettings(BaseModel): @@ -16,14 +16,14 @@ class AuthSettings(BaseModel): .. code-block:: bash - SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.dummy_provider.DummyAuthProvider + SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.dummy_provider.DummyAuthProvider # pass access_key.secret_key = "secret" to DummyAuthProviderSettings SYNCMASTER__AUTH__ACCESS_KEY__SECRET_KEY=secret """ provider: ImportString = Field( # type: ignore[assignment] - default="syncmaster.backend.providers.auth.dummy_provider.DummyAuthProvider", + default="syncmaster.server.providers.auth.dummy_provider.DummyAuthProvider", description="Full name of auth provider class", validate_default=True, ) diff --git a/syncmaster/backend/settings/auth/dummy.py b/syncmaster/server/settings/auth/dummy.py similarity index 71% rename from syncmaster/backend/settings/auth/dummy.py rename to syncmaster/server/settings/auth/dummy.py index d47b0545..3ea5db4e 100644 --- a/syncmaster/backend/settings/auth/dummy.py +++ b/syncmaster/server/settings/auth/dummy.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 from pydantic import BaseModel, Field -from syncmaster.backend.settings.auth.jwt import JWTSettings +from syncmaster.server.settings.auth.jwt import JWTSettings class DummyAuthProviderSettings(BaseModel): @@ -13,7 +13,7 @@ class DummyAuthProviderSettings(BaseModel): .. code-block:: bash - SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.dummy_provider.DummyAuthProvider + SYNCMASTER__AUTH__PROVIDER=syncmaster.server.providers.auth.dummy_provider.DummyAuthProvider SYNCMASTER__AUTH__ACCESS_KEY__SECRET_KEY=secret """ diff --git a/syncmaster/backend/settings/auth/jwt.py b/syncmaster/server/settings/auth/jwt.py similarity index 100% rename from syncmaster/backend/settings/auth/jwt.py rename to syncmaster/server/settings/auth/jwt.py diff --git a/syncmaster/backend/settings/auth/keycloak.py b/syncmaster/server/settings/auth/keycloak.py similarity index 100% rename from syncmaster/backend/settings/auth/keycloak.py rename to syncmaster/server/settings/auth/keycloak.py diff --git a/syncmaster/backend/settings/server/__init__.py b/syncmaster/server/settings/server/__init__.py similarity index 57% rename from syncmaster/backend/settings/server/__init__.py rename to syncmaster/server/settings/server/__init__.py index 4ac9c40b..d8419e9d 100644 --- a/syncmaster/backend/settings/server/__init__.py +++ b/syncmaster/server/settings/server/__init__.py @@ -5,16 +5,16 @@ from pydantic import BaseModel, Field -from syncmaster.backend.settings.server.cors import CORSSettings -from syncmaster.backend.settings.server.monitoring import MonitoringSettings -from syncmaster.backend.settings.server.openapi import OpenAPISettings -from syncmaster.backend.settings.server.request_id import RequestIDSettings -from syncmaster.backend.settings.server.session import SessionSettings -from syncmaster.backend.settings.server.static_files import StaticFilesSettings +from syncmaster.server.settings.server.cors import CORSSettings +from syncmaster.server.settings.server.monitoring import MonitoringSettings +from syncmaster.server.settings.server.openapi import OpenAPISettings +from syncmaster.server.settings.server.request_id import RequestIDSettings +from syncmaster.server.settings.server.session import SessionSettings +from syncmaster.server.settings.server.static_files import StaticFilesSettings class ServerSettings(BaseModel): - """Backend server settings. + """Server server settings. Examples -------- @@ -44,21 +44,21 @@ class ServerSettings(BaseModel): ) session: SessionSettings = Field( default_factory=SessionSettings, # type: ignore[arg-type] - description=":ref:`Session settings `", + description=":ref:`Session settings `", ) cors: CORSSettings = Field( default_factory=CORSSettings, - description=":ref:`CORS settings `", + description=":ref:`CORS settings `", ) monitoring: MonitoringSettings = Field( default_factory=MonitoringSettings, - description=":ref:`Monitoring settings `", + description=":ref:`Monitoring settings `", ) openapi: OpenAPISettings = Field( default_factory=OpenAPISettings, - description=":ref:`OpenAPI.json settings `", + description=":ref:`OpenAPI.json settings `", ) static_files: StaticFilesSettings = Field( default_factory=StaticFilesSettings, - description=":ref:`Static files settings `", + description=":ref:`Static files settings `", ) diff --git a/syncmaster/backend/settings/server/cors.py b/syncmaster/server/settings/server/cors.py similarity index 97% rename from syncmaster/backend/settings/server/cors.py rename to syncmaster/server/settings/server/cors.py index 2fc0c8eb..018a5787 100644 --- a/syncmaster/backend/settings/server/cors.py +++ b/syncmaster/server/settings/server/cors.py @@ -53,7 +53,7 @@ class CORSSettings(BaseModel): default=["X-Request-ID", "X-Request-With"], description="HTTP headers allowed for CORS", ) - expose_headers: list[str] = Field(default=["X-Request-ID"], description="HTTP headers exposed from backend") + expose_headers: list[str] = Field(default=["X-Request-ID"], description="HTTP headers exposed from server") class Config: extra = "allow" diff --git a/syncmaster/backend/settings/server/monitoring.py b/syncmaster/server/settings/server/monitoring.py similarity index 100% rename from syncmaster/backend/settings/server/monitoring.py rename to syncmaster/server/settings/server/monitoring.py diff --git a/syncmaster/backend/settings/server/openapi.py b/syncmaster/server/settings/server/openapi.py similarity index 100% rename from syncmaster/backend/settings/server/openapi.py rename to syncmaster/server/settings/server/openapi.py diff --git a/syncmaster/backend/settings/server/request_id.py b/syncmaster/server/settings/server/request_id.py similarity index 100% rename from syncmaster/backend/settings/server/request_id.py rename to syncmaster/server/settings/server/request_id.py diff --git a/syncmaster/backend/settings/server/session.py b/syncmaster/server/settings/server/session.py similarity index 100% rename from syncmaster/backend/settings/server/session.py rename to syncmaster/server/settings/server/session.py diff --git a/syncmaster/backend/settings/server/static_files.py b/syncmaster/server/settings/server/static_files.py similarity index 98% rename from syncmaster/backend/settings/server/static_files.py rename to syncmaster/server/settings/server/static_files.py index 20d4dde9..ca6bddcb 100644 --- a/syncmaster/backend/settings/server/static_files.py +++ b/syncmaster/server/settings/server/static_files.py @@ -16,7 +16,7 @@ class StaticFilesSettings(BaseModel): .. code-block:: bash SYNCMASTER__SERVER__STATIC_FILES__ENABLED=True - SYNCMASTER__SERVER__STATIC_FILES__DIRECTORY=/app/syncmaster/backend/static + SYNCMASTER__SERVER__STATIC_FILES__DIRECTORY=/app/syncmaster/server/static """ enabled: bool = Field(default=True, description="Set to ``True`` to enable static file serving") diff --git a/syncmaster/server/utils/__init__.py b/syncmaster/server/utils/__init__.py new file mode 100644 index 00000000..eb9bf462 --- /dev/null +++ b/syncmaster/server/utils/__init__.py @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: 2023-2024 MTS PJSC +# SPDX-License-Identifier: Apache-2.0 diff --git a/syncmaster/backend/utils/jwt.py b/syncmaster/server/utils/jwt.py similarity index 100% rename from syncmaster/backend/utils/jwt.py rename to syncmaster/server/utils/jwt.py diff --git a/syncmaster/backend/utils/slug.py b/syncmaster/server/utils/slug.py similarity index 100% rename from syncmaster/backend/utils/slug.py rename to syncmaster/server/utils/slug.py diff --git a/syncmaster/backend/utils/state.py b/syncmaster/server/utils/state.py similarity index 100% rename from syncmaster/backend/utils/state.py rename to syncmaster/server/utils/state.py diff --git a/syncmaster/settings/database.py b/syncmaster/settings/database.py index 3f5cf4f5..2ec28361 100644 --- a/syncmaster/settings/database.py +++ b/syncmaster/settings/database.py @@ -30,7 +30,7 @@ class DatabaseSettings(BaseModel): """ Database connection URL. - See `SQLAlchemy documentation `_ + See `SQLAlchemy documentation `_ .. warning: diff --git a/syncmaster/settings/log/__init__.py b/syncmaster/settings/log/__init__.py index 72750369..21ff8258 100644 --- a/syncmaster/settings/log/__init__.py +++ b/syncmaster/settings/log/__init__.py @@ -55,7 +55,7 @@ class LoggingSettings(BaseModel): .. code-block:: bash $ export SYNCMASTER__LOGGING__SETUP=False - $ python -m syncmaster.backend --log-level debug + $ python -m syncmaster.server --log-level debug """ setup: bool = Field( @@ -68,7 +68,7 @@ class LoggingSettings(BaseModel): """ Name of logging preset to use. - There are few logging presets bundled to ``syncmaster[backend]`` package: + There are few logging presets bundled to ``syncmaster[server]`` package: .. dropdown:: ``plain`` preset diff --git a/tests/conftest.py b/tests/conftest.py index 5bafb3d3..2dc3985d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -19,12 +19,12 @@ create_async_engine, ) -from syncmaster.backend import application_factory -from syncmaster.backend.settings import ServerAppSettings as Settings -from syncmaster.backend.settings.auth.jwt import JWTSettings -from syncmaster.backend.utils.jwt import sign_jwt from syncmaster.db.models import Base from syncmaster.scheduler.settings import SchedulerAppSettings +from syncmaster.server import application_factory +from syncmaster.server.settings import ServerAppSettings as Settings +from syncmaster.server.settings.auth.jwt import JWTSettings +from syncmaster.server.utils.jwt import sign_jwt from syncmaster.worker import celery_factory from syncmaster.worker.settings import WorkerAppSettings from tests.mocks import UserTestRoles diff --git a/tests/test_database/test_manage_superusers.py b/tests/test_database/test_manage_superusers.py index 9ccff3d5..d9694e32 100644 --- a/tests/test_database/test_manage_superusers.py +++ b/tests/test_database/test_manage_superusers.py @@ -6,15 +6,15 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.scripts.manage_superusers import ( +from syncmaster.db.models.user import User +from syncmaster.server.scripts.manage_superusers import ( add_superusers, list_superusers, remove_superusers, ) -from syncmaster.db.models.user import User from tests.mocks import MockUser -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] @pytest.mark.parametrize("simple_users", [10], indirect=True) diff --git a/tests/test_database/test_migrationsup_to_date.py b/tests/test_database/test_migrationsup_to_date.py index 887c5efc..44e03b7a 100644 --- a/tests/test_database/test_migrationsup_to_date.py +++ b/tests/test_database/test_migrationsup_to_date.py @@ -5,7 +5,7 @@ from syncmaster.db.models import Base from tests.utils import get_diff_db_metadata -pytestmark = [pytest.mark.backend] +pytestmark = [pytest.mark.server] @pytest.mark.asyncio diff --git a/tests/test_integration/test_run_transfer/conftest.py b/tests/test_integration/test_run_transfer/conftest.py index 71789a8b..820ca5de 100644 --- a/tests/test_integration/test_run_transfer/conftest.py +++ b/tests/test_integration/test_run_transfer/conftest.py @@ -25,7 +25,6 @@ from pytest import FixtureRequest from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import Group from syncmaster.dto.connections import ( ClickhouseConnectionDTO, @@ -37,6 +36,7 @@ PostgresConnectionDTO, S3ConnectionDTO, ) +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockUser, UserTestRoles from tests.resources.file_df_connection.test_data import data from tests.settings import TestSettings diff --git a/tests/test_integration/test_scheduler/scheduler_fixtures/transfer_fixture.py b/tests/test_integration/test_scheduler/scheduler_fixtures/transfer_fixture.py index 22e12b7c..173b5c87 100644 --- a/tests/test_integration/test_scheduler/scheduler_fixtures/transfer_fixture.py +++ b/tests/test_integration/test_scheduler/scheduler_fixtures/transfer_fixture.py @@ -3,8 +3,8 @@ import pytest_asyncio from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import ( MockConnection, MockCredentials, diff --git a/tests/test_integration/test_scheduler/test_scheduler.py b/tests/test_integration/test_scheduler/test_scheduler.py index fbf8ebe0..1a86c979 100644 --- a/tests/test_integration/test_scheduler/test_scheduler.py +++ b/tests/test_integration/test_scheduler/test_scheduler.py @@ -5,10 +5,10 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import Run, Status from syncmaster.scheduler.transfer_fetcher import TransferFetcher from syncmaster.scheduler.transfer_job_manager import TransferJobManager +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockTransfer pytestmark = [pytest.mark.asyncio, pytest.mark.worker, pytest.mark.scheduler_integration] diff --git a/tests/test_unit/conftest.py b/tests/test_unit/conftest.py index acdf00b1..7f0d0888 100644 --- a/tests/test_unit/conftest.py +++ b/tests/test_unit/conftest.py @@ -4,9 +4,9 @@ import pytest_asyncio from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import Queue, User, UserGroup from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import ( MockConnection, MockCredentials, diff --git a/tests/test_unit/test_auth/test_auth_keycloak.py b/tests/test_unit/test_auth/test_auth_keycloak.py index 84bdcad2..f4897eba 100644 --- a/tests/test_unit/test_auth/test_auth_keycloak.py +++ b/tests/test_unit/test_auth/test_auth_keycloak.py @@ -4,11 +4,11 @@ import responses from httpx import AsyncClient -from syncmaster.backend.settings import ServerAppSettings as Settings +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockUser -KEYCLOAK_PROVIDER = "syncmaster.backend.providers.auth.keycloak_provider.KeycloakAuthProvider" -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +KEYCLOAK_PROVIDER = "syncmaster.server.providers.auth.keycloak_provider.KeycloakAuthProvider" +pytestmark = [pytest.mark.asyncio, pytest.mark.server] @responses.activate diff --git a/tests/test_unit/test_connections/connection_fixtures/group_connection_fixture.py b/tests/test_unit/test_connections/connection_fixtures/group_connection_fixture.py index 4db457d7..9b325ec4 100644 --- a/tests/test_unit/test_connections/connection_fixtures/group_connection_fixture.py +++ b/tests/test_unit/test_connections/connection_fixtures/group_connection_fixture.py @@ -4,8 +4,8 @@ import pytest_asyncio from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import ( MockConnection, MockCredentials, diff --git a/tests/test_unit/test_connections/test_copy_connection.py b/tests/test_unit/test_connections/test_copy_connection.py index f3d92505..b4999c44 100644 --- a/tests/test_unit/test_connections/test_copy_connection.py +++ b/tests/test_unit/test_connections/test_copy_connection.py @@ -5,12 +5,12 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData, Connection from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockConnection, MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_maintainer_plus_can_copy_connection_without_deleting_source( diff --git a/tests/test_unit/test_connections/test_create_connection.py b/tests/test_unit/test_connections/test_create_connection.py index 2eadefdc..477e627f 100644 --- a/tests/test_unit/test_connections/test_create_connection.py +++ b/tests/test_unit/test_connections/test_create_connection.py @@ -3,12 +3,12 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData, Connection from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockConnection, MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_developer_plus_can_create_connection( diff --git a/tests/test_unit/test_connections/test_db_connection/test_create_clickhouse_connection.py b/tests/test_unit/test_connections/test_db_connection/test_create_clickhouse_connection.py index 6b97f42d..7d966de5 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_create_clickhouse_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_create_clickhouse_connection.py @@ -3,12 +3,12 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData, Connection from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockGroup, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.clickhouse] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.clickhouse] async def test_developer_plus_can_create_clickhouse_connection( diff --git a/tests/test_unit/test_connections/test_db_connection/test_create_hdfs_connection.py b/tests/test_unit/test_connections/test_db_connection/test_create_hdfs_connection.py index 3017c7c7..cbbba901 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_create_hdfs_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_create_hdfs_connection.py @@ -3,12 +3,12 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData, Connection from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockGroup, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.hdfs] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.hdfs] async def test_developer_plus_can_create_hdfs_connection( diff --git a/tests/test_unit/test_connections/test_db_connection/test_create_hive_connection.py b/tests/test_unit/test_connections/test_db_connection/test_create_hive_connection.py index bd3e04c4..36582aab 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_create_hive_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_create_hive_connection.py @@ -3,12 +3,12 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData, Connection from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockGroup, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.hive] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.hive] async def test_developer_plus_can_create_hive_connection( diff --git a/tests/test_unit/test_connections/test_db_connection/test_create_mssql_connection.py b/tests/test_unit/test_connections/test_db_connection/test_create_mssql_connection.py index dfc098eb..ce8d9323 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_create_mssql_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_create_mssql_connection.py @@ -3,12 +3,12 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData, Connection from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockGroup, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.mssql] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.mssql] async def test_developer_plus_can_create_mssql_connection( diff --git a/tests/test_unit/test_connections/test_db_connection/test_create_mysql_connection.py b/tests/test_unit/test_connections/test_db_connection/test_create_mysql_connection.py index f044da43..543b97b1 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_create_mysql_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_create_mysql_connection.py @@ -3,12 +3,12 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData, Connection from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockGroup, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.mysql] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.mysql] async def test_developer_plus_can_create_mysql_connection( diff --git a/tests/test_unit/test_connections/test_db_connection/test_create_oracle_connection.py b/tests/test_unit/test_connections/test_db_connection/test_create_oracle_connection.py index 96ab7e85..8fe2ab04 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_create_oracle_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_create_oracle_connection.py @@ -3,12 +3,12 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData, Connection from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockGroup, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.oracle] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.oracle] async def test_developer_plus_can_create_oracle_connection_with_service_name( diff --git a/tests/test_unit/test_connections/test_db_connection/test_create_postgres_connection.py b/tests/test_unit/test_connections/test_db_connection/test_create_postgres_connection.py index e2ca2bde..9df1d053 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_create_postgres_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_create_postgres_connection.py @@ -3,12 +3,12 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData, Connection from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockGroup, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.postgres] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.postgres] async def test_developer_plus_create_postgres_connection( diff --git a/tests/test_unit/test_connections/test_db_connection/test_create_s3_connection.py b/tests/test_unit/test_connections/test_db_connection/test_create_s3_connection.py index b7b67106..94676fc1 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_create_s3_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_create_s3_connection.py @@ -3,12 +3,12 @@ from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import AuthData, Connection from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockGroup, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.s3] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.s3] async def test_developer_plus_can_create_s3_connection( diff --git a/tests/test_unit/test_connections/test_db_connection/test_update_clickhouse_connection.py b/tests/test_unit/test_connections/test_db_connection/test_update_clickhouse_connection.py index b7984119..fb77f0a5 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_update_clickhouse_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_update_clickhouse_connection.py @@ -3,7 +3,7 @@ from tests.mocks import MockConnection, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.clickhouse] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.clickhouse] @pytest.mark.parametrize( diff --git a/tests/test_unit/test_connections/test_db_connection/test_update_mssql_connection.py b/tests/test_unit/test_connections/test_db_connection/test_update_mssql_connection.py index 2ff307cb..22ff9ca8 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_update_mssql_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_update_mssql_connection.py @@ -3,7 +3,7 @@ from tests.mocks import MockConnection, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.mssql] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.mssql] @pytest.mark.parametrize( diff --git a/tests/test_unit/test_connections/test_db_connection/test_update_mysql_connection.py b/tests/test_unit/test_connections/test_db_connection/test_update_mysql_connection.py index 0e33ef71..7f25ca00 100644 --- a/tests/test_unit/test_connections/test_db_connection/test_update_mysql_connection.py +++ b/tests/test_unit/test_connections/test_db_connection/test_update_mysql_connection.py @@ -3,7 +3,7 @@ from tests.mocks import MockConnection, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.mysql] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.mysql] @pytest.mark.parametrize( diff --git a/tests/test_unit/test_connections/test_delete_connection.py b/tests/test_unit/test_connections/test_delete_connection.py index 8502dd85..e1b0374d 100644 --- a/tests/test_unit/test_connections/test_delete_connection.py +++ b/tests/test_unit/test_connections/test_delete_connection.py @@ -5,7 +5,7 @@ from syncmaster.db.models import Connection from tests.mocks import MockConnection, MockGroup, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_maintainer_plus_can_delete_connection( diff --git a/tests/test_unit/test_connections/test_file_connection/test_read_hdfs_connection.py b/tests/test_unit/test_connections/test_file_connection/test_read_hdfs_connection.py index 2472f6e9..0adf87e4 100644 --- a/tests/test_unit/test_connections/test_file_connection/test_read_hdfs_connection.py +++ b/tests/test_unit/test_connections/test_file_connection/test_read_hdfs_connection.py @@ -4,7 +4,7 @@ from tests.mocks import MockConnection, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.hdfs] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.hdfs] @pytest.mark.parametrize( diff --git a/tests/test_unit/test_connections/test_file_connection/test_read_s3_connection.py b/tests/test_unit/test_connections/test_file_connection/test_read_s3_connection.py index ed784adc..2d27735b 100644 --- a/tests/test_unit/test_connections/test_file_connection/test_read_s3_connection.py +++ b/tests/test_unit/test_connections/test_file_connection/test_read_s3_connection.py @@ -4,7 +4,7 @@ from tests.mocks import MockConnection, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.s3] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.s3] @pytest.mark.parametrize( diff --git a/tests/test_unit/test_connections/test_file_connection/test_update_hdfs_connection.py b/tests/test_unit/test_connections/test_file_connection/test_update_hdfs_connection.py index beb11643..569365bb 100644 --- a/tests/test_unit/test_connections/test_file_connection/test_update_hdfs_connection.py +++ b/tests/test_unit/test_connections/test_file_connection/test_update_hdfs_connection.py @@ -3,7 +3,7 @@ from tests.mocks import MockConnection, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.hdfs] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.hdfs] @pytest.mark.parametrize( diff --git a/tests/test_unit/test_connections/test_file_connection/test_update_s3_connection.py b/tests/test_unit/test_connections/test_file_connection/test_update_s3_connection.py index c1c85dc8..e50c6043 100644 --- a/tests/test_unit/test_connections/test_file_connection/test_update_s3_connection.py +++ b/tests/test_unit/test_connections/test_file_connection/test_update_s3_connection.py @@ -3,7 +3,7 @@ from tests.mocks import MockConnection, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend, pytest.mark.s3] +pytestmark = [pytest.mark.asyncio, pytest.mark.server, pytest.mark.s3] @pytest.mark.parametrize( diff --git a/tests/test_unit/test_connections/test_read_connection.py b/tests/test_unit/test_connections/test_read_connection.py index 7ecc7dd3..debf48cd 100644 --- a/tests/test_unit/test_connections/test_read_connection.py +++ b/tests/test_unit/test_connections/test_read_connection.py @@ -4,7 +4,7 @@ from tests.mocks import MockConnection, MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_guest_plus_can_read_connection( diff --git a/tests/test_unit/test_connections/test_read_connection_types.py b/tests/test_unit/test_connections/test_read_connection_types.py index 1cbc9425..b9164172 100644 --- a/tests/test_unit/test_connections/test_read_connection_types.py +++ b/tests/test_unit/test_connections/test_read_connection_types.py @@ -3,10 +3,10 @@ import pytest from httpx import AsyncClient -from syncmaster.backend.api.v1.connections import CONNECTION_TYPES +from syncmaster.server.api.v1.connections import CONNECTION_TYPES from tests.mocks import MockUser -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_unauthorized_user_cannot_read_connection_types(client: AsyncClient): diff --git a/tests/test_unit/test_connections/test_read_connections.py b/tests/test_unit/test_connections/test_read_connections.py index d308b8ed..27391822 100644 --- a/tests/test_unit/test_connections/test_read_connections.py +++ b/tests/test_unit/test_connections/test_read_connections.py @@ -6,10 +6,10 @@ from httpx import AsyncClient from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockConnection, MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_guest_plus_can_read_connections( diff --git a/tests/test_unit/test_connections/test_update_connection.py b/tests/test_unit/test_connections/test_update_connection.py index e42a1729..17f2d1e1 100644 --- a/tests/test_unit/test_connections/test_update_connection.py +++ b/tests/test_unit/test_connections/test_update_connection.py @@ -3,7 +3,7 @@ from tests.mocks import MockConnection, MockGroup, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_developer_plus_can_update_connection( diff --git a/tests/test_unit/test_groups/test_add_user_to_group.py b/tests/test_unit/test_groups/test_add_user_to_group.py index bfa79909..070e36f1 100644 --- a/tests/test_unit/test_groups/test_add_user_to_group.py +++ b/tests/test_unit/test_groups/test_add_user_to_group.py @@ -3,7 +3,7 @@ from tests.mocks import MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_owner_can_add_user_to_group( diff --git a/tests/test_unit/test_groups/test_create_group.py b/tests/test_unit/test_groups/test_create_group.py index 06378691..dbcc3d40 100644 --- a/tests/test_unit/test_groups/test_create_group.py +++ b/tests/test_unit/test_groups/test_create_group.py @@ -8,7 +8,7 @@ from syncmaster.db.models import Group from tests.mocks import MockUser -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_simple_user_can_create_group( diff --git a/tests/test_unit/test_groups/test_delete_group_by_id.py b/tests/test_unit/test_groups/test_delete_group_by_id.py index 61eb5c7b..309a4d75 100644 --- a/tests/test_unit/test_groups/test_delete_group_by_id.py +++ b/tests/test_unit/test_groups/test_delete_group_by_id.py @@ -5,7 +5,7 @@ from syncmaster.db.models import Group from tests.mocks import MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_only_superuser_can_delete_group( diff --git a/tests/test_unit/test_groups/test_read_group_by_id.py b/tests/test_unit/test_groups/test_read_group_by_id.py index 6e54cd1d..2f268319 100644 --- a/tests/test_unit/test_groups/test_read_group_by_id.py +++ b/tests/test_unit/test_groups/test_read_group_by_id.py @@ -3,7 +3,7 @@ from tests.mocks import MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_member_of_group_can_read_by_id( diff --git a/tests/test_unit/test_groups/test_read_group_members.py b/tests/test_unit/test_groups/test_read_group_members.py index e69110cb..685bb491 100644 --- a/tests/test_unit/test_groups/test_read_group_members.py +++ b/tests/test_unit/test_groups/test_read_group_members.py @@ -3,7 +3,7 @@ from tests.mocks import MockConnection, MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_member_of_group_can_read_group_members( diff --git a/tests/test_unit/test_groups/test_read_groups.py b/tests/test_unit/test_groups/test_read_groups.py index 7aba53b1..59080ce1 100644 --- a/tests/test_unit/test_groups/test_read_groups.py +++ b/tests/test_unit/test_groups/test_read_groups.py @@ -7,7 +7,7 @@ from tests.mocks import MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_group_member_can_read_groups( diff --git a/tests/test_unit/test_groups/test_remove_user_from_group.py b/tests/test_unit/test_groups/test_remove_user_from_group.py index 46b7f0f9..f8209988 100644 --- a/tests/test_unit/test_groups/test_remove_user_from_group.py +++ b/tests/test_unit/test_groups/test_remove_user_from_group.py @@ -3,7 +3,7 @@ from tests.mocks import MockConnection, MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_owner_can_delete_anyone_from_group( diff --git a/tests/test_unit/test_groups/test_update_group_by_id.py b/tests/test_unit/test_groups/test_update_group_by_id.py index 59e633f4..05bdd821 100644 --- a/tests/test_unit/test_groups/test_update_group_by_id.py +++ b/tests/test_unit/test_groups/test_update_group_by_id.py @@ -3,7 +3,7 @@ from tests.mocks import MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_owner_of_group_can_update_group(client: AsyncClient, empty_group: MockGroup): diff --git a/tests/test_unit/test_groups/test_update_member_role.py b/tests/test_unit/test_groups/test_update_member_role.py index 74e22b40..2ef13483 100644 --- a/tests/test_unit/test_groups/test_update_member_role.py +++ b/tests/test_unit/test_groups/test_update_member_role.py @@ -3,7 +3,7 @@ from tests.mocks import MockConnection, MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_owner_of_group_can_update_user_role( diff --git a/tests/test_unit/test_ping.py b/tests/test_unit/test_ping.py index 74863ab7..c70c14d1 100644 --- a/tests/test_unit/test_ping.py +++ b/tests/test_unit/test_ping.py @@ -1,7 +1,7 @@ import pytest from httpx import AsyncClient -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_ping_route(client: AsyncClient): diff --git a/tests/test_unit/test_queue/test_create_queue.py b/tests/test_unit/test_queue/test_create_queue.py index c4abc690..afff3eaa 100644 --- a/tests/test_unit/test_queue/test_create_queue.py +++ b/tests/test_unit/test_queue/test_create_queue.py @@ -6,7 +6,7 @@ from syncmaster.db.models import Queue from tests.mocks import MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_maintainer_plus_can_create_queue( diff --git a/tests/test_unit/test_queue/test_delete_queue.py b/tests/test_unit/test_queue/test_delete_queue.py index 00af1493..49e80f29 100644 --- a/tests/test_unit/test_queue/test_delete_queue.py +++ b/tests/test_unit/test_queue/test_delete_queue.py @@ -5,7 +5,7 @@ from syncmaster.db.models import Queue from tests.mocks import MockGroup, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_maintainer_plus_can_delete_queue( diff --git a/tests/test_unit/test_queue/test_read_queue.py b/tests/test_unit/test_queue/test_read_queue.py index bf95e1d9..5ae2cdd9 100644 --- a/tests/test_unit/test_queue/test_read_queue.py +++ b/tests/test_unit/test_queue/test_read_queue.py @@ -4,7 +4,7 @@ from syncmaster.db.models import Queue from tests.mocks import MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_group_member_can_read_queue( diff --git a/tests/test_unit/test_queue/test_read_queues.py b/tests/test_unit/test_queue/test_read_queues.py index 1e066bfe..05e05723 100644 --- a/tests/test_unit/test_queue/test_read_queues.py +++ b/tests/test_unit/test_queue/test_read_queues.py @@ -8,7 +8,7 @@ from syncmaster.db.models import Queue from tests.mocks import MockGroup, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_group_member_can_read_queues( diff --git a/tests/test_unit/test_queue/test_update_queue.py b/tests/test_unit/test_queue/test_update_queue.py index 2a00b834..128a2562 100644 --- a/tests/test_unit/test_queue/test_update_queue.py +++ b/tests/test_unit/test_queue/test_update_queue.py @@ -5,7 +5,7 @@ from syncmaster.db.models import Queue from tests.mocks import MockGroup, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_maintainer_plus_can_update_queue( diff --git a/tests/test_unit/test_runs/test_create_run.py b/tests/test_unit/test_runs/test_create_run.py index 2811a4e0..225c04cc 100644 --- a/tests/test_unit/test_runs/test_create_run.py +++ b/tests/test_unit/test_runs/test_create_run.py @@ -10,7 +10,7 @@ from syncmaster.db.models import Run, RunType, Status from tests.mocks import MockGroup, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_developer_plus_can_create_run_of_transfer_his_group( diff --git a/tests/test_unit/test_runs/test_read_run.py b/tests/test_unit/test_runs/test_read_run.py index c68f3791..e226f871 100644 --- a/tests/test_unit/test_runs/test_read_run.py +++ b/tests/test_unit/test_runs/test_read_run.py @@ -4,7 +4,7 @@ from syncmaster.db.models import RunType from tests.mocks import MockGroup, MockRun, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_developer_plus_can_read_run( diff --git a/tests/test_unit/test_runs/test_read_runs.py b/tests/test_unit/test_runs/test_read_runs.py index d50e40ff..109b0ed3 100644 --- a/tests/test_unit/test_runs/test_read_runs.py +++ b/tests/test_unit/test_runs/test_read_runs.py @@ -7,7 +7,7 @@ from syncmaster.db.models import RunType, Status from tests.mocks import MockGroup, MockRun, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] FUTURE_DATE = "2099-01-01T00:00:00" PAST_DATE = "2000-01-01T00:00:00" diff --git a/tests/test_unit/test_runs/test_stop_run.py b/tests/test_unit/test_runs/test_stop_run.py index f5e5df4e..2e5e0a2d 100644 --- a/tests/test_unit/test_runs/test_stop_run.py +++ b/tests/test_unit/test_runs/test_stop_run.py @@ -5,7 +5,7 @@ from syncmaster.db.models import RunType, Status from tests.mocks import MockGroup, MockRun, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_developer_plus_can_stop_run_of_transfer_his_group( diff --git a/tests/test_unit/test_scheduler/scheduler_fixtures/transfer_fetcher_fixture.py b/tests/test_unit/test_scheduler/scheduler_fixtures/transfer_fetcher_fixture.py index d853575b..b08b4c07 100644 --- a/tests/test_unit/test_scheduler/scheduler_fixtures/transfer_fetcher_fixture.py +++ b/tests/test_unit/test_scheduler/scheduler_fixtures/transfer_fetcher_fixture.py @@ -1,7 +1,7 @@ import pytest -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.scheduler.transfer_fetcher import TransferFetcher +from syncmaster.server.settings import ServerAppSettings as Settings @pytest.fixture diff --git a/tests/test_unit/test_transfers/test_copy_transfer.py b/tests/test_unit/test_transfers/test_copy_transfer.py index edc1338f..5a85aeaa 100644 --- a/tests/test_unit/test_transfers/test_copy_transfer.py +++ b/tests/test_unit/test_transfers/test_copy_transfer.py @@ -9,7 +9,7 @@ from syncmaster.db.models import Connection, Queue from tests.mocks import MockGroup, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_maintainer_plus_can_copy_transfer_with_remove_source( diff --git a/tests/test_unit/test_transfers/test_create_transfer.py b/tests/test_unit/test_transfers/test_create_transfer.py index f60526a6..e3e7b6e0 100644 --- a/tests/test_unit/test_transfers/test_create_transfer.py +++ b/tests/test_unit/test_transfers/test_create_transfer.py @@ -6,7 +6,7 @@ from syncmaster.db.models import Queue, Transfer from tests.mocks import MockConnection, MockGroup, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_developer_plus_can_create_transfer( diff --git a/tests/test_unit/test_transfers/test_delete_transfer.py b/tests/test_unit/test_transfers/test_delete_transfer.py index d43c1d4d..74a138bf 100644 --- a/tests/test_unit/test_transfers/test_delete_transfer.py +++ b/tests/test_unit/test_transfers/test_delete_transfer.py @@ -5,7 +5,7 @@ from syncmaster.db.models import Transfer from tests.mocks import MockGroup, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_maintainer_plus_can_delete_group_transfer( diff --git a/tests/test_unit/test_transfers/test_file_transfers/test_create_transfer.py b/tests/test_unit/test_transfers/test_file_transfers/test_create_transfer.py index eed44104..38ac7590 100644 --- a/tests/test_unit/test_transfers/test_file_transfers/test_create_transfer.py +++ b/tests/test_unit/test_transfers/test_file_transfers/test_create_transfer.py @@ -6,7 +6,7 @@ from syncmaster.db.models import Queue, Transfer from tests.mocks import MockConnection, MockGroup, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] @pytest.mark.parametrize( diff --git a/tests/test_unit/test_transfers/test_file_transfers/test_read_transfer.py b/tests/test_unit/test_transfers/test_file_transfers/test_read_transfer.py index f1909082..412f90b6 100644 --- a/tests/test_unit/test_transfers/test_file_transfers/test_read_transfer.py +++ b/tests/test_unit/test_transfers/test_file_transfers/test_read_transfer.py @@ -3,7 +3,7 @@ from tests.mocks import MockTransfer, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] @pytest.mark.parametrize( diff --git a/tests/test_unit/test_transfers/test_file_transfers/test_update_transfer.py b/tests/test_unit/test_transfers/test_file_transfers/test_update_transfer.py index 112036b6..f65a7f12 100644 --- a/tests/test_unit/test_transfers/test_file_transfers/test_update_transfer.py +++ b/tests/test_unit/test_transfers/test_file_transfers/test_update_transfer.py @@ -3,7 +3,7 @@ from tests.mocks import MockTransfer, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] @pytest.mark.parametrize( diff --git a/tests/test_unit/test_transfers/test_read_transfer.py b/tests/test_unit/test_transfers/test_read_transfer.py index c6c22897..b49bb001 100644 --- a/tests/test_unit/test_transfers/test_read_transfer.py +++ b/tests/test_unit/test_transfers/test_read_transfer.py @@ -3,7 +3,7 @@ from tests.mocks import MockGroup, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_guest_plus_can_read_transfer( diff --git a/tests/test_unit/test_transfers/test_read_transfers.py b/tests/test_unit/test_transfers/test_read_transfers.py index 24eb1b6d..2108d0a1 100644 --- a/tests/test_unit/test_transfers/test_read_transfers.py +++ b/tests/test_unit/test_transfers/test_read_transfers.py @@ -6,7 +6,7 @@ from tests.mocks import MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_guest_plus_can_read_transfers( diff --git a/tests/test_unit/test_transfers/test_update_transfer.py b/tests/test_unit/test_transfers/test_update_transfer.py index edf9936e..8ca196b6 100644 --- a/tests/test_unit/test_transfers/test_update_transfer.py +++ b/tests/test_unit/test_transfers/test_update_transfer.py @@ -4,7 +4,7 @@ from syncmaster.db.models import Queue from tests.mocks import MockConnection, MockGroup, MockTransfer, MockUser, UserTestRoles -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_developer_plus_can_update_transfer( diff --git a/tests/test_unit/test_transfers/transfer_fixtures/transfer_fixture.py b/tests/test_unit/test_transfers/transfer_fixtures/transfer_fixture.py index ff227e53..084b5faa 100644 --- a/tests/test_unit/test_transfers/transfer_fixtures/transfer_fixture.py +++ b/tests/test_unit/test_transfers/transfer_fixtures/transfer_fixture.py @@ -4,8 +4,8 @@ import pytest_asyncio from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import ( MockConnection, MockCredentials, diff --git a/tests/test_unit/test_transfers/transfer_fixtures/transfer_with_duplicate_fixture.py b/tests/test_unit/test_transfers/transfer_fixtures/transfer_with_duplicate_fixture.py index d3a91813..66c48864 100644 --- a/tests/test_unit/test_transfers/transfer_fixtures/transfer_with_duplicate_fixture.py +++ b/tests/test_unit/test_transfers/transfer_fixtures/transfer_with_duplicate_fixture.py @@ -3,8 +3,8 @@ import pytest_asyncio from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import Queue +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockTransfer from tests.test_unit.utils import create_connection, create_credentials, create_transfer diff --git a/tests/test_unit/test_transfers/transfer_fixtures/transfer_with_user_role_fixtures.py b/tests/test_unit/test_transfers/transfer_fixtures/transfer_with_user_role_fixtures.py index 1d084f83..91ec5403 100644 --- a/tests/test_unit/test_transfers/transfer_fixtures/transfer_with_user_role_fixtures.py +++ b/tests/test_unit/test_transfers/transfer_fixtures/transfer_with_user_role_fixtures.py @@ -3,8 +3,8 @@ import pytest_asyncio from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import Connection, Queue +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockTransfer, UserTestRoles from tests.test_unit.conftest import add_user_to_group from tests.test_unit.utils import create_connection, create_credentials, create_transfer diff --git a/tests/test_unit/test_transfers/transfer_fixtures/transfers_fixture.py b/tests/test_unit/test_transfers/transfer_fixtures/transfers_fixture.py index a01cf9bf..1033836d 100644 --- a/tests/test_unit/test_transfers/transfer_fixtures/transfers_fixture.py +++ b/tests/test_unit/test_transfers/transfer_fixtures/transfers_fixture.py @@ -3,9 +3,9 @@ import pytest_asyncio from sqlalchemy.ext.asyncio import AsyncSession -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import ConnectionType from syncmaster.db.repositories.utils import decrypt_auth_data +from syncmaster.server.settings import ServerAppSettings as Settings from tests.mocks import MockConnection, MockCredentials, MockTransfer from tests.test_unit.utils import create_connection, create_credentials, create_transfer diff --git a/tests/test_unit/test_users/test_read_user.py b/tests/test_unit/test_users/test_read_user.py index b8c8619f..d1e508e7 100644 --- a/tests/test_unit/test_users/test_read_user.py +++ b/tests/test_unit/test_users/test_read_user.py @@ -3,7 +3,7 @@ from tests.mocks import MockUser -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_get_user_unauthorized(client: AsyncClient): diff --git a/tests/test_unit/test_users/test_read_users.py b/tests/test_unit/test_users/test_read_users.py index c120f0df..73add6cc 100644 --- a/tests/test_unit/test_users/test_read_users.py +++ b/tests/test_unit/test_users/test_read_users.py @@ -6,7 +6,7 @@ from tests.mocks import MockUser -pytestmark = [pytest.mark.asyncio, pytest.mark.backend] +pytestmark = [pytest.mark.asyncio, pytest.mark.server] async def test_get_users_unauthorized(client: AsyncClient): diff --git a/tests/test_unit/utils.py b/tests/test_unit/utils.py index 3e3faff7..b8330f01 100644 --- a/tests/test_unit/utils.py +++ b/tests/test_unit/utils.py @@ -11,7 +11,6 @@ from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy.orm import joinedload -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import ( AuthData, Connection, @@ -24,6 +23,7 @@ ) from syncmaster.db.repositories.utils import encrypt_auth_data from syncmaster.schemas.v1.transfers import ReadFullTransferSchema +from syncmaster.server.settings import ServerAppSettings as Settings @asynccontextmanager diff --git a/tests/utils.py b/tests/utils.py index b396a8d9..7f496306 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -17,8 +17,8 @@ create_async_engine, ) -from syncmaster.backend.settings import ServerAppSettings as Settings from syncmaster.db.models import Status +from syncmaster.server.settings import ServerAppSettings as Settings logger = logging.getLogger(__name__)