Skip to content

Commit

Permalink
run black
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Apr 22, 2023
1 parent 14913ef commit 02d9682
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 33 deletions.
1 change: 0 additions & 1 deletion dask_jobqueue/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,6 @@ def _get_worker_security(self, security):
for key, value in worker_security_dict.items():
# dump worker in-memory keys for use in job_script
if value is not None and "\n" in value:

try:
f = tempfile.NamedTemporaryFile(
mode="wt",
Expand Down
1 change: 0 additions & 1 deletion dask_jobqueue/oar.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


class OARJob(Job):

# Override class variables
submit_command = "oarsub"
cancel_command = "oardel"
Expand Down
4 changes: 0 additions & 4 deletions dask_jobqueue/tests/test_flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def test_header():
with FluxCluster(
walltime="00:02:00", processes=4, cores=8, memory="28GB"
) as cluster:

assert "#flux:" in cluster.job_header
assert "#flux: --job-name=dask-worker" in cluster.job_header
assert "#flux: -n 1" in cluster.job_header
Expand All @@ -32,14 +31,12 @@ def test_header():
job_cpu=16,
job_mem="100G",
) as cluster:

assert "#flux: --cores-per-task=16" in cluster.job_header
assert "#flux: --cores-per-task=8" not in cluster.job_header
assert "--mem=100G" not in cluster.job_header
assert "#flux: --queue=regular" in cluster.job_header

with FluxCluster(cores=4, memory="8GB") as cluster:

assert "#flux:" in cluster.job_header
assert "#flux: --job-name" in cluster.job_header
assert "#flux: -n 1" in cluster.job_header
Expand All @@ -51,7 +48,6 @@ def test_job_script():
with FluxCluster(
walltime="00:02:00", processes=4, cores=8, memory="28GB"
) as cluster:

job_script = cluster.job_script()
assert "#flux:" in job_script
assert "#flux: --job-name=dask-worker" in job_script
Expand Down
1 change: 0 additions & 1 deletion dask_jobqueue/tests/test_htcondor.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def test_extra_args_broken_cancel(loop):
cancel_command_extra=["-name", "wrong.docker"],
) as cluster:
with Client(cluster) as client:

cluster.scale(2)

client.wait_for_workers(2, timeout=QUEUE_WAIT)
Expand Down
2 changes: 0 additions & 2 deletions dask_jobqueue/tests/test_jobqueue_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ def get_interface_and_port(index=0):


def test_scheduler_options(Cluster):

interface, port = get_interface_and_port()

with Cluster(
Expand Down Expand Up @@ -321,7 +320,6 @@ def test_import_scheduler_options_from_config(Cluster):
with dask.config.set(
{"jobqueue.%s.scheduler-options" % default_config_name: scheduler_options}
):

with Cluster(cores=2, memory="2GB") as cluster:
scheduler_options = cluster.scheduler_spec["options"]
assert scheduler_options.get("interface") == config_scheduler_interface
Expand Down
8 changes: 0 additions & 8 deletions dask_jobqueue/tests/test_lsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

def test_header():
with LSFCluster(walltime="00:02", processes=4, cores=8, memory="8GB") as cluster:

assert "#BSUB" in cluster.job_header
assert "#BSUB -J dask-worker" in cluster.job_header
assert "#BSUB -n 8" in cluster.job_header
Expand All @@ -35,7 +34,6 @@ def test_header():
ncpus=24,
mem=100000000000,
) as cluster:

assert "#BSUB -q general" in cluster.job_header
assert "#BSUB -J dask-worker" in cluster.job_header
assert "#BSUB -n 24" in cluster.job_header
Expand All @@ -54,7 +52,6 @@ def test_header():
ncpus=24,
mem=100000000000,
) as cluster:

assert "#BSUB -q general" in cluster.job_header
assert "#BSUB -J dask-worker" in cluster.job_header
assert "#BSUB -n 24" in cluster.job_header
Expand All @@ -65,7 +62,6 @@ def test_header():
assert '#BSUB -P "Dask On LSF"' in cluster.job_header

with LSFCluster(cores=4, memory="8GB") as cluster:

assert "#BSUB -n" in cluster.job_header
assert "#BSUB -W" in cluster.job_header
assert "#BSUB -M" in cluster.job_header
Expand All @@ -75,7 +71,6 @@ def test_header():
with LSFCluster(
cores=4, memory="8GB", job_extra_directives=["-u email@domain.com"]
) as cluster:

assert "#BSUB -u email@domain.com" in cluster.job_header
assert "#BSUB -n" in cluster.job_header
assert "#BSUB -W" in cluster.job_header
Expand All @@ -86,7 +81,6 @@ def test_header():

def test_job_script():
with LSFCluster(walltime="00:02", processes=4, cores=8, memory="28GB") as cluster:

job_script = cluster.job_script()
assert "#BSUB" in job_script
assert "#BSUB -J dask-worker" in job_script
Expand Down Expand Up @@ -114,7 +108,6 @@ def test_job_script():
ncpus=24,
mem=100000000000,
) as cluster:

job_script = cluster.job_script()
assert "#BSUB -q general" in cluster.job_header
assert "#BSUB -J dask-worker" in cluster.job_header
Expand All @@ -141,7 +134,6 @@ def test_job_script():
project="Dask On LSF",
job_extra_directives=["-R rusage[mem=16GB]"],
) as cluster:

