[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] thoughts on HTCondor python bindings submit improvements



Yes, the thought is to turn htcondor.Submit into the submit file parser.   it was nearly there already, but adding the ability to populate it from a submit file, and to hold the data from a submit file's QUEUE statement makes it complete.   

If we just did that, then a simple python script could replicate condor_submit, but it would also be good if the content of the submit were not totally opaque to python.  so expose the QUEUE statement from the htcondor.Submit object, that exposes naturally as an iterator

We could stop there, but I also thought it would be nice to submit using a native python iterator also, and it seemed to me that it is clearer to have the user always pass the iterator of the htcondor.Submit class to the queue statement explicitly rather than implicitly.

Not a lot of people seem to like that last part, but it's not essential. 

-----Original Message-----
From: HTCondor-users [mailto:htcondor-users-bounces@xxxxxxxxxxx] On Behalf Of Dimitri Maziuk
Sent: Friday, April 27, 2018 9:29 AM
To: htcondor-users@xxxxxxxxxxx
Subject: Re: [HTCondor-users] thoughts on HTCondor python bindings submit improvements

On 2018-04-27 08:56, Brian Bockelman wrote:

> I think there's a strong argument to have python able to cleanly submit from an unaltered submit file.
> 
> I don't see a strong argument to expose the complexity of the "queue" statement given the user controls the loop anyway.

I think you might be missing the point: make the submit file parser a 
separate piece. Use the output of that piece as input for submit() 
piece. Expose both pieces in your API.

Then you can add a submit_string( str ) and submit_file( name ) etc. 
2-liner convenience wrappers on top.

It's the design that's known to work.

Dimitri

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/