Skip to content

Commit

Permalink
Misc cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacemanPaul committed Dec 6, 2024
1 parent 9ea6fb4 commit f535fc6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion datacube/index/abstract/_lineage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
#
# Copyright (c) 2015-2024 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
import logging
from abc import ABC, abstractmethod
from time import monotonic
from typing import Mapping, Iterable
from uuid import UUID

from datacube.index.abstract import DSID, BatchStatus, _LOG
from datacube.model import LineageTree, LineageDirection, LineageRelation
from datacube.model.lineage import LineageRelations
from datacube.utils import report_to_user

from ._types import DSID, BatchStatus

_LOG = logging.getLogger(__name__)


class AbstractLineageResource(ABC):
"""
Expand Down
6 changes: 5 additions & 1 deletion datacube/index/abstract/_metadata_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
#
# Copyright (c) 2015-2024 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
import logging
from abc import ABC, abstractmethod
from pathlib import Path
from time import monotonic
from typing import Iterable, cast

from datacube.index.abstract import BatchStatus, _LOG
from datacube.model import MetadataType
from datacube.utils import read_documents, jsonify_document, InvalidDocException
from datacube.utils.changes import DocumentMismatchError, check_doc_unchanged, Change
from datacube.utils.documents import JsonDict

from ._types import BatchStatus

_LOG = logging.getLogger(__name__)

_DEFAULT_METADATA_TYPES_PATH = Path(__file__).parent.joinpath('default-metadata-types.yaml')


Expand Down
2 changes: 1 addition & 1 deletion datacube/index/memory/_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
from typing import Any, Mapping
from datacube.model.fields import SimpleField, Field, get_dataset_fields as generic_get_dataset_fields
from datacube.index.abstract import Offset
from datacube.utils.changes import Offset


# TODO: SimpleFields cannot handle non-metadata fields because e.g. the extract API expects a doc, not a Dataset model
Expand Down

0 comments on commit f535fc6

Please sign in to comment.