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

34 create the container structure #227

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
1,015 changes: 733 additions & 282 deletions datastore/__init__.py

Large diffs are not rendered by default.

221 changes: 147 additions & 74 deletions datastore/blob/azure_storage_api/__init__.py

Large diffs are not rendered by default.

22 changes: 19 additions & 3 deletions datastore/db/metadata/picture_set/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,27 @@
"""
from datetime import date
from datastore.db.metadata import validator

from pydantic import BaseModel
from uuid import UUID
from typing import Optional, List

class PictureSetCreationError(Exception):
pass

class PictureSet(BaseModel):
picture_set_id: UUID
name : Optional[str]=None
link : str
pictures: Optional[List[UUID]]=[]
children: Optional[List['PictureSet']]=[]

class PictureMetadata(BaseModel):
picture_id: Optional[UUID]=None
link: str
name: Optional[str]=None
upload_date: Optional[date]=date.today()
privacy_flag: Optional[bool]=False
description: Optional[str]=None

def build_picture_set_metadata(user_id: str, nb_picture: int):
"""
Expand All @@ -27,9 +43,9 @@ def build_picture_set_metadata(user_id: str, nb_picture: int):
upload_date=date.today(),
edited_by=str(user_id),
edit_date=date.today(),
change_log="picture_set created",
access_log="picture_set accessed",
privacy_flag=False,
change_log="Picture set created",
access_log="Picture set created",
)

picture_set_data = validator.ProcessedPictureSet(
Expand Down
Loading
Loading