-
Notifications
You must be signed in to change notification settings - Fork 8
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
Allow for job dependencies #132
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a9639aa
Add dependency option to schedulers
niklassiemer 5e9c05a
small refactoring to easy testing
niklassiemer 953fde8
Added dependencies also to modular adapter
niklassiemer 960e52b
Add tests for the commands to be executed
niklassiemer 4b31412
Introduce and use Base SchedulerCommands class
niklassiemer 292b7e1
fix black
niklassiemer 3a83a32
fix black everywhere...
niklassiemer 727b290
Merge pull request #133 from pyiron/dependencies_refator
jan-janssen 889d538
Format black
pyiron-runner a4efbb9
Merge pull request #138 from pyiron/master
jan-janssen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# coding: utf-8 | ||
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department | ||
# Distributed under the terms of "New BSD License", see the LICENSE file. | ||
|
||
from abc import ABC, abstractmethod | ||
|
||
__author__ = "Niklas Siemer" | ||
__copyright__ = ( | ||
"Copyright 2022, Max-Planck-Institut für Eisenforschung GmbH - " | ||
"Computational Materials Design (CM) Department" | ||
) | ||
__version__ = "1.0" | ||
__maintainer__ = "Niklas Siemer" | ||
__email__ = "[email protected]" | ||
__status__ = "production" | ||
__date__ = "Aug 15, 2022" | ||
|
||
|
||
class SchedulerCommands(ABC): | ||
@property | ||
@abstractmethod | ||
def submit_job_command(self): | ||
pass | ||
|
||
@property | ||
@abstractmethod | ||
def delete_job_command(self): | ||
pass | ||
|
||
@property | ||
def enable_reservation_command(self): | ||
raise NotImplementedError() | ||
|
||
@property | ||
@abstractmethod | ||
def get_queue_status_command(self): | ||
pass | ||
|
||
@staticmethod | ||
def dependencies(dependency_list) -> list: | ||
if dependency_list is not None: | ||
raise NotImplementedError() | ||
else: | ||
return [] | ||
|
||
@staticmethod | ||
def get_job_id_from_output(queue_submit_output): | ||
raise NotImplementedError() | ||
|
||
@staticmethod | ||
def convert_queue_status(queue_status_output): | ||
raise NotImplementedError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if
-b
is the best choice for dependencies. But as I do not have a better suggestion either as-d
is already in use for delete, I am fine with this.