Skip to main content

entrenar/research/artifact/
artifact_type.rs

1//! Type of research artifact.
2
3use serde::{Deserialize, Serialize};
4
5/// Type of research artifact
6#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
7pub enum ArtifactType {
8    /// Structured data collection
9    Dataset,
10    /// Trained model weights
11    Model,
12    /// Source code
13    Code,
14    /// Academic paper or preprint
15    Paper,
16    /// Jupyter or computational notebook
17    Notebook,
18    /// Computational workflow (e.g., Snakemake, CWL)
19    Workflow,
20}
21
22impl std::fmt::Display for ArtifactType {
23    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24        match self {
25            Self::Dataset => write!(f, "Dataset"),
26            Self::Model => write!(f, "Model"),
27            Self::Code => write!(f, "Code"),
28            Self::Paper => write!(f, "Paper"),
29            Self::Notebook => write!(f, "Notebook"),
30            Self::Workflow => write!(f, "Workflow"),
31        }
32    }
33}