-
Notifications
You must be signed in to change notification settings - Fork 51
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
python: promote JobInfo class to bindings #3140
Comments
Just looking into doing a quick experiment moving the I don't have much experience with Python module development, can we easily split |
Yep. You can do that. To preserve backwards-compatibility, I think we will need to add something like this to the from flux.job.jobspec import Jobspec, JobspecV1
from flux.job.id import id_parse, id_encode, JobID
from flux.job.control import * where jobspec, id, and control are just strawman names for this example (I'm not certain that |
Thanks! That was the hint I needed... |
Problem: The JobInfo class in flux-jobs is useful for abstracting the raw job data returned from the job-info list APIs into a more usable interface, but it is not available to Python bindings users. Promote the JobInfo class to flux.job, so it may be used by other Flux components and users of the Python API. Fixes flux-framework#3140
As a first step toward #3032, lets at least uplift the
JobInfo
class into the Python bindings.Requiring users of the
job_list()
API to decode some of the low level data in the response seems unkind (e.g.state
andresult
are just integers). By allowing wider use ofJobInfo
class we can make the interface much more usable.Perhaps a
JobInfo
constructor could also be used in place of, or as an enhancement to, the customJobRecord
class discussed in #3136.The text was updated successfully, but these errors were encountered: