Skip to content

Commit

Permalink
Rename crate zefiro-core -> zefiro-pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
nsyzrantsev committed Jan 8, 2025
1 parent 051830b commit 56d196d
Show file tree
Hide file tree
Showing 25 changed files with 37 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Verify package
run: cargo verify-project --manifest-path zefiro-core/zefiro-core-cwl/Cargo.toml
run: cargo verify-project --manifest-path zefiro-core/zefiro-cwl-parser/Cargo.toml
- name: Set the release version
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Publish the zefiro-core-cwl library
- name: Publish the zefiro-cwl-parser library
run: |
cargo publish --manifest-path zefiro-core/zefiro-core-cwl/Cargo.toml \
cargo publish --manifest-path zefiro-core/zefiro-cwl-parser/Cargo.toml \
--locked --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[workspace]
members = [
"zefiro-cli",
"zefiro-core",
"zefiro-core/zefiro-core-cwl",
"zefiro-pipeline",
"zefiro-pipeline/zefiro-cwl-parser",
"zefiro-ui"
]
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
**Code**: [![codecov](https://codecov.io/gh/zefiroproj/zefiro/graph/badge.svg?token=5DgmM1KzuQ)](https://codecov.io/gh/zefiroproj/zefiro)

# Zefiro - fast, scalable and simple engine to manage workflows
# Zefiro - fast, scalable and simple engine to manage workflows

⚠️ This project is a Work In Progress, and is very far from being suitable for use ⚠️
6 changes: 3 additions & 3 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ export GIT_CLIFF_TEMPLATE="\
- {% if commit.breaking %}(breaking) {% endif %}{{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end=\"\") }})\
{% endfor %}
{% endfor %}"
if [ ! -f "examples/detailed.toml" ]; then
echo "Error: examples/detailed.toml not found"
if [ ! -f "test_data/detailed.toml" ]; then
echo "Error: test_data/detailed.toml not found"
exit 1
fi
changelog=$(git cliff --config examples/detailed.toml --unreleased --strip all)
changelog=$(git cliff --config test_data/detailed.toml --unreleased --strip all)

# create a signed tag
git -c user.name="zefiro" \
Expand Down
4 changes: 0 additions & 4 deletions zefiro-core/zefiro-core-cwl/examples/cwl/clt-step-values.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "zefiro-core-cwl"
name = "zefiro-cwl-parser"
version = "0.1.0"
description = """
"The Common Workflow Language (CWL) object model that used in `zefiro`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# zefiro-core-cwl
# zefiro-cwl-parser

A Rust library for parsing and working with Common Workflow Language (CWL) documents.

Expand All @@ -13,18 +13,18 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
zefiro-core-cwl = "0.1.0"
zefiro-cwl-parser = "0.1.0"
```


### How to parse CWL Schema document?

```rust
use zefiro_core_cwl::CwlSchema;
use zefiro_cwl_parser::CwlSchema;

fn main() -> Result<(), Box<dyn std::error::Error>> {
// Parse from file
let schema = CwlSchema::from_path("examples/cwl/clt-step-schema.yml").unwrap();
let schema = CwlSchema::from_path("test_data/cwl/clt-step-schema.yml").unwrap();

// Parse from string
let yaml_str = r#"
Expand Down Expand Up @@ -65,12 +65,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
### How to parse CWL Values document?

```rust
use zefiro_core_cwl::CwlValues;
use zefiro_cwl_parser::CwlValues;


fn main() -> Result<(), Box<dyn std::error::Error>> {
// Parse input values from file
let values = CwlValues::from_path("examples/cwl/clt-step-values.yml").unwrap();
let values = CwlValues::from_path("test_data/cwl/clt-step-values.yml").unwrap();

// Create values from string
let yaml_input = r#"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ impl CwlSchema {
/// Deserializes YAML `file` containing CWL values into CwlSchema structure.
///
/// ```
/// use zefiro_core_cwl::schema::document::CwlSchema;
/// use zefiro_cwl_parser::schema::document::CwlSchema;
///
/// let yaml_file = "examples/cwl/clt-step-schema.yml";
/// let yaml_file = "test_data/cwl/clt-step-schema.yml";
///
/// let values = CwlSchema::from_path(yaml_file).expect("Failed to deserialize CWL values document");
/// ```
Expand Down Expand Up @@ -61,7 +61,7 @@ impl CwlSchema {
///
/// ```
/// use serde_yaml::Value;
/// use zefiro_core_cwl::schema::document::CwlSchema;
/// use zefiro_cwl_parser::schema::document::CwlSchema;
///
/// let yaml_str = r#"
/// cwlVersion: v1.2
Expand Down Expand Up @@ -106,11 +106,11 @@ impl CwlSchema {

/// Serializes CwlSchema structure and writes it into `file`.
/// ```
/// use zefiro_core_cwl::schema::document::CwlSchema;
/// use zefiro_cwl_parser::schema::document::CwlSchema;
/// use std::fs::File;
/// use std::io::BufWriter;
///
/// let yaml_file = "examples/cwl/clt-step-schema.yml";
/// let yaml_file = "test_data/cwl/clt-step-schema.yml";
/// let schema = CwlSchema::from_path(yaml_file).expect("Failed to serialize CWL schema document");
/// let mut tmpfile = tempfile::tempfile().unwrap();
/// let mut writer = BufWriter::new(tmpfile);
Expand All @@ -137,15 +137,15 @@ mod tests {
use std::io::{Error, ErrorKind, Write};

#[rstest]
#[case("examples/cwl/clt-step-schema.yml")]
#[case("examples/cwl/wf-step-schema.yml")]
#[case("test_data/cwl/clt-step-schema.yml")]
#[case("test_data/cwl/wf-step-schema.yml")]
fn test_cwlschema_from_path(#[case] file_path: &str) {
CwlSchema::from_path(file_path).expect("Failed to deserialize CWL schema document");
}

#[rstest]
#[case("examples/cwl/clt-step-schema.yml")]
#[case("examples/cwl/wf-step-schema.yml")]
#[case("test_data/cwl/clt-step-schema.yml")]
#[case("test_data/cwl/wf-step-schema.yml")]
fn test_cwlschema_to_yaml(#[case] file_path: &str) {
let values = CwlSchema::from_path(file_path).expect("Failed to deserialize CWL schema");
let temp_file = tempfile::NamedTempFile::new().unwrap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ impl CwlValues {
/// Deserializes YAML `file` containing CWL values into CwlValues structure.
///
/// ```
/// use zefiro_core_cwl::values::document::CwlValues;
/// let yaml_file = "examples/cwl/clt-step-values.yml";
/// use zefiro_cwl_parser::values::document::CwlValues;
/// let yaml_file = "test_data/cwl/clt-step-values.yml";
/// let values = CwlValues::from_path(yaml_file).expect("Failed to deserialize CWL values document");
/// ```
pub fn from_path(path: &str) -> Result<Self, Error> {
Expand All @@ -49,7 +49,7 @@ impl CwlValues {
/// Deserializes YAML `string` containing CWL values into CwlValues structure.
///
/// ```
/// use zefiro_core_cwl::values::document::CwlValues;
/// use zefiro_cwl_parser::values::document::CwlValues;
///
/// let yaml_input = r#"
/// in_file:
Expand Down Expand Up @@ -78,7 +78,7 @@ impl CwlValues {
/// Serializes CwlValues structure and writes it into `file`.
///
/// ```
/// use zefiro_core_cwl::values::document::CwlValues;
/// use zefiro_cwl_parser::values::document::CwlValues;
/// use std::io::BufWriter;
///
/// let yaml_input = r#"
Expand Down Expand Up @@ -109,13 +109,13 @@ mod tests {
use std::io::BufWriter;

#[rstest]
#[case("examples/cwl/clt-step-values.yml")]
#[case("test_data/cwl/clt-step-values.yml")]
fn test_cwlvalues_from_path(#[case] file_path: &str) {
CwlValues::from_path(file_path).expect("Failed to deserialize CWL values document");
}

#[rstest]
#[case("examples/cwl/clt-step-values.yml")]
#[case("test_data/cwl/clt-step-values.yml")]
fn test_cwlvalues_to_yaml(#[case] file_path: &str) {
let values = CwlValues::from_path(file_path).expect("Failed to deserialize CWL values");
let temp_file = tempfile::NamedTempFile::new().unwrap();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
in_file:
class: File
location: 'test_data/inputs/file.txt'
out_file: 'test_data/inputs/output.txt'

0 comments on commit 56d196d

Please sign in to comment.