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

Tutorials don't work properly in the SWAN galley #45

Open
omazapa opened this issue Jul 15, 2020 · 5 comments
Open

Tutorials don't work properly in the SWAN galley #45

omazapa opened this issue Jul 15, 2020 · 5 comments

Comments

@omazapa
Copy link

omazapa commented Jul 15, 2020

Hello Guys,

At this moment the tutorials are not working properly in SWAN gallery,

can you please apply the updates to put it work?

We would like to have this working properly for the users.

Best Regards
Omar.

@vvolkl
Copy link
Member

vvolkl commented Jul 16, 2020

Hi Omar!

Following the feedback after the last workshop we switched to distributing these tutorials as a static website generated from markdown files similar to LHCb. Is it possible to point the gallery to the branch pre-starterkit? That should work for now (using an older version of the tutorials, but still).
I'd be interested to add notebook support in the future too, but there are two issues that should be adressed in swan:

  • We'd like to be able to add the path to the setup script to the "Swan Button" url opening the notebooks.
  • It would be nice if Swan could generate notebooks from markdown files via nbconvert or something (although maybe I can also set up the CI to do that)

Can you comment if the things I mentioned are feasible?
Cheers,
Valentin

@ozapatam
Copy link

Hi Valentin,
Thanks for you reply,
Yes I think we can use the branch pre-starterkit,
relate to the issues for the future support in SWAN, I think @diocas or @etejedor can give some comments.

Cheers
Omar.

@diocas
Copy link
Contributor

diocas commented Jul 16, 2020

Hi Valentin,

You want that "opening in swan" sets a startup script, so that the user environment gets configured, is that it?
I would say we cannot do this atm because, when you open with SWAN, you might already have a session created (so the configuration already happened). But... We're re-doing the way our users configure the environment and select the software stack, so this will be possible by adding a file to your repo. But we just started looking at this and will take some time. This will come with Jupyterlab.

The second question I don't fully understand. You have a markdown file and want to convert to a notebook? Can you give us an example? AFAIK, nbconvert doesn't do this, only the opposite.

Cheers,
Diogo

@vvolkl
Copy link
Member

vvolkl commented Jul 17, 2020

Hi Diogo,

You want that "opening in swan" sets a startup script, so that the user environment gets configured, is that it?

Yes exactly. All our notebooks need FCC software from CVMFS, and that was one of the common issues. I don't think it's that urgent, but if this feature can be included in a future release, that would be great!

For the second part, you are absolutely correct, nbconvert, cannot do that, I was thinking of notedown: https://github.com/aaren/notedown . As an example trying this with full-detector-simulations/FccCaloPerformance/FccCaloPerformance.md works very well. So I could add this to the CI and push the resulting notebooks to the gh-pages branch. But I think it would also be a very nice feature if SWAN could handle the conversion from markdown by itself, since it is a much better format for version control.
Cheers,
Valentin

@diocas
Copy link
Contributor

diocas commented Jul 17, 2020

We generate our galleries automatically from repos (that are added as submodules), so I guess this needs to be added on our side. But it shouldn't be hard at all, so we can do it!

But how should we proceed right now? I've checked your repo, in the pre-starterkit branch, but this has some problems. The first one is that the notebooks were moved outside of the notebooks folder, which is fine but you need to move the nbSnapshots with them. Then we need to know, from these notebooks, which ones should be added in the gallery (I think some might have changed name).
But you also said that they are not the latest version, so we wonder whether we should publish them in the first place as we would prefer to have the latest/still working versions. Would it be possible for you to update them? Or you think those versions are still valid?
Another problem, but not a big one, is that we cannot have the "open in swan" button for the full repo, as we do not support branches atm. But we can just remove this option and let the users open the notebooks individually.

Please let me know how you prefer to do this. For us any option is valid. We just cannot publish the gallery as is, because the build process fails. You can have a look on what we have now: https://raw.githubusercontent.com/swan-cern/gallery/mkdocs/docs/fcc.md

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants