Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WebiOutput and render outcome diagram for flow. #189

Merged
merged 38 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e70a8cc
Split `cli` and `cli_model` crates from `rt_model_native`.
azriel91 Feb 5, 2024
6cb1998
Minor documentation correction in `CliOutput`.
azriel91 Feb 5, 2024
c438096
Add skeleton / scaffolding for `peace_webi` crate.
azriel91 Feb 5, 2024
c84a2a7
Add `peace_web_model` crate.
azriel91 Feb 5, 2024
9fcb806
Add skeleton web interface components.
azriel91 Feb 10, 2024
4fa7425
Get `envman` to use `webi` for leptos and cli with web server builds.
azriel91 Feb 8, 2024
d23c1dc
Get assets to be served from correct path.
azriel91 Feb 10, 2024
7fb1bd5
Get `trunk` to build `envman`.
azriel91 Feb 10, 2024
b42b7ea
Serve assets from `WebiOutput` by embedding them in the library.
azriel91 Feb 10, 2024
9c02837
Remove `envman` web server and components.
azriel91 Feb 11, 2024
4ef79f4
Collapse `T: Params + ..` additional bounds into `Params` supertraits.
azriel91 Feb 15, 2024
ae74737
Add `peace_flow_model` with initial data to transfer.
azriel91 Feb 16, 2024
2cb581b
First cut of getting `WebiOutput` to serve `FlowSpecGraph`.
azriel91 Feb 17, 2024
28792f6
Use `GraphStyle::Circle` to render `FlowSpecInfo` graph.
azriel91 Feb 17, 2024
a1a1837
Draw `outcome_dot_graph` next to `progress_dot_graph`.
azriel91 Feb 17, 2024
7d4a8a6
Use `add_logic_edges` and `use_contains_edges` between items.
azriel91 Feb 17, 2024
413c516
Add `diagrams.md` technical concept, with most info in `outcome.md`.
azriel91 Feb 20, 2024
60d68b3
Update dependency versions.
azriel91 Feb 23, 2024
4870f42
Update code for `miette` breaking changes.
azriel91 Feb 23, 2024
2fa93eb
Split `outcome.md` and add `html_flexbox.md`.
azriel91 Feb 26, 2024
deefe1f
Add `div_diag.md` notes.
azriel91 Mar 3, 2024
19fc5fd
Remove redundant imports.
azriel91 Mar 4, 2024
9ed50d7
Update `fn_graph` to `0.13.0` for `"graph_info"` feature.
azriel91 Mar 4, 2024
c270a0c
Pass pre-calculated `bucket_name` in params specs in `envman` flows.
azriel91 Mar 6, 2024
54fb00d
Remove unused commented code in `envman`.
azriel91 Mar 6, 2024
6940a21
Add design docs for `endpoints_and_interaction.md`.
azriel91 Mar 9, 2024
d5ac550
Install `mdbook-graphviz` from branch.
azriel91 Mar 9, 2024
e6c26d7
Build `envman` example with `--bin-features "cli"` in `ci.yml`.
azriel91 Mar 9, 2024
8180dcb
Edit `download` example dependencies to not enable `cli` when compili…
azriel91 Mar 9, 2024
cbcf918
Update dependency versions.
azriel91 Mar 9, 2024
062f6ad
Adjust `miette` features to allow WASM compilation.
azriel91 Mar 9, 2024
7465df5
Address clippy lints.
azriel91 Mar 9, 2024
224b34d
Update `S3BucketStateCurrentFn` to use non-deprecated `DateTime` method.
azriel91 Mar 9, 2024
12fffbb
Use `actions/checkout@v4` in github actions.
azriel91 Mar 9, 2024
70f6368
Remove debuginfo in coverage job.
azriel91 Mar 9, 2024
f80cc25
Add tests for `flow_model` types.
azriel91 Mar 10, 2024
f54c0f2
Add tests for `FlowSpecInfo::to_*_info_graph`.
azriel91 Mar 15, 2024
3cf4509
Address clippy lints.
azriel91 Mar 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: 'Install `wasm-pack`'
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1

- run: cargo install mdbook-graphviz
- run: cargo install mdbook-graphviz --git https://github.com/azriel91/mdbook-graphviz.git --branch maintenance/update-dependencies
if: steps.mdbook_graphviz_cache.outputs.cache-hit != 'true'

# When updating this, also update ci.yml
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: bp3d-actions/audit-check@9c23bd47e5e7b15b824739e0862cb878a52cc211
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -23,7 +23,7 @@ jobs:
name: Licenses
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1

- name: cargo-about cache
Expand All @@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
Expand All @@ -61,7 +61,7 @@ jobs:
RUSTDOCFLAGS: "-Dwarnings"
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Check spelling
Expand All @@ -74,7 +74,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
Expand All @@ -129,6 +129,9 @@ jobs:
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest

- name: 'Configure build to remove debuginfo'
run: echo $'\n[profile.dev]\ndebug = false' >> Cargo.toml

- name: 'Collect coverage'
run: ./coverage.sh

Expand All @@ -145,7 +148,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- uses: taiki-e/install-action@nextest
Expand All @@ -161,7 +164,7 @@ jobs:
- name: Prepare symlink configuration
run: git config --global core.symlinks true

- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- uses: taiki-e/install-action@nextest
Expand All @@ -173,7 +176,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: 'Example: download (native)'
Expand All @@ -187,7 +190,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
Expand All @@ -210,7 +213,7 @@ jobs:
run: cargo install --git https://github.com/leptos-rs/cargo-leptos.git --locked cargo-leptos

- name: 'Example: envman (leptos)'
run: cargo leptos build --project "envman" -v
run: cargo leptos build --project "envman" --bin-features "cli" -v

# When updating this, also update book.yml
- name: 'Example: download (WASM)'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: bp3d-actions/audit-check@9c23bd47e5e7b15b824739e0862cb878a52cc211
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- uses: taiki-e/install-action@nextest
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Prepare symlink configuration
run: git config --global core.symlinks true

- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- uses: taiki-e/install-action@nextest
Expand All @@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: cargo-release Cache
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist
/target
Cargo.lock
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ extend-exclude = [
]

[default.extend-words]
Lazer = "Lazer" # discord username
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## unreleased

