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

isort on the test code #3106

Closed
wants to merge 1 commit into from
Closed
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 parsl/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from parsl.dataflow.memoization import id_for_memo
from parsl.data_provider.files import File
from parsl.dataflow.memoization import id_for_memo


@id_for_memo.register(File)
Expand Down
8 changes: 4 additions & 4 deletions parsl/tests/configs/ad_hoc_cluster_htex.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from parsl.providers import AdHocProvider
from typing import Any, Dict

from parsl.channels import SSHChannel
from parsl.executors import HighThroughputExecutor
from parsl.config import Config

from typing import Any, Dict
from parsl.executors import HighThroughputExecutor
from parsl.providers import AdHocProvider

user_opts = {'adhoc':
{'username': 'YOUR_USERNAME',
Expand Down
10 changes: 4 additions & 6 deletions parsl/tests/configs/azure_single_node.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
"""Config for Azure"""
from parsl.providers import AzureProvider
import getpass

from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.data_provider.http import HTTPInTaskStaging
from parsl.data_provider.ftp import FTPInTaskStaging
from parsl.data_provider.http import HTTPInTaskStaging
from parsl.data_provider.rsync import RSyncStaging

import getpass

from parsl.executors import HighThroughputExecutor
from parsl.providers import AzureProvider
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this as an example, make sure to either
# 1) create a local `user_opts.py`, or
Expand Down
5 changes: 3 additions & 2 deletions parsl/tests/configs/bridges.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from parsl.config import Config
from parsl.providers import SlurmProvider
from parsl.launchers import SrunLauncher
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SrunLauncher
from parsl.providers import SlurmProvider

from .user_opts import user_opts


Expand Down
4 changes: 2 additions & 2 deletions parsl/tests/configs/cc_in2p3.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from parsl.config import Config
from parsl.channels import LocalChannel
from parsl.providers import GridEngineProvider
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.providers import GridEngineProvider

from .user_opts import user_opts

Expand Down
3 changes: 2 additions & 1 deletion parsl/tests/configs/comet.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SrunLauncher
from parsl.providers import SlurmProvider
from parsl.executors import HighThroughputExecutor

from .user_opts import user_opts


Expand Down
4 changes: 1 addition & 3 deletions parsl/tests/configs/ec2_single_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
==================

"""
from parsl.providers import AWSProvider

from parsl.config import Config
from parsl.executors import HighThroughputExecutor

from parsl.providers import AWSProvider
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this as an example, make sure to either
# 1) create a local `user_opts.py`, or
Expand Down
4 changes: 1 addition & 3 deletions parsl/tests/configs/ec2_spot.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from parsl.providers import AWSProvider

from parsl.config import Config
from parsl.executors import HighThroughputExecutor

from parsl.providers import AWSProvider
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this as an example, make sure to either
# 1) create a local `user_opts.py`, or
Expand Down
5 changes: 3 additions & 2 deletions parsl/tests/configs/frontera.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from parsl.config import Config
from parsl.channels import LocalChannel
from parsl.providers import SlurmProvider
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SrunLauncher
from parsl.providers import SlurmProvider

from .user_opts import user_opts

""" This config assumes that it is used to launch parsl tasks from the login nodes
of Frontera at TACC. Each job submitted to the scheduler will request 2 nodes for 10 minutes.
"""
Expand Down
6 changes: 2 additions & 4 deletions parsl/tests/configs/htex_ad_hoc_cluster.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from parsl.providers import AdHocProvider
from parsl.channels import SSHChannel
from parsl.executors import HighThroughputExecutor

from parsl.config import Config

from parsl.executors import HighThroughputExecutor
from parsl.providers import AdHocProvider
from parsl.tests.configs.user_opts import user_opts

config = Config(
Expand Down
5 changes: 2 additions & 3 deletions parsl/tests/configs/htex_local.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from parsl.providers import LocalProvider
from parsl.channels import LocalChannel
from parsl.launchers import SimpleLauncher

from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SimpleLauncher
from parsl.providers import LocalProvider


def fresh_config():
Expand Down
18 changes: 7 additions & 11 deletions parsl/tests/configs/htex_local_alternate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,18 @@
those timing parameters control.
"""

# imports for monitoring:
from parsl.monitoring import MonitoringHub

import os

from parsl.providers import LocalProvider
from parsl.channels import LocalChannel
from parsl.launchers import SingleNodeLauncher

from parsl.config import Config
from parsl.executors import HighThroughputExecutor


from parsl.data_provider.http import HTTPInTaskStaging
from parsl.data_provider.ftp import FTPInTaskStaging
from parsl.data_provider.file_noop import NoOpFileStaging
from parsl.data_provider.ftp import FTPInTaskStaging
from parsl.data_provider.http import HTTPInTaskStaging
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SingleNodeLauncher
# imports for monitoring:
from parsl.monitoring import MonitoringHub
from parsl.providers import LocalProvider

working_dir = os.getcwd() + "/" + "test_htex_alternate"

Expand Down
12 changes: 5 additions & 7 deletions parsl/tests/configs/htex_local_intask_staging.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from parsl.providers import LocalProvider
from parsl.channels import LocalChannel
from parsl.launchers import SimpleLauncher

from parsl.data_provider.http import HTTPInTaskStaging
from parsl.data_provider.ftp import FTPInTaskStaging
from parsl.data_provider.file_noop import NoOpFileStaging

from parsl.config import Config
from parsl.data_provider.file_noop import NoOpFileStaging
from parsl.data_provider.ftp import FTPInTaskStaging
from parsl.data_provider.http import HTTPInTaskStaging
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SimpleLauncher
from parsl.providers import LocalProvider

config = Config(
executors=[
Expand Down
10 changes: 4 additions & 6 deletions parsl/tests/configs/htex_local_rsync_staging.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from parsl.providers import LocalProvider
from parsl.channels import LocalChannel
from parsl.launchers import SimpleLauncher

from parsl.data_provider.http import HTTPInTaskStaging
from parsl.config import Config
from parsl.data_provider.ftp import FTPInTaskStaging
from parsl.data_provider.http import HTTPInTaskStaging
from parsl.data_provider.rsync import RSyncStaging

from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SimpleLauncher
from parsl.providers import LocalProvider

config = Config(
executors=[
Expand Down
2 changes: 1 addition & 1 deletion parsl/tests/configs/local_adhoc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from parsl.config import Config
from parsl.channels import LocalChannel
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.providers import AdHocProvider

Expand Down
4 changes: 1 addition & 3 deletions parsl/tests/configs/local_radical.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import os

from parsl.config import Config
from parsl.executors.radical import RadicalPilotExecutor
from parsl.executors.radical import ResourceConfig

from parsl.executors.radical import RadicalPilotExecutor, ResourceConfig

rpex_cfg = ResourceConfig()

Expand Down
4 changes: 2 additions & 2 deletions parsl/tests/configs/local_radical_mpi.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os

from parsl.config import Config


def fresh_config():
from parsl.executors.radical import ResourceConfig
from parsl.executors.radical import RadicalPilotExecutor
from parsl.executors.radical import RadicalPilotExecutor, ResourceConfig

rpex_cfg = ResourceConfig()
rpex_cfg.worker_type = "MPI"
Expand Down
4 changes: 2 additions & 2 deletions parsl/tests/configs/midway.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from parsl.config import Config
from parsl.providers import SlurmProvider
from parsl.launchers import SrunLauncher
from parsl.executors import HighThroughputExecutor
from parsl.launchers import SrunLauncher
from parsl.providers import SlurmProvider

from .user_opts import user_opts

Expand Down
6 changes: 3 additions & 3 deletions parsl/tests/configs/nscc_singapore.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from parsl.providers import PBSProProvider
from parsl.executors import HighThroughputExecutor
from parsl.launchers import MpiRunLauncher
from parsl.addresses import address_by_interface
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.launchers import MpiRunLauncher
from parsl.providers import PBSProProvider

from .user_opts import user_opts

Expand Down
2 changes: 1 addition & 1 deletion parsl/tests/configs/osg_htex.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from parsl.config import Config
from parsl.providers import CondorProvider
from parsl.executors import HighThroughputExecutor
from parsl.providers import CondorProvider

# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this as an example, make sure to either
Expand Down
5 changes: 3 additions & 2 deletions parsl/tests/configs/petrelkube.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os

from parsl.addresses import address_by_route
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.providers import KubernetesProvider
from parsl.addresses import address_by_route

from .user_opts import user_opts
import os


def fresh_config():
Expand Down
1 change: 1 addition & 0 deletions parsl/tests/configs/summit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from parsl.providers import LSFProvider

from .user_opts import user_opts

""" This config assumes that it is used to launch parsl tasks from the login nodes
of Frontera at TACC. Each job submitted to the scheduler will request 2 nodes for 10 minutes.
"""
Expand Down
4 changes: 2 additions & 2 deletions parsl/tests/configs/swan_htex.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
==================
"""
from parsl.channels import SSHChannel
from parsl.launchers import AprunLauncher
from parsl.providers import TorqueProvider
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from parsl.launchers import AprunLauncher
from parsl.providers import TorqueProvider

# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this as an example, make sure to either
Expand Down
8 changes: 3 additions & 5 deletions parsl/tests/configs/taskvine_ex.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from parsl.config import Config
from parsl.executors.taskvine import TaskVineExecutor
from parsl.executors.taskvine import TaskVineManagerConfig

from parsl.data_provider.http import HTTPInTaskStaging
from parsl.data_provider.ftp import FTPInTaskStaging
from parsl.data_provider.file_noop import NoOpFileStaging
from parsl.data_provider.ftp import FTPInTaskStaging
from parsl.data_provider.http import HTTPInTaskStaging
from parsl.executors.taskvine import TaskVineExecutor, TaskVineManagerConfig


def fresh_config():
Expand Down
4 changes: 2 additions & 2 deletions parsl/tests/configs/theta.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from parsl.config import Config
from parsl.providers import CobaltProvider
from parsl.launchers import AprunLauncher
from parsl.executors import HighThroughputExecutor
from parsl.launchers import AprunLauncher
from parsl.providers import CobaltProvider

from .user_opts import user_opts

Expand Down
7 changes: 3 additions & 4 deletions parsl/tests/configs/workqueue_ex.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from parsl.config import Config
from parsl.executors import WorkQueueExecutor

from parsl.data_provider.http import HTTPInTaskStaging
from parsl.data_provider.ftp import FTPInTaskStaging
from parsl.data_provider.file_noop import NoOpFileStaging
from parsl.data_provider.ftp import FTPInTaskStaging
from parsl.data_provider.http import HTTPInTaskStaging
from parsl.executors import WorkQueueExecutor


def fresh_config():
Expand Down
6 changes: 3 additions & 3 deletions parsl/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
import pathlib
import re
import shutil
import time
import types
import signal
import sys
import tempfile
import threading
import time
import traceback
import types
import typing as t
from datetime import datetime
from glob import glob
from itertools import chain

import pytest
import _pytest.runner as runner
import pytest

import parsl
from parsl.dataflow.dflow import DataFlowKernelLoader
Expand Down
2 changes: 1 addition & 1 deletion parsl/tests/integration/test_channels/test_ssh_errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from parsl.channels.errors import SSHException, BadHostKeyException
from parsl.channels.errors import BadHostKeyException, SSHException
from parsl.channels.ssh.ssh import SSHChannel as SSH


Expand Down
7 changes: 3 additions & 4 deletions parsl/tests/integration/test_stress/test_python_simple.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import argparse
import time

import parsl
from parsl import python_app
from parsl.configs.htex_local import config
# from parsl.configs.local_threads import config

import time
import argparse


@python_app
Expand Down
8 changes: 3 additions & 5 deletions parsl/tests/integration/test_stress/test_python_threads.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
''' Testing bash apps
'''
import parsl
from parsl import python_app

import time
import argparse
import time

import parsl
from parsl import python_app
from parsl.tests.configs.local_threads import config


local_config = config


Expand Down
Loading
Loading