Skip to content

Update the htcondor bindings#59

Merged
transientlunatic merged 3 commits into
masterfrom
update-htcondor
Jan 26, 2026
Merged

Update the htcondor bindings#59
transientlunatic merged 3 commits into
masterfrom
update-htcondor

Conversation

@transientlunatic

Copy link
Copy Markdown
Owner

This MR updates the bindings between htcondor and heron to allow heron to submit jobs on clusters using the htcondor2 python interface.

Copilot AI review requested due to automatic review settings January 26, 2026 13:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread heron/asimov/__init__.py Outdated
Comment thread heron/asimov/__init__.py Outdated
Comment on lines +15 to +19
import classad2 as classad # NoQA
except ImportError:
warnings.filterwarnings("ignore", module="htcondor")
import htcondor # NoQA
import classad # NoQA

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment thread heron/asimov/__init__.py
Comment thread heron/asimov/__init__.py

self.production.event.update_data()
return outputs

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable posterior is not used.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@transientlunatic transientlunatic merged commit 816a368 into master Jan 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants