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
Allow models to have mixed case filenames in help #137
Conversation
sasmodels contains filenames that are not all lowercase (unified_power_Rg.py) and so the HTML help pages generated for this model are also mixed case (unified_power_Rg.html). Forcing the filename to lowercase means that the help for this model will not be found. http://bugs.debian.org/886715
Another option is to force the generated html file to use lower case so that the help button can find the file. Anybody have an opinion on which is better? |
The options appear to be:
|
As noted on the fortnightly developer's call, the decision was made when converting to the new model infrastructure that nomenclature standards should be introduced and enforced. The decision regarding model names was in fact that it NOT include camel case and be all lower case as noted in the documentation in several places. In particular the model conversion instructions at: Indicate that
Thus whoever converted the Beaucage model failed to adhere to the standard and the consensus was that the immediate action should be to change that to rg and a ticket has been added to trac (ticket 1059) to make sure it is not forgotten. That said, it is clear that at some point a contributor to the marketplace may not notice that wee little rule and create a model that does not adhere to the standard. Question then is how it should be handled (assuming the plugins suffer from the same issue - though currently I don't think plugin docs are actually created? so no help file available?) There probably needs to be some further, broader discussion on what solution should be implemented in SasView. |
If matching the developer documentation implies renaming |
The relevant commit was for a mac doc issue in SasView 3.1:
Enough has changed with the move to sasmodels that lower casing the name may no longer be necessary, and this PR is the correct solution. Or we could force all names to lowercase internally, including when reading a saved model. Most Windows & Mac users have a case insensitive file system, so effectively it treats upper and lower case names the same already. Since the list of available models is built up by scanning a couple of directories, this should not change the functionality. My inclination is to apply this PR and fix whatever breaks. Either way, I suspect there will be more bugs related to this issue. |
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.
Be sure to check the docs for unified_power_Rg on both windows and mac after this change has been applied. This includes the links within the html docs as well as the help button. Check the PDF as well in case it has internal links.
Agreed, these tend to be the sorts of gifts that keep on giving. I wonder if some sort of
I will end up checking through the docs on the Linux side with a case-sensitive filesystem; I can't do other operating systems. I suspect that the combination of |
@llimeht asks
Sadly that is already a solved problem in that during the conversion to 4.0 we had to put out a release before all name changes were complete. Thus we already have the infrastructure to deal with this backward compatibility and have a number of such model name changes. This then becomes a separate issue from whether to support names that do not adhere to the standard. Probably should if we can. |
Given that the unified_power_Rg ticket has been added, this PR no longer depends on it, so merging. |
sasmodels contains filenames that are not all lowercase (unified_power_Rg.py) and so the HTML help pages generated for this model are also mixed case (unified_power_Rg.html). The current code forces the filename for the HTML help file to lowercase means that the help for this model will not be found.
This can either be fixed by renaming the file in sasmodels (and requiring that all models are always lowercase filenames which would need to be enforced in the test suite), or by dropping the conversion to lowercase. I can't see any reason to want to convert to lowercase and the commit that added that code does not say why it was considered necessary. Dropping the call to
lower()
seems like the right approach.http://bugs.debian.org/886715