-
Notifications
You must be signed in to change notification settings - Fork 3
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
Executor user interface #458
Changes from 4 commits
3b2f3ce
8fd4d47
55dd86a
72303a4
fa26b93
4624c0f
a458dbe
107f598
8bf1bac
930de31
4a0402c
e6764f2
5eabfba
c34fc0b
6c3c54f
74c1b7f
434fe06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
try: | ||
import flux.job | ||
from executorlib import FileExecutor | ||
from executorlib import Executor | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification FileExecutor still exists in other test files and needs to be updated The import change in
These files should also be updated to use the new 🔗 Analysis chainLGTM: Import statement updated correctly. The change from Let's verify this change is consistent across the codebase: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for any remaining FileExecutor imports that might need updating
rg "from executorlib.*import.*FileExecutor"
Length of output: 107 Script: #!/bin/bash
# Let's try a broader search to find any FileExecutor references
rg "FileExecutor"
# Also search for Executor class usage patterns
ast-grep --pattern 'Executor($$$)'
# And check all import statements related to executorlib
rg "from executorlib.*import"
Length of output: 20989 |
||
|
||
skip_flux_test = "FLUX_URI" not in os.environ | ||
pmi = os.environ.get("PYMPIPOOL_PMIX", None) | ||
|
@@ -30,9 +30,9 @@ def mpi_funct(i): | |
) | ||
class TestCacheExecutorPysqa(unittest.TestCase): | ||
def test_executor(self): | ||
with FileExecutor( | ||
with Executor( | ||
resource_dict={"cores": 2}, | ||
backend="flux", | ||
backend="pysqa_flux", | ||
) as exe: | ||
fs1 = exe.submit(mpi_funct, 1) | ||
self.assertFalse(fs1.done()) | ||
|
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.
🛠️ Refactor suggestion
Suggestion to consolidate repetitive error checks
In the conditional block for the
'pysqa_'
backend, multipleif
statements individually raiseValueError
exceptions for unsupported options. Consider consolidating these checks to enhance code readability and maintainability.Apply the following refactoring:
This refactoring gathers unsupported options into a list and raises a single
ValueError
, improving clarity and reducing repetitive code.📝 Committable suggestion