gtristan commented on code in PR #1997:
URL: https://github.com/apache/buildstream/pull/1997#discussion_r1995830507


##########
src/buildstream/source.py:
##########
@@ -262,10 +262,123 @@ def __init__(
 
 @dataclass
 class AliasSubstitution:
+    """AliasSubstitution()
+    An opaque data structure which may be passed through
+    :func:`SourceFetcher.fetch() <buildstream.source.SourceFetcher.fetch>` and 
in such cases
+    must be provided to :func:`Source.translate_url() 
<buildstream.source.Source.translate_url>`.
+    """
+
     _effective_alias: str
     _mirror: Union[SourceMirror, str]
 
 
+class SourceInfoMedium(FastEnum):
+    """
+    Indicates the meduim in which the source is obtained
+
+    *Since: 2.5*
+    """
+
+    LOCAL = "local"
+    """
+    Files stored locally in the project
+    """
+
+    ARCHIVE = "archive"

Review Comment:
   Interesting, I consider the *medium* type as the *means in which the data is 
stored*, and not what the downloaded data *actually is*.
   
   I.e. the medium here explains that it comes from the project itself, while a 
git medium used a `git` protocol to download, and `archive` downloaded a file.
   
   I rather lean the other way here and think that `ARCHIVE` may be renamed to 
`REMOTE_FILE` or such, and this would make sense for any 
`DownloadableFileSource`.
   
   When considering this, I'm trying  to balance:
   * What is useful for interoperability with external tooling
   * What is needed to logically describe the provenance of the source, for 
reporting purposes
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to