Skip to content

Commit

Permalink
Merge pull request #1679 from IndustryEssentials/dev
Browse files Browse the repository at this point in the history
[hot-fix] upgrading issue
  • Loading branch information
phoenix-xhuang authored Mar 24, 2023
2 parents bfdbf0f + a805f9b commit 7120e07
Show file tree
Hide file tree
Showing 44 changed files with 288 additions and 740 deletions.
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/ymir/command/ @IndustryEssentials/ymir-cmd
/ymir/command/ @IndustryEssentials/ymir-backend
/ymir/backend/ @IndustryEssentials/ymir-backend
/ymir/gateway/ @IndustryEssentials/ymir-backend
/ymir/updater/ @IndustryEssentials/ymir-backend
/ymir/web/ @IndustryEssentials/ymir-web
32 changes: 0 additions & 32 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

10 changes: 4 additions & 6 deletions .github/ISSUE_TEMPLATE/issue-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Issue report
about: Create a report to help us improve
title: ''
labels: ''
assignees: Zhang-SJ930104
assignees: DianeWu

---

Expand All @@ -28,11 +28,9 @@ If applicable, add screenshots to help explain your problem.
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Logs: under ymir-workplace/ymir-data/logs
- Error Message: in controller/app/hel-log
- Trace stack

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion .github/workflows/backend-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:

jobs:
backend-ci:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/command-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
command-ci:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/command-publish.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/exc-sdk-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
exc-sdk-ci:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
web-ci:

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 0 additions & 2 deletions ymir/backend/src/ymir_app/app/api/api_v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
inferences,
info,
keywords,
login,
models,
roles,
stats,
Expand All @@ -24,7 +23,6 @@

api_router = APIRouter()

api_router.include_router(login.router, tags=["auth"])
api_router.include_router(users.router, prefix="/users", tags=["users"])
api_router.include_router(projects.router, prefix="/projects", tags=["projects"])
api_router.include_router(iterations.router, prefix="/iterations", tags=["iterations"])
Expand Down
6 changes: 3 additions & 3 deletions ymir/backend/src/ymir_app/app/api/api_v1/endpoints/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def list_assets(
tags_str: Optional[str] = Query(None, example="big,small", alias="tags"),
annotation_types_str: Optional[str] = Query(None, example="gt,pred", alias="annotation_types"),
viz_client: VizClient = Depends(deps.get_viz_client),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
user_labels: UserLabels = Depends(deps.get_user_labels),
) -> Any:
"""
Expand Down Expand Up @@ -66,7 +66,7 @@ def get_random_asset_id_of_dataset(
data_type: AnnotationType,
db: Session = Depends(deps.get_db),
viz_client: VizClient = Depends(deps.get_viz_client),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
user_labels: UserLabels = Depends(deps.get_user_labels),
) -> Any:
"""
Expand Down Expand Up @@ -108,7 +108,7 @@ def get_asset_info(
asset_hash: str = Path(..., description="in asset hash format"),
db: Session = Depends(deps.get_db),
viz_client: VizClient = Depends(deps.get_viz_client),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
user_labels: UserLabels = Depends(deps.get_user_labels),
) -> Any:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from fastapi.logger import logger
from sqlalchemy.orm import Session

