Skip to content

Commit

Permalink
[pre-commit.ci] Apply automatic pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Oct 30, 2024
1 parent 3d3f8d3 commit 8732518
Show file tree
Hide file tree
Showing 22 changed files with 5 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import conda_package_handling.api
import conda_package_streaming.url
import filelock

from conda.base.constants import PACKAGE_CACHE_MAGIC_FILE
from conda.common.path import expand, strip_pkg_extension
from conda.core.package_cache_data import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import typing

import yaml

from conda_lock.conda_lock import run_lock

from conda_store_server._internal import action, conda_utils, schema, utils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from alembic import context
from sqlalchemy import engine_from_config, pool


# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
Expand Down
1 change: 0 additions & 1 deletion conda-store-server/conda_store_server/_internal/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import typing

import yaml

from filelock import FileLock
from sqlalchemy.orm import Session

Expand Down
2 changes: 0 additions & 2 deletions conda-store-server/conda_store_server/_internal/dbutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import json
import os

from contextlib import contextmanager
from functools import partial
from tempfile import TemporaryDirectory
Expand All @@ -15,7 +14,6 @@

from conda_store_server._internal import utils


_here = os.path.abspath(os.path.dirname(__file__))

ALEMBIC_INI_TEMPLATE_PATH = os.path.join(_here, "alembic.ini")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import pydantic
import yaml

from sqlalchemy import and_, or_
from sqlalchemy.orm import Query

Expand Down
2 changes: 0 additions & 2 deletions conda-store-server/conda_store_server/_internal/orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import pathlib
import shutil
import sys

from functools import partial

from sqlalchemy import (
Expand Down Expand Up @@ -42,7 +41,6 @@
from conda_store_server._internal import conda_utils, schema, utils
from conda_store_server._internal.environment import validate_environment


logger = logging.getLogger("orm")

Base = declarative_base()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from conda_store_server._internal.server.app import CondaStoreServer


main = CondaStoreServer.launch_instance

if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
# license that can be found in the LICENSE file.

import datetime

from typing import Any, Dict, List, Optional, TypedDict

import pydantic
import yaml

from celery.result import AsyncResult
from fastapi import APIRouter, Body, Depends, HTTPException, Query, Request
from fastapi.responses import PlainTextResponse, RedirectResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from conda_store_server.server import dependencies


router_conda_store_ui = APIRouter(tags=["conda-store-ui"])


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from conda_store_server import api
from conda_store_server.server import dependencies


router_metrics = APIRouter(tags=["metrics"])


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from conda_store_server._internal.schema import Permissions
from conda_store_server.server import dependencies


router_registry = APIRouter(tags=["registry"])


Expand Down
1 change: 0 additions & 1 deletion conda-store-server/conda_store_server/_internal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import subprocess
import sys
import time

from typing import AnyStr

from filelock import FileLock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from conda_store_server._internal.worker.app import CondaStoreWorker


main = CondaStoreWorker.launch_instance

if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import typing

import yaml

from celery import Task, platforms, shared_task
from celery.execute import send_task
from celery.signals import worker_ready
Expand Down
2 changes: 0 additions & 2 deletions conda-store-server/conda_store_server/server/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
import datetime
import re
import secrets

from collections import defaultdict
from typing import Iterable, Optional, Set

import jwt
import requests
import yarl

from fastapi import APIRouter, Depends, HTTPException, Request, Response
from fastapi.encoders import jsonable_encoder
from fastapi.responses import HTMLResponse, JSONResponse, RedirectResponse
Expand Down
1 change: 0 additions & 1 deletion conda-store-server/conda_store_server/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import shutil

import minio

from minio.credentials.providers import Provider
from traitlets import Bool, Dict, List, Type, Unicode
from traitlets.config import LoggingConfigurable
Expand Down
2 changes: 0 additions & 2 deletions conda-store-server/tests/_internal/action/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
import re
import sys
import tempfile

from unittest import mock

import pytest
import yaml
import yarl

from celery.result import AsyncResult
from conda.base.context import context as conda_base_context
from constructor import construct
Expand Down
1 change: 0 additions & 1 deletion conda-store-server/tests/_internal/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from conda_store_server._internal.utils import disk_usage, du


# TODO: Add tests for the other functions in utils.py


Expand Down
1 change: 0 additions & 1 deletion conda-store-server/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import sys

import pytest

from celery.result import AsyncResult

from conda_store_server import api
Expand Down
1 change: 0 additions & 1 deletion conda-store-server/tests/test_traitlets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import tempfile

import pytest

from fastapi.templating import Jinja2Templates
from fastapi.testclient import TestClient

Expand Down
20 changes: 5 additions & 15 deletions conda-store-server/tests/user_journeys/test_user_journeys.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ def test_admin_login_and_delete_shared_environment(
environment = api.create_environment(
namespace,
specification_path,
).json()["data"][
"specification"
]["name"]
).json()["data"]["specification"]["name"]

api.delete_environment(namespace, environment)
api.delete_namespace(namespace)
Expand Down Expand Up @@ -91,17 +89,13 @@ def test_user_login_and_create_shared_environment(
token=api.create_token(
namespace,
"developer",
).json()[
"data"
]["token"],
).json()["data"]["token"],
)

environment = dev_api.create_environment(
namespace,
specification_path,
).json()[
"data"
]["specification"]["name"]
).json()["data"]["specification"]["name"]

api.delete_environment(namespace, environment)
api.delete_namespace(namespace)
Expand Down Expand Up @@ -139,9 +133,7 @@ def test_admin_set_active_build(base_url: str):
assert api.get_environment(
namespace=namespace,
environment=environment,
)[
"current_build_id"
] == max(build_ids)
)["current_build_id"] == max(build_ids)

api.set_active_build(
namespace=namespace, environment=environment, build_id=min(build_ids)
Expand All @@ -150,9 +142,7 @@ def test_admin_set_active_build(base_url: str):
assert api.get_environment(
namespace=namespace,
environment=environment,
)[
"current_build_id"
] == min(build_ids)
)["current_build_id"] == min(build_ids)

for env in envs:
api.delete_environment(namespace, env)
Expand Down

0 comments on commit 8732518

Please sign in to comment.