Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
workflow_dispatch:

env:
RUST_VERSION: 1.83.0
RUST_VERSION: 1.84.0

jobs:
pre-commit:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env:
name: row
CARGO_TERM_COLOR: always
CLICOLOR: 1
RUST_VERSION: 1.83.0
RUST_VERSION: 1.84.0

jobs:
source:
Expand Down
4 changes: 2 additions & 2 deletions src/cli/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ value_file = "signac_statepoint.json""#
if args.workspace != "workspace" {
let _ = writeln!(
workflow,
r#"[workspace]
path = '{}'"#,
r"[workspace]
path = '{}'",
args.workspace
);
}
Expand Down
14 changes: 7 additions & 7 deletions src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,14 @@ impl Partition {
return false;
}

if self.maximum_cpus_per_job.map_or(false, |x| total_cpus > x) {
if self.maximum_cpus_per_job.is_some_and(|x| total_cpus > x) {
let _ = writeln!(reason, "{}: Too many CPUs ({}).", self.name, total_cpus);
return false;
}

if self
.require_cpus_multiple_of
.map_or(false, |x| total_cpus % x != 0)
.is_some_and(|x| total_cpus % x != 0)
{
let _ = writeln!(
reason,
Expand All @@ -304,7 +304,7 @@ impl Partition {

if self
.warn_cpus_not_multiple_of
.map_or(false, |x| total_cpus % x != 0)
.is_some_and(|x| total_cpus % x != 0)
{
warn!(
"{}: CPUs ({}) not a preferred multiple.",
Expand All @@ -313,12 +313,12 @@ impl Partition {
return true; // Issuing this warning does not prevent use of the partition.
}

if self.minimum_gpus_per_job.map_or(false, |x| total_gpus < x) {
if self.minimum_gpus_per_job.is_some_and(|x| total_gpus < x) {
let _ = writeln!(reason, "{}: Not enough GPUs ({}).", self.name, total_gpus);
return false;
}

if self.maximum_gpus_per_job.map_or(false, |x| total_gpus > x) {
if self.maximum_gpus_per_job.is_some_and(|x| total_gpus > x) {
let _ = writeln!(reason, "{}: Too many GPUs ({}).", self.name, total_gpus);
return false;
}
Expand All @@ -329,7 +329,7 @@ impl Partition {
}
if self
.require_gpus_multiple_of
.map_or(false, |x| total_gpus == 0 || total_gpus % x != 0)
.is_some_and(|x| total_gpus == 0 || total_gpus % x != 0)
{
let _ = writeln!(
reason,
Expand All @@ -341,7 +341,7 @@ impl Partition {

if self
.warn_gpus_not_multiple_of
.map_or(false, |x| total_gpus == 0 || total_gpus % x != 0)
.is_some_and(|x| total_gpus == 0 || total_gpus % x != 0)
{
warn!(
"{}: GPUs ({}) not a preferred multiple. ",
Expand Down
4 changes: 2 additions & 2 deletions src/scheduler/bash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ impl<'a> BashScriptBuilder<'a> {

let _ = write!(
result,
r#"
r"
export ACTION_WORKSPACE_PATH={}
export ACTION_CLUSTER={}
export ACTION_NAME={}
export ACTION_PROCESSES={}
export ACTION_WALLTIME_IN_MINUTES={}
"#,
",
<shell_quote::Bash as Quote<String>>::quote(
self.workspace_path
.to_str()
Expand Down