|
1 | | -# jupyterlab_deepnote |
| 1 | + |
| 2 | +<!---This is a placeholder for the Deepnote + jupyterlab logo--> |
| 3 | + |
| 4 | +<div align="center"> |
2 | 5 |
|
3 | 6 | [](https://github.com/deepnote/jupyterlab-deepnote/actions/workflows/ci.yml) |
4 | 7 | [](https://codecov.io/gh/deepnote/jupyterlab-deepnote) |
| 8 | +[](https://pypi.org/project/jupyterlab-deepnote/) |
| 9 | +[](https://pypi.org/project/jupyterlab-deepnote/) |
| 10 | +[](https://opensource.org/licenses/BSD-3-Clause) |
| 11 | + |
| 12 | +**A JupyterLab extension for viewing Deepnote projects (`.deepnote` files) directly in JupyterLab** |
| 13 | + |
| 14 | +[Installation](#installation) • [Features](#features) • [Usage](#usage) • [Contributing](#contributing) • [License](#license) |
| 15 | + |
| 16 | +</div> |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## Overview |
| 21 | + |
| 22 | +`jupyterlab-deepnote` is a JupyterLab extension that enables you to open and view [Deepnote](https://deepnote.com) project files (`.deepnote` format) directly within JupyterLab. This extension provides a seamless read-only viewer for Deepnote notebooks, allowing you to explore Deepnote projects without leaving your JupyterLab environment. |
| 23 | + |
| 24 | +### Key Features |
5 | 25 |
|
6 | | -Read‑only viewer for Deepnote `.deepnote` files inside JupyterLab. |
| 26 | +- 📂 **Open Deepnote Files**: View `.deepnote` project files containing Deepnote notebooks in JupyterLab |
| 27 | +- 📓 **Multi-Notebook Support**: Switch between multiple notebooks within a single `.deepnote` file |
| 28 | +- 👁️ **Read-Only Mode**: View notebook content safely without modifying the original `.deepnote` file |
| 29 | +- 🔄 **Seamless Integration**: Works natively with JupyterLab's notebook interface |
| 30 | +- 🎨 **Deepnote Block Support**: Renders Deepnote-specific block types as Jupyter cells |
7 | 31 |
|
8 | | -## Requirements |
| 32 | +## Installation |
9 | 33 |
|
10 | | -- Python 3.9 or higher |
11 | | -- JupyterLab 4.5.0 or higher |
| 34 | +### Requirements |
12 | 35 |
|
13 | | -## Install |
| 36 | +- **Python**: 3.9 or higher |
| 37 | +- **JupyterLab**: 4.0.0 or higher |
| 38 | + |
| 39 | +### Install via pip |
14 | 40 |
|
15 | 41 | Install the extension using pip: |
16 | 42 |
|
17 | 43 | ```bash |
18 | 44 | pip install jupyterlab_deepnote |
19 | 45 | ``` |
20 | 46 |
|
| 47 | +The extension will be automatically enabled after installation. |
| 48 | + |
| 49 | +### Verify Installation |
| 50 | + |
| 51 | +Check that the extension is properly installed and enabled: |
| 52 | + |
| 53 | +```bash |
| 54 | +# Check server extension |
| 55 | +jupyter server extension list |
| 56 | + |
| 57 | +# Check frontend extension |
| 58 | +jupyter labextension list |
| 59 | +``` |
| 60 | + |
| 61 | +You should see `jupyterlab_deepnote` listed in both outputs. |
| 62 | + |
21 | 63 | ## Usage |
22 | 64 |
|
23 | | -After installation you can: |
| 65 | +### Opening Deepnote Files |
| 66 | + |
| 67 | +1. **Launch JupyterLab**: |
| 68 | + ```bash |
| 69 | + jupyter lab |
| 70 | + ``` |
| 71 | + |
| 72 | +2. **Open a `.deepnote` file**: |
| 73 | + - Use the file browser to navigate to your `.deepnote` file |
| 74 | + - Double-click the file to open it in the notebook viewer |
| 75 | + |
| 76 | +3. **Switch Between Notebooks** (if the `.deepnote` file contains multiple notebooks): |
| 77 | + - Use the notebook picker dropdown in the toolbar |
| 78 | + - Select the notebook you want to view |
| 79 | + |
| 80 | +### Features in Detail |
24 | 81 |
|
25 | | -- Open Deepnote files (`.deepnote`) containing Deepnote projects in JupyterLab |
26 | | -- Switch between notebooks inside a `.deepnote` file |
27 | | -- View content in **read‑only** mode (no editing or saving back to the `.deepnote` file) |
| 82 | +#### Read-Only Viewing |
| 83 | +All content is displayed in read-only mode. You cannot: |
| 84 | +- Edit cell content |
| 85 | +- Execute cells |
| 86 | +- Save changes back to the `.deepnote` file |
| 87 | + |
| 88 | +This ensures the integrity of your original Deepnote project files. |
| 89 | + |
| 90 | +#### Supported Content |
| 91 | +The extension converts Deepnote blocks to Jupyter cells, supporting: |
| 92 | +- Code cells (Python and other languages) |
| 93 | +- Markdown cells |
| 94 | +- Cell outputs and visualizations |
| 95 | + |
| 96 | +## Architecture |
| 97 | + |
| 98 | +This extension consists of two main components: |
| 99 | + |
| 100 | +- **Server Extension**: Handles `.deepnote` file parsing and conversion to Jupyter notebook format |
| 101 | +- **Frontend Extension**: Provides the JupyterLab UI integration and notebook picker widget |
| 102 | + |
| 103 | +The extension uses a custom content provider to intercept `.deepnote` file requests and transform them into Jupyter-compatible notebook content. |
28 | 104 |
|
29 | 105 | ## Troubleshooting |
30 | 106 |
|
31 | | -If you encounter issues with the extension, verify that both the server and frontend extensions are properly installed and enabled. |
| 107 | +### Extension Not Loading |
32 | 108 |
|
33 | | -Check server extensions: |
| 109 | +If the extension doesn't appear to be working: |
34 | 110 |
|
35 | | -```bash |
36 | | -jupyter server extension list |
37 | | -``` |
| 111 | +1. **Verify installation**: |
| 112 | + ```bash |
| 113 | + jupyter server extension list |
| 114 | + jupyter labextension list |
| 115 | + ``` |
38 | 116 |
|
39 | | -Check frontend extensions: |
| 117 | +2. **Rebuild JupyterLab** (if installed from source): |
| 118 | + ```bash |
| 119 | + jupyter lab build |
| 120 | + ``` |
40 | 121 |
|
41 | | -```bash |
42 | | -jupyter labextension list |
43 | | -``` |
| 122 | +3. **Check for errors**: |
| 123 | + ```bash |
| 124 | + jupyter lab --debug |
| 125 | + ``` |
| 126 | + |
| 127 | +### Common Issues |
| 128 | + |
| 129 | +- **`.deepnote` files not opening**: Ensure the file extension is exactly `.deepnote` |
| 130 | +- **Missing notebooks**: Verify the `.deepnote` file contains valid YAML-formatted Deepnote project data |
| 131 | +- **Extension conflicts**: Try disabling other notebook-related extensions temporarily |
| 132 | + |
| 133 | +### Getting Help |
| 134 | + |
| 135 | +If you encounter issues: |
| 136 | +1. Check the [GitHub Issues](https://github.com/deepnote/jupyterlab-deepnote/issues) for similar problems |
| 137 | +2. Review the [CONTRIBUTING.md](CONTRIBUTING.md) for development setup |
| 138 | +3. Open a new issue with detailed information about your environment and the problem |
44 | 139 |
|
45 | 140 | ## Uninstall |
46 | 141 |
|
47 | | -To remove the extension, run: |
| 142 | +To remove the extension: |
48 | 143 |
|
49 | 144 | ```bash |
50 | 145 | pip uninstall jupyterlab_deepnote |
51 | 146 | ``` |
52 | 147 |
|
| 148 | +After uninstalling, restart JupyterLab for the changes to take effect. |
| 149 | + |
| 150 | +## Development |
| 151 | + |
| 152 | +For development setup, testing, and contributing guidelines, please see [CONTRIBUTING.md](CONTRIBUTING.md). |
| 153 | + |
| 154 | +### Quick Start for Contributors |
| 155 | + |
| 156 | +```bash |
| 157 | +# Clone the repository |
| 158 | +git clone https://github.com/deepnote/jupyterlab-deepnote.git |
| 159 | +cd jupyterlab-deepnote |
| 160 | + |
| 161 | +# Install in development mode |
| 162 | +pip install -e ".[test]" |
| 163 | +jupyter labextension develop . --overwrite |
| 164 | + |
| 165 | +# Watch for changes |
| 166 | +jlpm watch |
| 167 | +``` |
| 168 | + |
53 | 169 | ## Contributing |
54 | 170 |
|
55 | | -Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute to this project. |
| 171 | +We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for: |
| 172 | +- Development setup instructions |
| 173 | +- Code style and testing requirements |
| 174 | +- Pull request process |
| 175 | +- Release workflow |
| 176 | + |
| 177 | +## License |
| 178 | + |
| 179 | +This project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details. |
| 180 | + |
| 181 | +## Acknowledgments |
| 182 | + |
| 183 | +- Built with the [JupyterLab Extension Template](https://github.com/jupyterlab/extension-template) |
| 184 | +- Developed by [Deepnote](https://deepnote.com) |
| 185 | + |
| 186 | +## Related Projects |
| 187 | + |
| 188 | +- [Deepnote](https://deepnote.com) - Collaborative data science notebook |
| 189 | +- [JupyterLab](https://jupyterlab.readthedocs.io/) - Extensible environment for interactive computing |
| 190 | + |
| 191 | +--- |
| 192 | + |
| 193 | +<div align="center"> |
| 194 | + |
| 195 | +**[⬆ Back to Top](#jupyterlab-deepnote-extension)** |
| 196 | + |
| 197 | +Made with ❤️ by the Deepnote team |
| 198 | + |
| 199 | +</div> |
0 commit comments