Skip to content

Commit

Permalink
Merge pull request #360 from pepkit/dev
Browse files Browse the repository at this point in the history
Release `v0.13.0`
  • Loading branch information
nleroy917 authored Jul 25, 2024
2 parents 13fb7e1 + fe01e00 commit 4ee18f8
Show file tree
Hide file tree
Showing 72 changed files with 3,212 additions and 342 deletions.
4 changes: 3 additions & 1 deletion environment/local.dev.env
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ export HF_MODEL="BAAI/bge-small-en-v1.5"

export GH_CLIENT_ID=`pass databio/pephub/gh_client_id`
export GH_CLIENT_SECRET=`pass databio/pephub/gh_client_secret`
export BASE_URI=http://localhost:8000
export BASE_URI=http://localhost:8000

export PH_DEV_MODE=true
2 changes: 1 addition & 1 deletion pephub/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.12.0"
__version__ = "0.13.0"
2 changes: 1 addition & 1 deletion pephub/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@

CALLBACK_ENDPOINT = "/auth/callback"

DEFAULT_PEP_SCHEMA = "pep/2.1.0"
DEFAULT_PEP_SCHEMA = "databio/pep-2.1.0"
DEFAULT_TAG = "default"

DEFAULT_QDRANT_SCORE_THRESHOLD = (
Expand Down
2 changes: 1 addition & 1 deletion pephub/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from fastapi import Depends, Header, Query
from fastapi.exceptions import HTTPException
from fastapi.security import HTTPBearer
from fastembed.embedding import FlagEmbedding as Embedding
from fastembed.embedding import TextEmbedding as Embedding
from pepdbagent import PEPDatabaseAgent
from pepdbagent.const import DEFAULT_TAG
from pepdbagent.exceptions import ProjectNotFoundError
Expand Down
4 changes: 4 additions & 0 deletions pephub/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from .routers.api.v1.project import project as api_project
from .routers.api.v1.project import projects as api_projects
from .routers.api.v1.search import search as api_search
from .routers.api.v1.schemas import schemas as api_schemas
from .routers.api.v1.schemas import groups as api_groups
from .routers.auth.base import auth as auth_router
from .routers.eido.eido import router as eido_router

Expand Down Expand Up @@ -82,6 +84,8 @@
app.include_router(api_project)
app.include_router(api_projects)
app.include_router(api_search)
app.include_router(api_schemas)
app.include_router(api_groups)
app.include_router(auth_router)
app.include_router(eido_router)

Expand Down
11 changes: 3 additions & 8 deletions pephub/routers/api/v1/namespace.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import json
import shutil
import tempfile
from typing import List, Literal, Optional, Union

import peppy
from dotenv import load_dotenv
from fastapi import APIRouter, Depends, File, Form, HTTPException, Request, UploadFile
from fastapi import APIRouter, Depends, File, Form, HTTPException, UploadFile
from fastapi.responses import JSONResponse
from pepdbagent import PEPDatabaseAgent
from pepdbagent.const import DEFAULT_LIMIT_INFO
Expand All @@ -27,17 +26,13 @@
from typing_extensions import Annotated

from ....const import (
BLANK_PEP_CONFIG,
BLANK_PEP_SAMPLE_TABLE,
DEFAULT_PEP_SCHEMA,
DEFAULT_TAG,
)
from ....dependencies import (
get_db,
get_namespace_access_list,
get_namespace_info,
get_user_from_session_info,
read_authorization_header,
verify_user_can_write_namespace,
get_pepdb_namespace_info,
)
Expand Down Expand Up @@ -148,7 +143,7 @@ async def create_pep(
is_private: bool = Form(False),
tag: str = Form(DEFAULT_TAG),
description: Union[str, None] = Form(None),
pep_schema: str = Form(DEFAULT_PEP_SCHEMA),
pep_schema: str = Form(None),
files: List[UploadFile] = File(
None # let the file upload be optional. dont send a file? We instantiate with blank
),
Expand Down Expand Up @@ -208,7 +203,7 @@ async def create_pep(
# create a blank peppy.Project object with fake files
else:
raise HTTPException(
detail=f"Project files were not provided",
detail="Project files were not provided",
status_code=400,
)

Expand Down
2 changes: 1 addition & 1 deletion pephub/routers/api/v1/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ async def create_view_of_the_project(
_LOGGER.error(f"Could not create view. Error: {e}")
raise HTTPException(
status_code=409,
detail="Could not create view",
detail="A view with this name already exists in the project.",
)
return JSONResponse(
content={
Expand Down
Loading

0 comments on commit 4ee18f8

Please sign in to comment.