-
Notifications
You must be signed in to change notification settings - Fork 3
Remove conda support in executorlib #418
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -23,16 +23,12 @@ def __init__(self, cwd: str, cores: int = 1, openmpi_oversubscribe: bool = False | |
| def bootup( | ||
| self, | ||
| command_lst: list[str], | ||
| conda_environment_name: Optional[str] = None, | ||
| conda_environment_path: Optional[str] = None, | ||
| ): | ||
| """ | ||
| Method to start the interface. | ||
|
|
||
| Args: | ||
| command_lst (list[str]): The command list to execute. | ||
| conda_environment_name (str, optional): The prefix name. Defaults to None. | ||
| conda_environment_path (str, optional): The prefix path. Defaults to None. | ||
| """ | ||
| raise NotImplementedError | ||
|
|
||
|
|
@@ -80,33 +76,18 @@ def __init__( | |
| def bootup( | ||
| self, | ||
| command_lst: list[str], | ||
| conda_environment_name: Optional[str] = None, | ||
| conda_environment_path: Optional[str] = None, | ||
| ): | ||
| """ | ||
| Method to start the subprocess interface. | ||
|
|
||
| Args: | ||
| command_lst (list[str]): The command list to execute. | ||
| conda_environment_name (str, optional): The prefix name. Defaults to None. | ||
| conda_environment_path (str, optional): The prefix path. Defaults to None. | ||
| """ | ||
| if conda_environment_name is None and conda_environment_path is None: | ||
| self._process = subprocess.Popen( | ||
| args=self.generate_command(command_lst=command_lst), | ||
| cwd=self._cwd, | ||
| stdin=subprocess.DEVNULL, | ||
| ) | ||
| else: | ||
| import conda_subprocess | ||
|
|
||
| self._process = conda_subprocess.Popen( | ||
| args=self.generate_command(command_lst=command_lst), | ||
| cwd=self._cwd, | ||
| stdin=subprocess.DEVNULL, | ||
| prefix_path=conda_environment_path, | ||
| prefix_name=conda_environment_name, | ||
| ) | ||
| self._process = subprocess.Popen( | ||
| args=self.generate_command(command_lst=command_lst), | ||
| cwd=self._cwd, | ||
| stdin=subprocess.DEVNULL, | ||
| ) | ||
|
Comment on lines
+86
to
+90
Contributor
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 Found remaining conda references. There is still a reference to conda in 🔗 Analysis chainLGTM! Consider adding a comment about conda support removal. The simplification of the Consider adding a comment explaining that conda support has been removed and users should decorate their functions if they need conda support: def bootup(
self,
command_lst: list[str],
):
"""
Method to start the subprocess interface.
Note: Conda support has been removed. Users requiring conda support
should decorate their functions before submitting them through executorlib.
Args:
command_lst (list[str]): The command list to execute.
"""
self._process = subprocess.Popen(
args=self.generate_command(command_lst=command_lst),
cwd=self._cwd,
stdin=subprocess.DEVNULL,
)Let's verify the impact of these changes on the rest of the codebase: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for any remaining references to conda in the codebase
# and verify that all calls to bootup method have been updated.
echo "Checking for remaining conda references:"
rg -i conda --type python
echo "\nVerifying bootup method calls:"
rg -A 3 "\.bootup\(" --type python
Length of output: 380 Script: #!/bin/bash
# Description: Check for any remaining references to conda in the codebase
# and verify that all calls to bootup method have been updated.
echo "Checking for remaining conda references:"
rg -i conda --type py
echo "\nVerifying bootup method calls:"
rg -A 3 "\.bootup\(" --type py
Length of output: 1431 |
||
|
|
||
| def generate_command(self, command_lst: list[str]) -> list[str]: | ||
| """ | ||
|
|
||
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.
💡 Codebase verification
Conda Configurations Still Present
Conda configurations are still found in the following files and should be removed to align with the PR's objective of eliminating conda support:
binder/environment.yml.readthedocs.yml🔗 Analysis chain
Verify: Is conda configuration still needed?
The PR objectives mention removing conda support, but this file still includes conda configuration. Please confirm if this is intentional or if the conda-related lines should be removed as part of this PR.
To help verify this, you can run the following command to check for other conda-related configurations in the project:
This will help determine if conda configurations have been removed from other files, which might indicate that this file was overlooked.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 94