Repository navigation
Conversation
|
this is a lot... and anything it needed would be 'in there', self-contained... |
It isn't as much as it looks. But I suppose the existing Anyway... this is just transitional. It's here to have something to bounce criticism off of, and not at all intended as the final form. In essence, much of what made the old PRC valuable but without all the fancy Pythonic bells and whistles. As @korydraughn could tell you, he and I did discuss this. I mentioned to him that, were I to try and pull off something the equivalent of irods4j, it would have taken me a solid year. That's a long time for a first step. |
|
This is a significant step actually. It curbs a lot of the weaknesses of the existing PRC library, at least from many viewpoints I've heard expressed both externally and internally. The premises are that
So maybe in that spirit, we can look at it as a team, and then decide what it really should look like.... |
|
I've skimmed through the implementation and it's a good first step. It at least reduces the number of things you have to examine. That said, I think you should do the following:
There's no time limit on this effort. This needs to be a significant improvement over what we have today. If it's not, then we wasted our time. The goal is for the low level interface to mirror the C API. Below is an example of an imaginary interface of what could serve as the low level API. If you can make something like the following real, then everything else should be trivial. from experimental import irods
# The try-catch block is only used to catch exceptions for things which the
# iRODS API does not communicate - e.g. certain network failures, etc.
try:
errInfo = ErrorStack()
conn = irods.rcConnect(arg1, ..., argN, errInfo)
if conn is None:
# Print errInfo for error details.
sys.exit(1)
# Populate the input struct.
inputStruct = GenQueryInp()
# Holds a single member "value" that will point to the allocated struct.
outputStructRef = Reference()
ec = irods.rcGenQuery(conn, inputStruct, outputStructRef)
if ec != 0:
# Handle iRODS error code.
# iRODS error codes are never thrown.
irods.rcDisconnect(conn)
sys.exit(1)
# outputStructRef.value points to a GenQueryOut struct on success.
outputStruct = outputStructRef.value
# Use outputStruct to print the GenQuery results.
irods.rcDisconnect(conn)
catch <syntax>:
# Handle non-iRODS exception. |
Ported here for review, from https://github.com/d-w-moore/fprc