Skip to content

Commit

Permalink
add dois to collection entry
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed May 23, 2024
1 parent 0ef088b commit c6f72ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion bioimageio_collection_backoffice/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from bioimageio.spec.utils import download
from loguru import logger
from ruyaml import YAML
from typing_extensions import Literal, assert_never

from ._settings import settings
from .remote_collection import Record, RemoteCollection
Expand Down
2 changes: 2 additions & 0 deletions bioimageio_collection_backoffice/collection_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class CollectionEntry(Node, frozen=True):
type: Literal["application", "model", "notebook", "dataset"]
versions: Sequence[str]
"""available versions of this resource. newest first"""
dois: Sequence[Optional[str]]
"""version specific dois of the available versions. newest first"""


class CollectionWebsiteConfig(CollectionWebsiteConfigTemplate, frozen=True):
Expand Down
4 changes: 2 additions & 2 deletions bioimageio_collection_backoffice/remote_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
Union,
)

from bioimageio.spec import ValidationContext, build_description
from bioimageio.spec.collection import CollectionDescr
from bioimageio.spec import ValidationContext
from bioimageio.spec.common import HttpUrl
from bioimageio.spec.utils import (
download,
Expand Down Expand Up @@ -975,5 +974,6 @@ def maybe_swap_with_thumbnail(
training_data=rdf["training_data"] if "training_data" in rdf else None,
type=rdf["type"],
versions=[v.version for v in versions],
dois=[v.doi for v in versions],
)
]

0 comments on commit c6f72ac

Please sign in to comment.