Skip to content

Commit

Permalink
[core-api][experimental] source code metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenKephart committed Dec 23, 2024
1 parent 779783d commit 1138493
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import TYPE_CHECKING, Any, Callable, List, Optional, Sequence, Union

import dagster._check as check
from dagster._annotations import experimental, public
from dagster._annotations import beta, public
from dagster._core.definitions.metadata.metadata_set import (
NamespacedMetadataSet as NamespacedMetadataSet,
TableMetadataSet as TableMetadataSet,
Expand All @@ -22,7 +22,7 @@
DEFAULT_SOURCE_FILE_KEY = "asset_definition"


@experimental
@beta
@whitelist_for_serdes
class LocalFileCodeReference(DagsterModel):
"""Represents a local file source location."""
Expand All @@ -32,7 +32,7 @@ class LocalFileCodeReference(DagsterModel):
label: Optional[str] = None


@experimental
@beta
@whitelist_for_serdes
class UrlCodeReference(DagsterModel):
"""Represents a source location which points at a URL, for example
Expand All @@ -43,7 +43,7 @@ class UrlCodeReference(DagsterModel):
label: Optional[str] = None


@experimental
@beta
@whitelist_for_serdes
class CodeReferencesMetadataValue(DagsterModel, MetadataValue["CodeReferencesMetadataValue"]):
"""Metadata value type which represents source locations (locally or otherwise)
Expand Down Expand Up @@ -148,7 +148,7 @@ def _with_code_source_single_definition(
)


@experimental
@beta
class FilePathMapping(ABC):
"""Base class which defines a file path mapping function. These functions are used to map local file paths
to their corresponding paths in a source control repository.
Expand All @@ -172,7 +172,7 @@ def convert_to_source_control_path(self, local_path: Path) -> str:
"""


@experimental
@beta
@dataclass
class AnchorBasedFilePathMapping(FilePathMapping):
"""Specifies the mapping between local file paths and their corresponding paths in a source control repository,
Expand Down Expand Up @@ -291,7 +291,7 @@ def _build_gitlab_url(url: str, branch: str) -> str:
return f"{url}/-/tree/{branch}"


@experimental
@beta
def link_code_references_to_git(
assets_defs: Sequence[
Union["AssetsDefinition", "SourceAsset", "CacheableAssetsDefinition", "AssetSpec"]
Expand Down Expand Up @@ -353,7 +353,7 @@ def link_code_references_to_git(
]


@experimental
@beta
def with_source_code_references(
assets_defs: Sequence[
Union["AssetsDefinition", "SourceAsset", "CacheableAssetsDefinition", "AssetSpec"]
Expand Down

0 comments on commit 1138493

Please sign in to comment.