-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
2,819 additions
and
1,114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build Docs for releases | ||
|
||
on: | ||
workflow_dispatch: # run on request (no need for PR) | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
Build-Docs: | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: python -m pip install tox | ||
- name: Build-Docs | ||
run: | | ||
echo RELEASE_VERSION=${GITHUB_REF#refs/*/} >> $GITHUB_ENV | ||
tox -e build-doc | ||
# - name: Deploy | ||
# uses: peaceiris/actions-gh-pages@v3 | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# publish_dir: ./public | ||
# destination_dir: ${{ env.RELEASE_VERSION }} | ||
# force_orphan: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (C) 2023 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
from .merger import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright (C) 2023 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
from abc import ABC, abstractmethod | ||
from typing import Dict, Optional, Sequence, Type | ||
|
||
from datumaro.components.dataset_base import IDataset | ||
from datumaro.components.dataset_item_storage import ( | ||
DatasetItemStorage, | ||
DatasetItemStorageDatasetView, | ||
) | ||
from datumaro.components.media import MediaElement | ||
|
||
__all__ = ["IMerger"] | ||
|
||
|
||
class IMerger(ABC): | ||
@abstractmethod | ||
def merge_infos(self, sources: Sequence[IDataset]) -> Dict: | ||
raise NotImplementedError | ||
|
||
@abstractmethod | ||
def merge_categories(self, sources: Sequence[IDataset]) -> Dict: | ||
raise NotImplementedError | ||
|
||
@abstractmethod | ||
def merge_media_types(self, sources: Sequence[IDataset]) -> Optional[Type[MediaElement]]: | ||
raise NotImplementedError | ||
|
||
@abstractmethod | ||
def merge(self, sources: Sequence[IDataset]) -> DatasetItemStorage: | ||
raise NotImplementedError | ||
|
||
@abstractmethod | ||
def __call__(self, *datasets: IDataset) -> DatasetItemStorageDatasetView: | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.