* Move `Cli*` types to `peace_cli` crate under `cli::output` module. ([#182])
* Move `OutputFormat` and `OutputFormatParseError` to `peace_cli_model` crate. ([#182])


[#182]: https://github.com/azriel91/peace/issues/182


## 0.0.13 (2024-02-03)

* Provide more accurate feedback about interruption on CLI. ([#172], [#173])
Expand Down
91 changes: 66 additions & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,61 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
miette = { workspace = true, optional = true }
peace_cfg = { workspace = true }
peace_cmd_model = { workspace = true }
peace_cli = { workspace = true, optional = true }
peace_cli_model = { workspace = true, optional = true }
peace_cmd = { workspace = true }
peace_cmd_model = { workspace = true }
peace_cmd_rt = { workspace = true }
peace_data = { workspace = true }
peace_diff = { workspace = true }
peace_flow_model = { workspace = true }
peace_fmt = { workspace = true }
peace_params = { workspace = true }
peace_resources = { workspace = true }
peace_rt = { workspace = true }
peace_rt_model = { workspace = true }
peace_webi = { workspace = true, optional = true }
peace_webi_components = { workspace = true, optional = true }
peace_webi_model = { workspace = true, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
miette = { workspace = true, optional = true, features = ["fancy"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
miette = { workspace = true, optional = true, features = ["fancy-no-syscall"] }

[features]
default = []
cli = [
"dep:peace_cli",
"dep:peace_cli_model",
]
webi = [
"dep:peace_webi",
"dep:peace_webi_components",
"dep:peace_webi_model",
]
error_reporting = [
"dep:miette",
"miette?/fancy",
"peace_cmd_model/error_reporting",
"peace_cmd_rt/error_reporting",
"peace_params/error_reporting",
"peace_rt/error_reporting",
"peace_rt_model/error_reporting",
"peace_webi_model?/error_reporting",
]
output_in_memory = ["peace_rt_model/output_in_memory"]
output_in_memory = ["peace_cli?/output_in_memory"]
output_progress = [
"peace_cli?/output_progress",
"peace_cmd_rt/output_progress",
"peace_cfg/output_progress",
"peace_rt/output_progress",
"peace_rt_model/output_progress",
"peace_webi?/output_progress",
]
ssr = [
"peace_webi?/ssr",
"peace_webi_components?/ssr",
]

[workspace]
Expand All @@ -74,14 +101,17 @@ license = "MIT OR Apache-2.0"
peace = { path = ".", version = "0.0.13", default-features = false }

peace_cfg = { path = "crate/cfg", version = "0.0.13" }
peace_cmd_model = { path = "crate/cmd_model", version = "0.0.13" }
peace_cli = { path = "crate/cli", version = "0.0.13" }
peace_cli_model = { path = "crate/cli_model", version = "0.0.13" }
peace_cmd = { path = "crate/cmd", version = "0.0.13" }
peace_cmd_model = { path = "crate/cmd_model", version = "0.0.13" }
peace_cmd_rt = { path = "crate/cmd_rt", version = "0.0.13" }
peace_code_gen = { path = "crate/code_gen", version = "0.0.13" }
peace_core = { path = "crate/core", version = "0.0.13" }
peace_data = { path = "crate/data", version = "0.0.13" }
peace_data_derive = { path = "crate/data_derive", version = "0.0.13" }
peace_diff = { path = "crate/diff", version = "0.0.13" }
peace_flow_model = { path = "crate/flow_model", version = "0.0.13" }
peace_fmt = { path = "crate/fmt", version = "0.0.13" }
peace_params = { path = "crate/params", version = "0.0.13" }
peace_params_derive = { path = "crate/params_derive", version = "0.0.13" }
Expand All @@ -94,6 +124,10 @@ peace_rt_model_native = { path = "crate/rt_model_native", version = "0.0.13" }
peace_rt_model_web = { path = "crate/rt_model_web", version = "0.0.13" }
peace_static_check_macros = { path = "crate/static_check_macros", version = "0.0.13" }
peace_value_traits = { path = "crate/value_traits", version = "0.0.13" }
peace_webi = { path = "crate/webi", version = "0.0.13" }
peace_webi_components = { path = "crate/webi_components", version = "0.0.13" }
peace_webi_model = { path = "crate/webi_model", version = "0.0.13" }
peace_webi_output = { path = "crate/webi_output", version = "0.0.13" }

# Item crates
peace_items = { path = "items", version = "0.0.13" }
Expand All @@ -108,43 +142,50 @@ peace_item_tar_x = { path = "items/tar_x", version = "0.0.13" }
# This does not include examples' dependencies, because we want it to be easy for
# developers to see the dependencies to create an automation tool.
async-trait = "0.1.77"
base64 = "0.21.7"
axum = "0.7.4"
base64 = "0.22.0"
bytes = "1.5.0"
cfg-if = "1.0.0"
chrono = { version = "0.4.33", default-features = false, features = ["clock", "serde"] }
chrono = { version = "0.4.35", default-features = false, features = ["clock", "serde"] }
console = "0.15.8"
derivative = "2.2.0"
diff-struct = "0.5.3"
downcast-rs = "1.2.0"
dyn-clone = "1.0.16"
dot_ix = { version = "0.4.1", default-features = false }
dyn-clone = "1.0.17"
enser = "0.1.4"
erased-serde = "0.4.2"
fn_graph = { version = "0.12.0", features = ["async", "interruptible", "resman"] }
erased-serde = "0.4.3"
fn_graph = { version = "0.13.2", features = ["async", "graph_info", "interruptible", "resman"] }
futures = "0.3.30"
heck = "0.4.1"
indexmap = "2.1.0"
indicatif = "0.17.7"
indexmap = "2.2.5"
indicatif = "0.17.8"
interruptible = "0.2.1"
libc = "0.2.152"
miette = "5.10.0"
leptos = { version = "0.6" }
leptos_axum = "0.6"
leptos_meta = { version = "0.6" }
leptos_router = { version = "0.6" }
libc = "0.2.153"
miette = "7.2.0"
pretty_assertions = "1.4.0"
proc-macro2 = "1.0.78"
quote = "1.0.35"
raw_tty = "0.1.0"
reqwest = "0.11.23"
reqwest = "0.11.25"
resman = "0.17.0"
serde = "1.0.196"
serde-wasm-bindgen = "0.6.3"
serde_json = "1.0.112"
serde_yaml = "0.9.30"
syn = "2.0.48"
serde = "1.0.197"
serde-wasm-bindgen = "0.6.5"
serde_json = "1.0.114"
serde_yaml = "0.9.32"
syn = "2.0.52"
tar = "0.4.40"
tempfile = "3.9.0"
thiserror = "1.0.56"
tokio = "1.35.1"
tempfile = "3.10.1"
thiserror = "1.0.57"
tokio = "1.36"
tokio-util = "0.7.10"
tynm = "0.1.9"
tower-http = "0.5.2"
tynm = "0.1.10"
type_reg = { version = "0.7.0", features = ["debug", "untagged", "ordered"] }
url = "2.5.0"
wasm-bindgen = "0.2.90"
web-sys = "0.3.67"
wasm-bindgen = "0.2.92"
web-sys = "0.3.69"
20 changes: 18 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,28 @@ These instructions are for Linux. They may work on OS X, but for Windows, please

> ℹ️ These commands assume you are running them from the repository root directory.

Build and serve the `envman` example:
Build and serve the `envman` example. Either:

```bash
cargo leptos serve --project "envman" -v
# Watch, build, and `envman` purely as a web server.
cargo leptos watch --project "envman" -v
```

Or:

```bash
# Build `envman` as a cli tool.
cargo +stable leptos build --project envman --bin-features "cli" \
&& test -d /tmp/demo \
|| mkdir /tmp/demo \
&& cp -R target/{debug/envman,web/envman/pkg} /tmp/demo

# In a separate terminal
cd /tmp/demo
./envman web
```


### Uninstallation

To uninstall web tooling:
Expand Down
Loading
Loading