from app import crud, models, schemas
from app import crud, schemas
from app.api import deps
from app.api.errors.errors import (
DatasetGroupNotFound,
Expand All @@ -18,7 +18,7 @@
@router.get("/", response_model=schemas.DatasetGroupPaginationOut)
def list_dataset_groups(
db: Session = Depends(deps.get_db),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
name: str = Query(None, description="search by dataset group name"),
project_id: int = Query(None),
pagination: schemas.CommonPaginationParams = Depends(),
Expand All @@ -37,7 +37,7 @@ def list_dataset_groups(
def create_dataset_group(
*,
db: Session = Depends(deps.get_db),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
obj_in: schemas.DatasetGroupCreate,
controller_client: ControllerClient = Depends(deps.get_controller_client),
) -> Any:
Expand All @@ -59,7 +59,7 @@ def get_dataset_group(
*,
db: Session = Depends(deps.get_db),
group_id: int = Path(...),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
) -> Any:
"""
Get a dataset group detail
Expand All @@ -79,7 +79,7 @@ def update_dataset_group(
db: Session = Depends(deps.get_db),
group_id: int = Path(...),
obj_update: schemas.DatasetGroupUpdate,
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
) -> Any:
"""
Change dataset group name
Expand All @@ -103,7 +103,7 @@ def delete_dataset_group(
*,
db: Session = Depends(deps.get_db),
group_id: int = Path(...),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
) -> Any:
"""
Delete dataset group
Expand Down
26 changes: 13 additions & 13 deletions ymir/backend/src/ymir_app/app/api/api_v1/endpoints/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from fastapi.logger import logger
from sqlalchemy.orm import Session

from app import crud, models, schemas
from app import crud, schemas
from app.api import deps
from app.api.errors.errors import (
DatasetGroupNotFound,
Expand Down Expand Up @@ -35,7 +35,7 @@ def batch_get_datasets(
dataset_ids: str = Query(..., example="1,2,3", alias="ids", min_length=1),
require_ck: bool = Query(False, alias="ck"),
require_hist: bool = Query(False, alias="hist"),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
user_labels: UserLabels = Depends(deps.get_user_labels),
) -> Any:
ids = list({int(i) for i in dataset_ids.split(",")})
Expand All @@ -62,7 +62,7 @@ def batch_update_datasets(
*,
db: Session = Depends(deps.get_db),
dataset_ops: schemas.BatchOperations,
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
) -> Any:
if not dataset_ops.operations:
raise MissingOperations()
Expand All @@ -85,7 +85,7 @@ def batch_update_datasets(
@router.get("/", response_model=schemas.DatasetPaginationOut)
def list_datasets(
db: Session = Depends(deps.get_db),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
source: TaskType = Query(None, description="type of related task"),
exclude_source: TaskType = Query(None, description="exclude type of related task"),
project_id: int = Query(None),
Expand Down Expand Up @@ -119,7 +119,7 @@ def list_datasets(
@router.get("/public", response_model=schemas.DatasetPaginationOut)
def get_public_datasets(
db: Session = Depends(deps.get_db),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
) -> Any:
"""
Get all the public datasets
Expand All @@ -140,7 +140,7 @@ def import_dataset(
*,
db: Session = Depends(deps.get_db),
dataset_import: schemas.DatasetImport,
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
controller_client: ControllerClient = Depends(deps.get_controller_client),
background_tasks: BackgroundTasks,
) -> Any:
Expand Down Expand Up @@ -225,7 +225,7 @@ def delete_dataset(
*,
db: Session = Depends(deps.get_db),
dataset_id: int = Path(..., example="12"),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
) -> Any:
"""
Delete dataset
Expand Down Expand Up @@ -256,7 +256,7 @@ def update_dataset(
db: Session = Depends(deps.get_db),
dataset_id: int = Path(..., example="12"),
dataset_update: schemas.DatasetUpdate,
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
) -> Any:
dataset = crud.dataset.get_by_user_and_id(db, user_id=current_user.id, id=dataset_id)
if not dataset:
Expand All @@ -276,7 +276,7 @@ def get_dataset(
dataset_id: int = Path(..., example="12"),
keywords_for_negative_info: str = Query(None, alias="keywords"),
verbose_info: bool = Query(False, alias="verbose"),
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
viz_client: VizClient = Depends(deps.get_viz_client),
user_labels: UserLabels = Depends(deps.get_user_labels),
) -> Any:
Expand Down Expand Up @@ -323,7 +323,7 @@ def check_duplication(
*,
db: Session = Depends(deps.get_db),
in_datasets: schemas.dataset.MultiDatasetsWithProjectID,
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
viz_client: VizClient = Depends(deps.get_viz_client),
) -> Any:
"""
Expand All @@ -342,7 +342,7 @@ def create_dataset_fusion_task(
*,
db: Session = Depends(deps.get_db),
in_fusion: schemas.task.FusionParameter,
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
controller_client: ControllerClient = Depends(deps.get_controller_client),
user_labels: UserLabels = Depends(deps.get_user_labels),
) -> Any:
Expand All @@ -369,7 +369,7 @@ def merge_datasets(
*,
db: Session = Depends(deps.get_db),
in_merge: schemas.task.FusionParameter,
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
controller_client: ControllerClient = Depends(deps.get_controller_client),
user_labels: UserLabels = Depends(deps.get_user_labels),
) -> Any:
Expand All @@ -392,7 +392,7 @@ def filter_dataset(
*,
db: Session = Depends(deps.get_db),
in_filter: schemas.task.FusionParameter,
current_user: models.User = Depends(deps.get_current_active_user),
current_user: schemas.user.UserInfo = Depends(deps.get_current_active_user),
controller_client: ControllerClient = Depends(deps.get_controller_client),
user_labels: UserLabels = Depends(deps.get_user_labels),
) -> Any:
Expand Down
Loading

0 comments on commit 7120e07

Please sign in to comment.