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

Rename peace_resources to peace_resources_rt. #193

Merged
merged 6 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
* Move `Cli*` types to `peace_cli` crate under `cli::output` module. ([#182], [#189])
* Move `OutputFormat` and `OutputFormatParseError` to `peace_cli_model` crate. ([#182], [#189])
* Render progress and outcome diagram using `dot_ix`. ([#182], [#189], [#191])
* Experimented renaming `Item` trait to `Step` (reverted). ([#187], [#192])
* Rename `peace_resources` crate to `peace_resources_rt`. ([#182], [#187], [#193])


[#182]: https://github.com/azriel91/peace/issues/182
[#187]: https://github.com/azriel91/peace/issues/187
[#189]: https://github.com/azriel91/peace/pull/189
[#191]: https://github.com/azriel91/peace/pull/191
[#192]: https://github.com/azriel91/peace/pull/192
[#193]: https://github.com/azriel91/peace/pull/193


## 0.0.13 (2024-02-03)
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ peace_diff = { workspace = true }
peace_flow_model = { workspace = true }
peace_fmt = { workspace = true }
peace_params = { workspace = true }
peace_resources = { workspace = true }
peace_resources_rt = { workspace = true }
peace_rt = { workspace = true }
peace_rt_model = { workspace = true }
peace_webi = { workspace = true, optional = true }
Expand Down Expand Up @@ -118,7 +118,7 @@ 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" }
peace_resources = { path = "crate/resources", version = "0.0.13" }
peace_resources_rt = { path = "crate/resources_rt", version = "0.0.13" }
peace_rt = { path = "crate/rt", version = "0.0.13" }
peace_rt_model = { path = "crate/rt_model", version = "0.0.13" }
peace_rt_model_core = { path = "crate/rt_model_core", version = "0.0.13" }
Expand Down
2 changes: 1 addition & 1 deletion crate/cfg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enser = { workspace = true }
peace_core = { workspace = true }
peace_data = { workspace = true }
peace_params = { workspace = true }
peace_resources = { workspace = true }
peace_resources_rt = { workspace = true }
serde = { workspace = true, features = ["derive"] }
tynm = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion crate/cfg/src/accessors/stored.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use peace_data::{
},
Data,
};
use peace_resources::{states::StatesCurrentStored, type_reg::untagged::DataType};
use peace_resources_rt::{states::StatesCurrentStored, type_reg::untagged::DataType};
use serde::Serialize;

/// The previously stored `T` state, if any.
Expand Down
2 changes: 1 addition & 1 deletion crate/cfg/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use dyn_clone::DynClone;
use peace_core::{ApplyCheck, ItemId};
use peace_data::Data;
use peace_params::{Params, ParamsSpec};
use peace_resources::{resources::ts::Empty, Resources};
use peace_resources_rt::{resources::ts::Empty, Resources};
use serde::{de::DeserializeOwned, Serialize};

use crate::FnCtx;
Expand Down
2 changes: 1 addition & 1 deletion crate/cmd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ peace_cfg = { workspace = true }
peace_code_gen = { workspace = true }
peace_core = { workspace = true }
peace_params = { workspace = true }
peace_resources = { workspace = true }
peace_resources_rt = { workspace = true }
peace_rt_model = { workspace = true }
peace_value_traits = { workspace = true }
serde = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions crate/cmd/src/ctx/cmd_ctx_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use interruptible::Interruptibility;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_cfg::ItemId;
use peace_params::ParamsSpecs;
use peace_resources::{
use peace_resources_rt::{
internal::{FlowParamsFile, ProfileParamsFile, WorkspaceParamsFile},
paths::ParamsSpecsFile,
resources::ts::{Empty, SetUp},
Expand Down Expand Up @@ -165,7 +165,7 @@ fn flow_params_insert<FlowParamsK>(

#[cfg(not(target_arch = "wasm32"))]
pub(crate) async fn profiles_from_peace_app_dir(
peace_app_dir: &peace_resources::paths::PeaceAppDir,
peace_app_dir: &peace_resources_rt::paths::PeaceAppDir,
profiles_filter_fn: Option<&dyn Fn(&peace_core::Profile) -> bool>,
) -> Result<Vec<peace_core::Profile>, peace_rt_model::Error> {
use std::{ffi::OsStr, str::FromStr};
Expand Down Expand Up @@ -237,7 +237,7 @@ pub(crate) async fn profiles_from_peace_app_dir(

#[cfg(target_arch = "wasm32")]
pub(crate) async fn profiles_from_peace_app_dir(
_peace_app_dir: &peace_resources::paths::PeaceAppDir,
_peace_app_dir: &peace_resources_rt::paths::PeaceAppDir,
_profiles_filter_fn: Option<&dyn Fn(&peace_core::Profile) -> bool>,
) -> Result<Vec<peace_core::Profile>, peace_rt_model::Error> {
let profiles = Vec::new();
Expand Down
4 changes: 3 additions & 1 deletion crate/cmd/src/scopes/multi_profile_no_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ use std::{collections::BTreeMap, fmt::Debug, hash::Hash};
use interruptible::InterruptibilityState;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_core::Profile;
use peace_resources::paths::{PeaceAppDir, PeaceDir, ProfileDir, ProfileHistoryDir, WorkspaceDir};
use peace_resources_rt::paths::{
PeaceAppDir, PeaceDir, ProfileDir, ProfileHistoryDir, WorkspaceDir,
};
use peace_rt_model::{
params::{
KeyKnown, KeyMaybe, ParamsKeys, ParamsKeysImpl, ParamsTypeRegs, ProfileParams,
Expand Down
20 changes: 10 additions & 10 deletions crate/cmd/src/scopes/multi_profile_single_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use interruptible::InterruptibilityState;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_core::Profile;
use peace_params::ParamsSpecs;
use peace_resources::{
use peace_resources_rt::{
paths::{FlowDir, PeaceAppDir, PeaceDir, ProfileDir, ProfileHistoryDir, WorkspaceDir},
resources::ts::SetUp,
states::StatesCurrentStored,
Expand Down Expand Up @@ -131,7 +131,7 @@ where
/// This is used to deserialize [`ParamsSpecsFile`].
///
/// [`Params`]: peace_cfg::Item::Params
/// [`ParamsSpecsFile`]: peace_resources::paths::ParamsSpecsFile
/// [`ParamsSpecsFile`]: peace_resources_rt::paths::ParamsSpecsFile
params_specs_type_reg: ParamsSpecsTypeReg,
/// Item params specs for each profile for the selected flow.
profile_to_params_specs: BTreeMap<Profile, Option<ParamsSpecs>>,
Expand All @@ -140,8 +140,8 @@ where
/// This is used to deserialize [`StatesCurrentFile`] and
/// [`StatesGoalFile`].
///
/// [`StatesCurrentFile`]: peace_resources::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources::paths::StatesGoalFile
/// [`StatesCurrentFile`]: peace_resources_rt::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources_rt::paths::StatesGoalFile
states_type_reg: StatesTypeReg,
/// `Resources` for flow execution.
resources: Resources<SetUp>,
Expand Down Expand Up @@ -207,7 +207,7 @@ where
/// This is used to deserialize [`ParamsSpecsFile`].
///
/// [`Params`]: peace_cfg::Item::Params
/// [`ParamsSpecsFile`]: peace_resources::paths::ParamsSpecsFile
/// [`ParamsSpecsFile`]: peace_resources_rt::paths::ParamsSpecsFile
pub params_specs_type_reg: &'view ParamsSpecsTypeReg,
/// Item params specs for each profile for the selected flow.
pub profile_to_params_specs: &'view BTreeMap<Profile, Option<ParamsSpecs>>,
Expand All @@ -216,8 +216,8 @@ where
/// This is used to deserialize [`StatesCurrentFile`] and
/// [`StatesGoalFile`].
///
/// [`StatesCurrentFile`]: peace_resources::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources::paths::StatesGoalFile
/// [`StatesCurrentFile`]: peace_resources_rt::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources_rt::paths::StatesGoalFile
pub states_type_reg: &'view StatesTypeReg,
/// `Resources` for flow execution.
pub resources: &'view mut Resources<SetUp>,
Expand Down Expand Up @@ -423,7 +423,7 @@ where
/// This is used to deserialize [`ParamsSpecsFile`].
///
/// [`Params`]: peace_cfg::Item::Params
/// [`ParamsSpecsFile`]: peace_resources::paths::ParamsSpecsFile
/// [`ParamsSpecsFile`]: peace_resources_rt::paths::ParamsSpecsFile
pub fn params_specs_type_reg(&self) -> &ParamsSpecsTypeReg {
&self.params_specs_type_reg
}
Expand All @@ -439,8 +439,8 @@ where
/// This is used to deserialize [`StatesCurrentFile`] and
/// [`StatesGoalFile`].
///
/// [`StatesCurrentFile`]: peace_resources::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources::paths::StatesGoalFile
/// [`StatesCurrentFile`]: peace_resources_rt::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources_rt::paths::StatesGoalFile
pub fn states_type_reg(&self) -> &StatesTypeReg {
&self.states_type_reg
}
Expand Down
2 changes: 1 addition & 1 deletion crate/cmd/src/scopes/no_profile_no_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{fmt::Debug, hash::Hash};

use interruptible::InterruptibilityState;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_resources::paths::{PeaceAppDir, PeaceDir, WorkspaceDir};
use peace_resources_rt::paths::{PeaceAppDir, PeaceDir, WorkspaceDir};
use peace_rt_model::{
params::{KeyKnown, KeyMaybe, ParamsKeys, ParamsKeysImpl, ParamsTypeRegs, WorkspaceParams},
Workspace,
Expand Down
4 changes: 3 additions & 1 deletion crate/cmd/src/scopes/single_profile_no_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ use std::{fmt::Debug, hash::Hash};
use interruptible::InterruptibilityState;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_core::Profile;
use peace_resources::paths::{PeaceAppDir, PeaceDir, ProfileDir, ProfileHistoryDir, WorkspaceDir};
use peace_resources_rt::paths::{
PeaceAppDir, PeaceDir, ProfileDir, ProfileHistoryDir, WorkspaceDir,
};
use peace_rt_model::{
params::{
KeyKnown, KeyMaybe, ParamsKeys, ParamsKeysImpl, ParamsTypeRegs, ProfileParams,
Expand Down
20 changes: 10 additions & 10 deletions crate/cmd/src/scopes/single_profile_single_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use interruptible::InterruptibilityState;
use own::{OwnedOrMutRef, OwnedOrRef};
use peace_core::Profile;
use peace_params::ParamsSpecs;
use peace_resources::{
use peace_resources_rt::{
paths::{FlowDir, PeaceAppDir, PeaceDir, ProfileDir, ProfileHistoryDir, WorkspaceDir},
resources::ts::SetUp,
Resources,
Expand Down Expand Up @@ -106,7 +106,7 @@ where
/// This is used to deserialize [`ParamsSpecsFile`].
///
/// [`Params`]: peace_cfg::Item::Params
/// [`ParamsSpecsFile`]: peace_resources::paths::ParamsSpecsFile
/// [`ParamsSpecsFile`]: peace_resources_rt::paths::ParamsSpecsFile
params_specs_type_reg: ParamsSpecsTypeReg,
/// Item params specs for the selected flow.
params_specs: ParamsSpecs,
Expand All @@ -115,8 +115,8 @@ where
/// This is used to deserialize [`StatesCurrentFile`] and
/// [`StatesGoalFile`].
///
/// [`StatesCurrentFile`]: peace_resources::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources::paths::StatesGoalFile
/// [`StatesCurrentFile`]: peace_resources_rt::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources_rt::paths::StatesGoalFile
states_type_reg: StatesTypeReg,
/// `Resources` for flow execution.
resources: Resources<SetUp>,
Expand Down Expand Up @@ -199,7 +199,7 @@ where
/// This is used to deserialize [`ParamsSpecsFile`].
///
/// [`Params`]: peace_cfg::Item::Params
/// [`ParamsSpecsFile`]: peace_resources::paths::ParamsSpecsFile
/// [`ParamsSpecsFile`]: peace_resources_rt::paths::ParamsSpecsFile
pub params_specs_type_reg: &'view ParamsSpecsTypeReg,
/// Item params specs for the selected flow.
pub params_specs: &'view ParamsSpecs,
Expand All @@ -208,8 +208,8 @@ where
/// This is used to deserialize [`StatesCurrentFile`] and
/// [`StatesGoalFile`].
///
/// [`StatesCurrentFile`]: peace_resources::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources::paths::StatesGoalFile
/// [`StatesCurrentFile`]: peace_resources_rt::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources_rt::paths::StatesGoalFile
pub states_type_reg: &'view StatesTypeReg,
/// `Resources` for flow execution.
pub resources: &'view mut Resources<SetUp>,
Expand Down Expand Up @@ -485,7 +485,7 @@ where
/// This is used to deserialize [`ParamsSpecsFile`].
///
/// [`Params`]: peace_cfg::Item::Params
/// [`ParamsSpecsFile`]: peace_resources::paths::ParamsSpecsFile
/// [`ParamsSpecsFile`]: peace_resources_rt::paths::ParamsSpecsFile
pub fn params_specs_type_reg(&self) -> &ParamsSpecsTypeReg {
&self.params_specs_type_reg
}
Expand All @@ -500,8 +500,8 @@ where
/// This is used to deserialize [`StatesCurrentFile`] and
/// [`StatesGoalFile`].
///
/// [`StatesCurrentFile`]: peace_resources::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources::paths::StatesGoalFile
/// [`StatesCurrentFile`]: peace_resources_rt::paths::StatesCurrentFile
/// [`StatesGoalFile`]: peace_resources_rt::paths::StatesGoalFile
pub fn states_type_reg(&self) -> &StatesTypeReg {
&self.states_type_reg
}
Expand Down
2 changes: 1 addition & 1 deletion crate/cmd_rt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ miette = { workspace = true, optional = true }
peace_cfg = { workspace = true }
peace_cmd_model = { workspace = true }
peace_cmd = { workspace = true }
peace_resources = { workspace = true }
peace_resources_rt = { workspace = true }
peace_rt_model = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["sync"] }
Expand Down
2 changes: 1 addition & 1 deletion crate/cmd_rt/src/cmd_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::fmt::Debug;
use async_trait::async_trait;
use peace_cmd::{ctx::CmdCtxTypesConstrained, scopes::SingleProfileSingleFlowView};
use peace_cmd_model::CmdBlockOutcome;
use peace_resources::{resources::ts::SetUp, Resource, ResourceFetchError, Resources};
use peace_resources_rt::{resources::ts::SetUp, Resource, ResourceFetchError, Resources};

cfg_if::cfg_if! {
if #[cfg(feature = "output_progress")] {
Expand Down
2 changes: 1 addition & 1 deletion crate/cmd_rt/src/cmd_block/cmd_block_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::fmt::Debug;
use fn_graph::StreamOutcome;
use indexmap::IndexMap;
use peace_cfg::ItemId;
use peace_resources::ResourceFetchError;
use peace_resources_rt::ResourceFetchError;

/// Error while executing a `CmdBlock`.
///
Expand Down
2 changes: 1 addition & 1 deletion crate/cmd_rt/src/cmd_block/cmd_block_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use async_trait::async_trait;
use fn_graph::StreamOutcomeState;
use peace_cmd::{ctx::CmdCtxTypesConstrained, scopes::SingleProfileSingleFlowView};
use peace_cmd_model::{CmdBlockDesc, CmdBlockOutcome};
use peace_resources::Resource;
use peace_resources_rt::Resource;

use tynm::TypeParamsFmtOpts;

Expand Down
2 changes: 1 addition & 1 deletion crate/cmd_rt/src/cmd_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use peace_cmd::{
},
};
use peace_cmd_model::{CmdBlockDesc, CmdOutcome};
use peace_resources::{resources::ts::SetUp, Resources};
use peace_resources_rt::{resources::ts::SetUp, Resources};

use crate::{CmdBlockError, CmdBlockRtBox, ItemStreamOutcomeMapper};

Expand Down
2 changes: 1 addition & 1 deletion crate/cmd_rt/src/cmd_execution/cmd_execution_builder.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{collections::VecDeque, fmt::Debug};

use peace_cmd::ctx::CmdCtxTypesConstrained;
use peace_resources::{resources::ts::SetUp, Resource, Resources};
use peace_resources_rt::{resources::ts::SetUp, Resource, Resources};

use crate::{CmdBlock, CmdBlockRtBox, CmdBlockWrapper, CmdExecution};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::fmt::Debug;

use peace_cmd::ctx::CmdCtxTypesConstrained;
use peace_cmd_model::{CmdBlockDesc, CmdExecutionError};
use peace_resources::ResourceFetchError;
use peace_resources_rt::ResourceFetchError;

use crate::CmdBlockRtBox;

Expand Down
Loading
Loading