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

Remove the opportunity to configure script_dir for LocalChannel #3684

Merged
merged 1 commit into from
Nov 7, 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
4 changes: 2 additions & 2 deletions parsl/channels/local/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class LocalChannel(Channel, RepresentationMixin):
and done so infrequently that they do not need a persistent channel
'''

def __init__(self, script_dir=None):
def __init__(self):
''' Initialize the local channel. script_dir is required by set to a default.

KwArgs:
- script_dir (string): Directory to place scripts
'''
self.hostname = "localhost"
self.script_dir = script_dir
self.script_dir = None

def execute_wait(self, cmd, walltime=None):
''' Synchronously execute a commandline string on the shell.
Expand Down
3 changes: 2 additions & 1 deletion parsl/tests/test_providers/test_pbspro_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ def test_submit_script_basic(tmp_path):
"""Test slurm resources table"""

provider = PBSProProvider(
queue="debug", channel=LocalChannel(script_dir=tmp_path)
queue="debug", channel=LocalChannel()
)
provider.script_dir = tmp_path
provider.channel.script_dir = tmp_path
job_id = str(random.randint(55000, 59000))
provider.execute_wait = mock.Mock(spec=PBSProProvider.execute_wait)
provider.execute_wait.return_value = (0, job_id, "")
Expand Down
3 changes: 2 additions & 1 deletion parsl/tests/test_providers/test_slurm_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ def test_submit_script_basic(tmp_path):
"""Test slurm resources table"""

provider = SlurmProvider(
partition="debug", channel=LocalChannel(script_dir=tmp_path)
partition="debug", channel=LocalChannel()
)
provider.script_dir = tmp_path
provider.channel.script_dir = tmp_path
job_id = str(random.randint(55000, 59000))
provider.execute_wait = mock.MagicMock(spec=SlurmProvider.execute_wait)
provider.execute_wait.return_value = (0, f"Submitted batch job {job_id}", "")
Expand Down
Loading