Update the htcondor bindings#59
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the HTCondor bindings to support the htcondor2 Python interface with backward compatibility for the legacy htcondor module. The implementation uses a try-except block to attempt importing htcondor2 first, falling back to the original htcondor module if htcondor2 is not available.
Changes:
- Added import fallback mechanism for htcondor2/htcondor and classad2/classad modules with warning suppression
- Added
environment/directory to .gitignore for virtual environment exclusion
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| heron/asimov/init.py | Implements backward-compatible import logic for htcondor2/htcondor with fallback mechanism |
| .gitignore | Adds environment/ directory to version control exclusions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import classad2 as classad # NoQA | ||
| except ImportError: | ||
| warnings.filterwarnings("ignore", module="htcondor") | ||
| import htcondor # NoQA | ||
| import classad # NoQA |
There was a problem hiding this comment.
The classad module is imported but never used in this file. Consider removing this import unless it's needed for future functionality or by code that imports from this module.
| import classad2 as classad # NoQA | |
| except ImportError: | |
| warnings.filterwarnings("ignore", module="htcondor") | |
| import htcondor # NoQA | |
| import classad # NoQA | |
| except ImportError: | |
| warnings.filterwarnings("ignore", module="htcondor") | |
| import htcondor # NoQA |
|
|
||
| self.production.event.update_data() | ||
| return outputs | ||
|
|
There was a problem hiding this comment.
Variable posterior is not used.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This MR updates the bindings between htcondor and heron to allow heron to submit jobs on clusters using the htcondor2 python interface.