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

Sync climate analysis notebook and a link to open in jupyterhub #19

Closed
2 tasks done
tlogan2000 opened this issue Mar 15, 2021 · 9 comments
Closed
2 tasks done

Sync climate analysis notebook and a link to open in jupyterhub #19

tlogan2000 opened this issue Mar 15, 2021 · 9 comments
Assignees

Comments

@tlogan2000
Copy link
Collaborator

tlogan2000 commented Mar 15, 2021

Add a user redirect link to climate analysis notebooks

@tlogan2000
Copy link
Collaborator Author

@tlvu if you can take care of the sync .. I'll be able to do the rest. We can discuss if these should be tested on Jenkins. There might be a few issues in the length of time they take to run (notebook 3 in particular) but 4 and 5 depend on the output from 3... can discuss together this week

@tlvu
Copy link
Collaborator

tlvu commented Mar 15, 2021

@tlogan2000 sure, we can probably discuss on Wednesday. Trying to get Finch out the door and fixing the regridding notebook right now.

By the way, I don't quite understand 'Add 'open in PAVICS' user redirect links in the 'climate_analysis.html' iframes'. For Wednesday I guess.

@tlogan2000
Copy link
Collaborator Author

@tlvu small addition ... with the notebooks there is a small subfolder 'tutorial_data' with a few geojsons that needs to be synced as well...

@tlvu
Copy link
Collaborator

tlvu commented Mar 16, 2021

Since notebook files in here is private, I assume we do not want them to show up on PAVICS deployment on other orgs?

For context, the "standard" tutorial notebook sync is available for all orgs that deploy PAVICS.

@tlogan2000
Copy link
Collaborator Author

@tlvu examples are pretty specific to Ouranos and our jupyterhub I think. Can we keep them on our jupyter only for now? I am going to get some feedback over the next couple of weeks from ouranos people who will test drive the tutorial. Longer term I don't have a major issue with these becoming public examples though. Users would need a pavics jupyter account to run them on boreas, but other organizations should be able to run them making our thredds work a little bit but calculations running on their end. @huard any opinion on the visibility of the pavics-landing notebooks?

@tlvu
Copy link
Collaborator

tlvu commented Mar 17, 2021

Sorry just to be clear, I am usually for maximum sharing/public stuff but I am absolutely not against having things in-house only.

Except in this case, there a little technical hurdle for notebooks in a private repo: the standard way to deploy notebooks to Jupyter env and Jenkins test all assume public notebooks repos so this one will not fit without some good amount of refactoring.

It's one of the earlier things I did at Ouranos and it's much less "generic" compared to the few later things (the deploy any repos anywhere and the docker launcher that can launch any scripts that bring their own docker runtime, sort of BYOD but for scripts).

PR bird-house/birdhouse-deploy-ouranos#8 to deploy notebooks here in this private repo is leveraging the "deploy any repos anywhere" and you see it's pretty much just config, almost no code, very generic mechanism.

So I do plan to modernize the old notebooks deploy mechanism as well, but it has never been high in priorities because there was no need for it, until now.

So short term I think we can live with 2 different notebook deployment mechanism, for long term, we should plan for a refactoring.

@tlvu
Copy link
Collaborator

tlvu commented Mar 17, 2021

Issue opened for the refactoring of the Jenkins test framework Ouranosinc/PAVICS-e2e-workflow-tests#57

tlvu added a commit to bird-house/birdhouse-deploy-ouranos that referenced this issue Apr 9, 2021
Deploy PAVICS-landing notebooks to Jupyter env

For issue Ouranosinc/PAVICS-landing#19.

Need updated Jupyter env Ouranosinc/PAVICS-e2e-workflow-tests#68.

Given the PAVICS-landing is a private repo, I was not able to hook into the existing notebooks deployment (that assume all notebook repos are public) that controls the `tutorial-notebooks` folder so the new folder `pavics-homepage` has to be on its own and not under `tutorial-notebooks`.

If you absolutely want under `tutorial-notebooks`, I will have to migrate the existing notebooks deployment to use this new generic way to deploy anything, this will take much more time.

So the current config will check for changes and autodeploy every hour (`DEPLOY_DATA_JOB_SCHEDULE`).  I also added the `.geojson` data files.  If in the future there are new data file type, you can simply add the new extension to the list in `rsync_extra_opts`.

I tried to run all the notebooks and the `PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb` have this error `OSError: [Errno 30] Read-only file system: 'output'` at the last cell.

Have not had time to investigate but on the production Jupyter env, the `/pavics-homepage` dir is read-only so if you need to write some temporary file, you have to select another location, like under `/tmp` for example.

All other notebooks seem to work fine.

It's live on our staging https://medus.ouranos.ca/

![Screenshot from 2021-03-16 23-27-39](https://user-images.githubusercontent.com/11966697/111410728-a7f23800-86af-11eb-98d5-3ff82b0b760f.png)
@tlvu
Copy link
Collaborator

tlvu commented Apr 26, 2021

@tlogan2000 Is this done? Or only missing the part about "Add 'open in PAVICS' user redirect links in the 'climate_analysis.html' iframes"

Notebooks sync already done in bird-house/birdhouse-deploy-ouranos#8.

@tlogan2000
Copy link
Collaborator Author

@tlogan2000 Is this done? Or only missing the part about "Add 'open in PAVICS' user redirect links in the 'climate_analysis.html' iframes"

Notebooks sync already done in bird-house/birdhouse-deploy-ouranos#8.

Yes I have this working now with the jupyter user-redirect links

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

2 participants