Skip to content

Add codespace config for scipy 2023 #184

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

Merged
merged 36 commits into from
Jun 23, 2023

Conversation

lsetiawan
Copy link
Member

@lsetiawan lsetiawan commented Jun 23, 2023

Overview

This PR adds codespaces option for the repository based on the pangeo based image and the conda lock file. It will also copy the jupyter config file, as well as a vscode tasks json, so running clicking the url from terminal is the only thing a user would have to do.

@lsetiawan lsetiawan requested a review from scottyhq June 23, 2023 00:25
}
}
]
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This will now open up another terminal and run jupyter lab as soon as the codespaces open, so user would only need to cmd + click the link.

@lsetiawan
Copy link
Member Author

@dcherian Once this is merged, someone with admin access to the repo should make a codespaces pre-build to speed up launching process: https://docs.github.com/en/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds

@scottyhq
Copy link
Contributor

This is really neat @lsetiawan thanks for trying it out. I followed the instructions using the badge pointing to your fork, and am able to launch jupytlab but not execute 01_datastructures.ipynb. I'm seeing a lot of 403 messages in the vscode terminal:
Screenshot 2023-06-23 at 9 18 46 AM

@lsetiawan
Copy link
Member Author

I followed the instructions using the badge pointing to your fork, and am able to launch jupytlab but not execute 01_datastructures.ipynb. I'm seeing a lot of 403 messages in the vscode terminal:

Okay. Let me check it out... I haven't really tried the Jupyterlab instance when it's launched automatically, I used the manual launching and it worked. 😛

@dcherian
Copy link
Contributor

Once this is merged, someone with admin access to the repo should make a codespaces pre-build to speed up launching process: docs.github.com/en/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds

@lsetiawan (and everyone on the xarray-tutorial team) you should have Admin privileges on this repo :) Use wisely!

@scottyhq
Copy link
Contributor

someone with admin access to the repo should make a codespaces pre-build to speed up launching process: https://docs.github.com/en/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds

This would definitely be helpful b/c installing the conda environment takes a while. An alternative approach (that I think is effectively the same but with a little more transparency) would be to build a Docker image via github actions and store at ghcr.io/xarray-contrib/xarray-tutorial:latest and point to that in devcontainer.json?

@lsetiawan lsetiawan changed the title Add codespaces Add codespace config for scipy 2023 Jun 23, 2023
@lsetiawan
Copy link
Member Author

would be to build a Docker image via github actions and store at ghcr.io/xarray-contrib/xarray-tutorial:latest and point to that in devcontainer.json?

I wonder which storage is cheaper at that point since that would be more of a dev time cost.

Co-authored-by: Scott Henderson <scottyhq@gmail.com>
@scottyhq
Copy link
Contributor

I wonder which storage is cheaper at that point

I thought public repository packages on ghcr.io are free? In any case happy with the current setup which I tested (on Safari) and am successfully running the notebooks, and we can revisit in follow-up PRs

@lsetiawan
Copy link
Member Author

I thought public repository packages on ghcr.io are free

Idk, haven't really used that one ;) If so, then it's better to use that!

@lsetiawan
Copy link
Member Author

lsetiawan commented Jun 23, 2023

Alright ya'll I'm satisfied with this setup and it's ready for full review and testing. Advantage of this setup is user can run both from VSCode directly or JupyterLab.

Jupyterlab

Screenshot 2023-06-23 at 10 52 31 AM

Just need to click that link and away you go.

VSCode

Screenshot 2023-06-23 at 10 55 39 AM

Thanks @dcherian and @scottyhq for your inputs 🙏🏽

Copy link
Contributor

@scottyhq scottyhq left a comment

Choose a reason for hiding this comment

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

Confirmed it's working well for me (tested on both safari and chrome). Thanks @lsetiawan this is great!

@lsetiawan lsetiawan merged commit 0c582c7 into xarray-contrib:main Jun 23, 2023
@lsetiawan lsetiawan deleted the add_codespaces branch June 23, 2023 18:16
dcherian added a commit to dcherian/xarray-tutorial that referenced this pull request Jul 3, 2023
* upstream/main:
  move custom accessors to advanced and add more complex, runnable examples (xarray-contrib#168)
  Update and reorganize apply_ufunc material (xarray-contrib#180)
  Add jupyterlab-myst 2.0 and sphinx-exercise (xarray-contrib#187)
  Add jupyterlab-myst (xarray-contrib#182)
  Add codespace config for scipy 2023 (xarray-contrib#184)
  Add SciPy  Instructions (xarray-contrib#183)
  Edits to "Xarray and Dask" (xarray-contrib#177)
  Setup PR Preview workflow (xarray-contrib#175)
  contents write permissions for github token (xarray-contrib#178)
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

Successfully merging this pull request may close these issues.

3 participants