-
Notifications
You must be signed in to change notification settings - Fork 93
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
Closes #1337 - Adding support to generic attach for categorical and segarray #1342
Closes #1337 - Adding support to generic attach for categorical and segarray #1342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic all looks good. One thing that I would like to change would be using +
for all delimiters instead of ;
. I see why you are using a separate delimiter here (Categorical.categories being a Strings
object). That should be easy enough to glue together to create the Strings
object properly using Strings.from_response_msg()
.
48b2225
to
2eef634
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
@joshmarshall1 there is a basic conflict on this PR now. I could fix it but I rather you did so I don't screw it up with the web editor ;-) |
2eef634
to
5fc7f56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple gripes but overall the logic looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
This ticket (closes #1337):
This ticket also closes #1284:
Added methods to
RegistrationMsg.chpl
for generic attach command which takes in an optionaltype
or will attempt to infer the type if not passed. Passing in the optional type will skip directly to the portion of the method that compiles the response message. This should allow users to pass the type to increase performance.I added a method to
MultiTypeSymbolTable.chpl
that checks existence of a given name and returns a bool result. I didn't see any other methods that returned bool for checking existence, onlycheckTable
which returned void if the name exists, or error if it doesn't. This new method prevents me from having to use atry/catch
block withcheckTable
or having to access thetab
property of theSymTab
class directly.Also added were
from_return_message
methods tocategorical.py
andsegarray.py
so the return could be passed from the generic attach method inutil.py
and parsed correctly by the corresponding class.The existing test cases for
pdarray
andStrings
generic attach were expanded to include a given and an inferred type test. Two new tests were added, one forCategorical
and one forSegArray
, also each with a given and an inferred type.