Coretex
coretex.coretex.experiment.artifact.ArtifactType Class Reference

Inherits IntEnum.

Static Public Member Functions

ArtifactType typeForPath (str path)
 

Detailed Description

    Available types of Artifacts on Coretex

Definition at line 32 of file artifact.py.

Member Function Documentation

◆ typeForPath()

ArtifactType coretex.coretex.experiment.artifact.ArtifactType.typeForPath ( str  path)
static
    Retrieve ArtifactType based on provided path

    Parameters
    ----------
    path : str
path to Artifact

Definition at line 42 of file artifact.py.

42  def typeForPath(path: str) -> ArtifactType:
43  """
44  Retrieve ArtifactType based on provided path
45 
46  Parameters
47  ----------
48  path : str
49  path to Artifact
50  """
51 
52  if os.path.isdir(path):
53  return ArtifactType.directory
54 
55  if os.path.isfile(path):
56  return ArtifactType.file
57 
58  raise RuntimeError(">> [Coretex] Unreachable")
59 
60 

The documentation for this class was generated from the following file: