Open khoroshevskyi opened 1 month ago
Yeah this makes the most sense to me. This is actually how dockerhub does it. Check out the pephub docker image
It has a tags
tab:
So maybe we add a dropdown on a project page and just let the user pick a tag
An idea is a dropdown where a user can select the tag (defaults to default
) unless query param is specified:
While I'm looking at it, I propose getting rid of the blue schema tag it doesn't seem to add anything and bloats it a bit
and instead of tag, annotation return model will have tags, with available tags
class AnnotationModel(BaseModel):
"""
Project Annotation model. All meta metadata
"""
namespace: Optional[str]
name: Optional[str]
**tags: Optional[str]**
is_private: Optional[bool]
number_of_samples: Optional[int]
description: Optional[str]
last_update_date: Optional[str]
submission_date: Optional[str]
digest: Optional[str]
pep_schema: Optional[str]
pop: Optional[bool] = False
stars_number: Optional[int] = 0
forked_from: Optional[Union[str, None]] = None
yeah I like this idea -- this makes a lot of sense. Can we leverage this to get rid of these query params too?
Here is an example route:
@project.get(
"/views",
summary="get list of views for a project",
tags=["views"],
response_model=ProjectViews,
)
def get_views(
namespace: str,
project: str,
tag: str = DEFAULT_TAG,
agent: PEPDatabaseAgent = Depends(get_db),
):
return agent.view.get_views_annotation(namespace, project, tag=tag)
@khoroshevskyi What do you think about this one? Any progress made to the backend?
Right now, we treat
namespace/name:tag
as completely different projects.What if we consolidate all
name:tag
entries toname
, and from the project level, we retrieve the desired tag of the project?e.g.
This 2 project in namespace page would be just ONE project.
Also, if user doesn't know tag of the project, then user can access project, even if there is only one existing tag.