Skip to content
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

Merged
merged 8 commits into from
Oct 28, 2022

Conversation

smk78
Copy link
Contributor

@smk78 smk78 commented Oct 25, 2022

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.

@@ -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
Copy link
Contributor

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.

Copy link
Contributor Author

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

@pkienzle
Copy link
Contributor

For the mac distribution you can use /Applications/Sasview<TAB>.app/Contents/MacOS/sasview. This can be used directly or it can be symlinked into your path using:

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.

@smk78
Copy link
Contributor Author

smk78 commented Oct 28, 2022

@pkienzle , Ok have added that MacOS info.

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
Copy link
Contributor

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."?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I don't use a Mac... :-) How's this:
image

@wpotrzebowski wpotrzebowski self-requested a review October 28, 2022 19:22
Copy link

@wpotrzebowski wpotrzebowski left a 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.

@wpotrzebowski wpotrzebowski merged commit 66f49db into master Oct 28, 2022
@wpotrzebowski wpotrzebowski deleted the update_scripting branch October 28, 2022 19:30
@smk78 smk78 restored the update_scripting branch October 29, 2022 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants