-
Notifications
You must be signed in to change notification settings - Fork 19
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
PVL Grammars don't have parameters #72
Comments
@acpaquette, there are a few things going on here.
Is it that you've found some files that are created by ISIS which have octothorpe-comments, and the OmniGrammar doesn't parse them, and the ISISGrammar should? If so, then we should amend the ISISGrammar to include them like the OmniGrammar does. There is no "spec" for what kind of PVL-text gets written out by ISIS, and while the ISISGrammar is an attempt to do that, it is definitely a work-in-progress, and is the most likely to need additions. |
@rbeyer Yes it is from an ISIS product, specifically a CassiniISSNac cube.
This is more to do with ALE We are trying to use the ISISGrammar and running into the OmniGrammar comments but also needs the
Just for further discussion, directly modify an attribute of the class like this is an unusual interface provided by the Grammar classes. Editing the attributes directly like this can lead to exposing pieces of the interface that shouldn't be exposed. I know that there really is no protected interfaces in python but limiting consumers of these classes to a select number of parameters can help to better define what should be editable and what should not be touched. Without the parameters pinning down exactly what attributes of the class I can modify, I end up needing to further examine exactly what the variables are called and what I need to modify. |
Improving ISISGrammar: when I get the chance, I'll add the You're right that this architecture does not have a user-friendly mechanism for interaction, and that's something that could be improved. The solution will require some work, so may not be quick to accomplish. |
I think that is a good solution for the time being. It would be nice to get those parameters "properly" exposed but I understand that would take a fair amount of work. Maybe we can keep this issue around so updating the grammar classes parameters can still be on the table? |
@acpaquette, agreed. I've created #73 to address the near-term issues that we discussed here, but will keep this issue around to remind us to work on enhancing the grammar interfaces in Apologies for being silent, I've had some computer issues for the last month. |
Describe the bug
The current grammar classes (PVLGrammar, OmniGrammar, ODLGrammar, and ISISGrammar) do not take any of the specified parameters as mentioned in the documentation. Specifically PvlGrammer takes
whitespace
,reserved_characters
, andcomments
. I believe these parameters would also be usable in the child classes (OmniGrammer, ODLGrammar, and IsisGrammer) however since PvlGrammer can't take advantage of them, neither can the sub classes.To Reproduce
Expected behavior
When setting these parameters I would expect them to override the defaults being set in the PVLGrammar class any of its subclasses.
Your Environment (please complete the following information):
pvl
Version 1.0.0The text was updated successfully, but these errors were encountered: