Skip to main content

openjd_model/
lib.rs

1// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2// Copyright by contributors to this project.
3// SPDX-License-Identifier: (Apache-2.0 OR MIT)
4
5//! Open Job Description model library for Rust.
6//!
7//! Provides parsing, validation, and job creation for OpenJD templates
8//! conforming to the 2023-09 specification.
9
10pub mod error;
11pub mod job;
12pub(crate) mod template;
13pub use job::create_job;
14pub use job::step_dependency_graph;
15pub use job::step_param_space;
16pub use template::parse;
17pub use template::{EnvironmentTemplate, JobParameterDefinition, JobTemplate};
18pub mod capabilities;
19pub mod types;
20
21// Re-export FormatString and SymbolTable from openjd-expr.
22pub use openjd_expr::format_string;
23pub use openjd_expr::format_string::FormatString;
24pub use openjd_expr::symbol_table;
25pub use openjd_expr::symbol_table::SymbolTable;
26
27#[cfg(test)]
28mod test_lazy_param_space;
29
30pub use error::ModelError;
31pub use error::{DiagnosticSpan, ErrorDetail};
32pub use error::{PathElement, ValidationError, ValidationErrors};
33pub use job::create_job::{
34    build_symbol_table, convert_environment, create_job, evaluate_let_bindings,
35    merge_job_parameter_definitions, preprocess_job_parameters, MergedParameterDefinition,
36    PathParameterOptions,
37};
38pub use parse::{
39    decode_environment_template, decode_job_template, decode_template, DecodedTemplate,
40    DocumentType,
41};
42pub use step_dependency_graph::StepDependencyGraph;
43pub use step_param_space::StepParameterSpaceIterator;
44pub use template::TaskParameterDefinition;
45pub use types::{
46    CallerLimits, DataFlow, EndOfLine, Extensions, FileType, JobParameterInputValues,
47    JobParameterType, JobParameterValue, JobParameterValues, ModelExtension, ModelProfile,
48    ObjectType, SpecificationRevision, TaskParameterSet, TaskParameterType, TaskParameterValue,
49    TemplateSpecificationVersion, ValidationContext,
50};
51
52#[cfg(test)]
53mod test_expr_param_constraints;
54#[cfg(test)]
55mod test_instantiate_and_display;