Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added backend forking #254

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions pephub/routers/api/v1/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@ async def zip_pep_for_download(proj: peppy.Project = Depends(get_project)):
)
async def fork_pep_to_namespace(
fork_request: ForkRequest,
proj: peppy.Project = Depends(get_project),
proj_annotation: AnnotationModel = Depends(get_project_annotation),
agent: PEPDatabaseAgent = Depends(get_db),
):
Expand All @@ -556,14 +555,15 @@ async def fork_pep_to_namespace(
fork_name = fork_request.fork_name
fork_tag = fork_request.fork_tag
try:
agent.project.create(
project=proj,
namespace=fork_to,
name=fork_name,
tag=fork_tag or DEFAULT_TAG,
description=proj_annotation.description,
pep_schema=proj_annotation.pep_schema,
agent.project.fork(
original_namespace=proj_annotation.namespace,
original_name=proj_annotation.name,
original_tag=proj_annotation.tag,
fork_namespace=fork_to,
fork_name=fork_name,
fork_tag=fork_tag,
)

except ProjectUniqueNameError as _:
raise HTTPException(
status_code=400,
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python-multipart>=0.0.5
tqdm
uvicorn
python-dotenv
pepdbagent @ git+https://github.com/pepkit/pepdbagent@dev#egg=pepdbagent
pepdbagent @ git+https://github.com/pepkit/pepdbagent@fork#egg=pepdbagent
peppy>=0.40.0a5
qdrant-client
requests
Expand Down
Loading