-
Notifications
You must be signed in to change notification settings - Fork 30
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
Doc update for Jupyter notebook scripting and bumps import issue #526
Conversation
doc/guide/scripting.rst
Outdated
@@ -234,3 +236,17 @@ On windows, this example can be called from the cmd prompt using sasview as | |||
as the python interpreter:: | |||
|
|||
SasViewCom example/cylinder_eval.py |
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.
I don't know if it will be SasViewCom
or SasView
. Somebody building the windows exe will have to see if two are needed. Note that the bumps module needs the -m
as in SasView -m bumps.cli model.py
but a simple script file does not. This is similar to the python command line interface.
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.
Resolving this is waiting on a Windows review of SasView/sasview#2280
For the mac distribution you can use mkdir ~/bin
ln -s /path/to/SasView.app/Contents/MacOS/sasview ~/bin You will need to close and reopen the terminal for it to recognize the new ~/bin and put it on your path. |
@pkienzle , Ok have added that MacOS info. |
doc/guide/scripting.rst
Outdated
This can either be used directly or can be symlinked into your path:: | ||
|
||
mkdir ~/bin | ||
ln -s /path/to/SasView.app/Contents/MacOS/sasview ~/bin |
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.
I should have used the same string in both places, and the string should match the name in the .dmg. So /Applications/SasView5.app
? I don't have my mac handy to check.
Do we need the caveat, "or whereever it is installed."?
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.
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.
It looks good. There may be some improvements made e.g. not about path from the About Box but in my opinion it is good enough to be merged.
This PR addresses an issue raised by User RobD who had been trying to utilise the scripting example but found it did not work. The reason for this turned out to be two-fold:
First, the need to have pre-installed sasmodels and bumps came after the fact. The sequencing of relevant passages has been changed to address this. At the same time, links to more recent Jupyter notebook tutorials have also been added.
Second, it transpired that the included example contained an import statement that did not work in all versions of SasView! Very bizzarely, from bumps.names import * works in 4.2.2 and 5.0.5 but not in any intermediate version of SasView. The reason for this is still unclear. However, for future reference a clarifying note has been added to the scripting help.