job_script = cluster.job_script()

assert "#BSUB -J dask-worker" in cluster.job_header
Expand Down
10 changes: 0 additions & 10 deletions dask_jobqueue/tests/test_pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def test_header(Cluster):
with Cluster(
walltime="00:02:00", processes=4, cores=8, memory="28GB", name="dask-worker"
) as cluster:

assert "#PBS" in cluster.job_header
assert "#PBS -N dask-worker" in cluster.job_header
assert "#PBS -l select=1:ncpus=8:mem=27GB" in cluster.job_header
Expand All @@ -34,7 +33,6 @@ def test_header(Cluster):
resource_spec="select=1:ncpus=24:mem=100GB",
memory="28GB",
) as cluster:

assert "#PBS -q regular" in cluster.job_header
assert "#PBS -N dask-worker" in cluster.job_header
assert "#PBS -l select=1:ncpus=24:mem=100GB" in cluster.job_header
Expand All @@ -43,15 +41,13 @@ def test_header(Cluster):
assert "#PBS -A DaskOnPBS" in cluster.job_header

with Cluster(cores=4, memory="8GB") as cluster:

assert "#PBS -j oe" not in cluster.job_header
assert "#PBS -N" in cluster.job_header
assert "#PBS -l walltime=" in cluster.job_header
assert "#PBS -A" not in cluster.job_header
assert "#PBS -q" not in cluster.job_header

with Cluster(cores=4, memory="8GB", job_extra_directives=["-j oe"]) as cluster:

assert "#PBS -j oe" in cluster.job_header
assert "#PBS -N" in cluster.job_header
assert "#PBS -l walltime=" in cluster.job_header
Expand All @@ -62,7 +58,6 @@ def test_header(Cluster):
@pytest.mark.parametrize("Cluster", [PBSCluster, MoabCluster])
def test_job_script(Cluster):
with Cluster(walltime="00:02:00", processes=4, cores=8, memory="28GB") as cluster:

job_script = cluster.job_script()
assert "#PBS" in job_script
assert "#PBS -N dask-worker" in job_script
Expand All @@ -88,7 +83,6 @@ def test_job_script(Cluster):
resource_spec="select=1:ncpus=24:mem=100GB",
memory="28GB",
) as cluster:

job_script = cluster.job_script()
assert "#PBS -q regular" in job_script
assert "#PBS -N dask-worker" in job_script
Expand Down Expand Up @@ -119,7 +113,6 @@ def test_basic(loop):
loop=loop,
) as cluster:
with Client(cluster) as client:

cluster.scale(2)
client.wait_for_workers(2, timeout=QUEUE_WAIT)

Expand Down Expand Up @@ -154,7 +147,6 @@ def test_scale_cores_memory(loop):
loop=loop,
) as cluster:
with Client(cluster) as client:

cluster.scale(cores=2)
client.wait_for_workers(1, timeout=QUEUE_WAIT)

Expand Down Expand Up @@ -188,7 +180,6 @@ def test_basic_scale_edge_cases(loop):
job_extra_directives=["-V"],
loop=loop,
) as cluster:

cluster.scale(2)
cluster.scale(0)

Expand Down Expand Up @@ -299,7 +290,6 @@ def test_scale_grouped(loop):
loop=loop,
) as cluster:
with Client(cluster) as client:

cluster.scale(4) # Start 2 jobs

start = time()
Expand Down
1 change: 0 additions & 1 deletion dask_jobqueue/tests/test_sge.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def test_basic(loop):
walltime="00:02:00", cores=8, processes=4, memory="2GiB", loop=loop
) as cluster:
with Client(cluster, loop=loop) as client:

cluster.scale(2)

start = time()
Expand Down
5 changes: 0 additions & 5 deletions dask_jobqueue/tests/test_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def test_header():
with SLURMCluster(
walltime="00:02:00", processes=4, cores=8, memory="28GB"
) as cluster:

assert "#SBATCH" in cluster.job_header
assert "#SBATCH -J dask-worker" in cluster.job_header
assert "#SBATCH -n 1" in cluster.job_header
Expand All @@ -35,7 +34,6 @@ def test_header():
job_cpu=16,
job_mem="100G",
) as cluster:

assert "#SBATCH --cpus-per-task=16" in cluster.job_header
assert "#SBATCH --cpus-per-task=8" not in cluster.job_header
assert "#SBATCH --mem=100G" in cluster.job_header
Expand All @@ -44,7 +42,6 @@ def test_header():
assert "#SBATCH -p regular" in cluster.job_header

with SLURMCluster(cores=4, memory="8GB") as cluster:

assert "#SBATCH" in cluster.job_header
assert "#SBATCH -J " in cluster.job_header
assert "#SBATCH -n 1" in cluster.job_header
Expand All @@ -57,7 +54,6 @@ def test_job_script():
with SLURMCluster(
walltime="00:02:00", processes=4, cores=8, memory="28GB"
) as cluster:

job_script = cluster.job_script()
assert "#SBATCH" in job_script
assert "#SBATCH -J dask-worker" in job_script
Expand Down Expand Up @@ -127,7 +123,6 @@ def test_basic(loop):
loop=loop,
) as cluster:
with Client(cluster) as client:

cluster.scale(2)

start = time()
Expand Down

0 comments on commit 02d9682

Please sign in to comment.