diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..ec9502fe1 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +{ + "name": "pydata-book", + // We use the universal image and not the python one because containers based on the default image are not counted as used storage in github codespaces. + // https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces + "image": "mcr.microsoft.com/devcontainers/universal:2-linux", + "forwardPorts": [ + 6006, + 8888 + ], + "customizations": { + "codespaces": { + "openFiles": [ + "README.md" + ] + }, + "vscode": { + "extensions": [ + "ms-python.python", + "ms-toolsai.jupyter" + ] + } + }, + "onCreateCommand": "pip3 install --user -r requirements.txt", + "updateContentCommand": "python -m ipykernel install --user --name pydata-book --display-name 'Python 3 (pydata-book)'", + "postStartCommand": "jupyter lab --notebook-dir=/workspaces/pydata-book --ip='0.0.0.0' --port=8888 --no-browser" +} diff --git a/README.md b/README.md index d0618f48b..7c989f010 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,11 @@ reorganized book materials on the [`1st-edition` branch][2]. * [Chapter 13: Data Analysis Examples](http://nbviewer.ipython.org/github/pydata/pydata-book/blob/3rd-edition/ch13.ipynb) * [Appendix A: Advanced NumPy](http://nbviewer.ipython.org/github/pydata/pydata-book/blob/3rd-edition/appa.ipynb) +You can also run these notebooks using dev containers: + +* [![Open in Visual Studio Code](https://img.shields.io/static/v1?label=&message=Open%20in%20Visual%20Studio%20Code&color=blue&logo=visualstudiocode&style=flat)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/wesm/pydata-book) +* [![Open in Github Codespaces](https://img.shields.io/static/v1?label=&message=Open%20in%20Github%20Codespaces&color=2f362d&logo=github)](https://codespaces.new/wesm/pydata-book?quickstart=1&hide_repo_select=true) + ## License ### Code