jupytutor 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jupytutor-0.1.4/.copier-answers.yml +15 -0
- jupytutor-0.1.4/.gitignore +125 -0
- jupytutor-0.1.4/.prettierignore +6 -0
- jupytutor-0.1.4/.yarnrc.yml +1 -0
- jupytutor-0.1.4/BUILD_GUIDE.md +253 -0
- jupytutor-0.1.4/CHANGELOG.md +5 -0
- jupytutor-0.1.4/LICENSE +29 -0
- jupytutor-0.1.4/MANIFEST.in +32 -0
- jupytutor-0.1.4/PKG-INFO +165 -0
- jupytutor-0.1.4/README.md +109 -0
- jupytutor-0.1.4/RELEASE.md +80 -0
- jupytutor-0.1.4/babel.config.js +1 -0
- jupytutor-0.1.4/install.json +5 -0
- jupytutor-0.1.4/jest.config.js +28 -0
- jupytutor-0.1.4/jupyter-server-config/jupytutor.json +7 -0
- jupytutor-0.1.4/jupytutor/__init__.py +38 -0
- jupytutor-0.1.4/jupytutor/_version.py +4 -0
- jupytutor-0.1.4/jupytutor/handlers.py +63 -0
- jupytutor-0.1.4/jupytutor/labextension/package.json +213 -0
- jupytutor-0.1.4/jupytutor/labextension/static/237.fd7acad62cc218608a2d.js +1 -0
- jupytutor-0.1.4/jupytutor/labextension/static/312.773d93d591cc8c4a6cc9.js +1 -0
- jupytutor-0.1.4/jupytutor/labextension/static/392.9bf7a51bbc79ca050285.js +2 -0
- jupytutor-0.1.4/jupytutor/labextension/static/392.9bf7a51bbc79ca050285.js.LICENSE.txt +9 -0
- jupytutor-0.1.4/jupytutor/labextension/static/772.d11ebfddc127515acc55.js +1 -0
- jupytutor-0.1.4/jupytutor/labextension/static/remoteEntry.c49f478ff52de713fe95.js +1 -0
- jupytutor-0.1.4/jupytutor/labextension/static/style.js +4 -0
- jupytutor-0.1.4/jupytutor/labextension/static/third-party-licenses.json +100 -0
- jupytutor-0.1.4/package.json +208 -0
- jupytutor-0.1.4/pyproject.toml +88 -0
- jupytutor-0.1.4/setup.py +1 -0
- jupytutor-0.1.4/src/Jupytutor.tsx +875 -0
- jupytutor-0.1.4/src/__tests__/jupytutor.spec.ts +9 -0
- jupytutor-0.1.4/src/__tests__/testContextRetriever.js +29 -0
- jupytutor-0.1.4/src/config.ts +43 -0
- jupytutor-0.1.4/src/helpers/contextRetrieval.ts +554 -0
- jupytutor-0.1.4/src/helpers/dev.js +5 -0
- jupytutor-0.1.4/src/helpers/getCellType.ts +129 -0
- jupytutor-0.1.4/src/helpers/makeAPIRequest.js +207 -0
- jupytutor-0.1.4/src/helpers/messageFormatting.tsx +90 -0
- jupytutor-0.1.4/src/helpers/parseNB.ts +210 -0
- jupytutor-0.1.4/src/helpers/textParsing.tsx +49 -0
- jupytutor-0.1.4/src/index.ts +343 -0
- jupytutor-0.1.4/style/Jupytutor.css +682 -0
- jupytutor-0.1.4/style/base.css +5 -0
- jupytutor-0.1.4/style/index.css +2 -0
- jupytutor-0.1.4/style/index.js +2 -0
- jupytutor-0.1.4/test_extension/__init__.py +16 -0
- jupytutor-0.1.4/tsconfig.json +27 -0
- jupytutor-0.1.4/tsconfig.test.json +3 -0
- jupytutor-0.1.4/ui-tests/README.md +167 -0
- jupytutor-0.1.4/ui-tests/jupyter_server_test_config.py +12 -0
- jupytutor-0.1.4/ui-tests/package.json +15 -0
- jupytutor-0.1.4/ui-tests/playwright.config.js +14 -0
- jupytutor-0.1.4/ui-tests/tests/jupytutor.spec.ts +21 -0
- jupytutor-0.1.4/ui-tests/yarn.lock +0 -0
- jupytutor-0.1.4/webpack.config.js +69 -0
- jupytutor-0.1.4/yarn.lock +10290 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
|
|
2
|
+
_commit: v4.3.8
|
|
3
|
+
_src_path: https://github.com/jupyterlab/extension-template
|
|
4
|
+
author_email: kevin.gillespie@berkeley.edu
|
|
5
|
+
author_name: Kevin Gillespie
|
|
6
|
+
has_binder: true
|
|
7
|
+
has_settings: false
|
|
8
|
+
kind: frontend
|
|
9
|
+
labextension_name: jupytutor
|
|
10
|
+
project_short_description: A Jupyter extension for providing students LLM feedback
|
|
11
|
+
based on autograder results and supplied course context.
|
|
12
|
+
python_name: jupytutor
|
|
13
|
+
repository: https://github.com/kevyg03/jupytutor
|
|
14
|
+
test: true
|
|
15
|
+
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
*.bundle.*
|
|
2
|
+
lib/
|
|
3
|
+
node_modules/
|
|
4
|
+
*.log
|
|
5
|
+
.eslintcache
|
|
6
|
+
.stylelintcache
|
|
7
|
+
*.egg-info/
|
|
8
|
+
.ipynb_checkpoints
|
|
9
|
+
*.tsbuildinfo
|
|
10
|
+
jupytutor/labextension
|
|
11
|
+
# Version file is handled by hatchling
|
|
12
|
+
jupytutor/_version.py
|
|
13
|
+
|
|
14
|
+
# Integration tests
|
|
15
|
+
ui-tests/test-results/
|
|
16
|
+
ui-tests/playwright-report/
|
|
17
|
+
|
|
18
|
+
# Created by https://www.gitignore.io/api/python
|
|
19
|
+
# Edit at https://www.gitignore.io/?templates=python
|
|
20
|
+
|
|
21
|
+
### Python ###
|
|
22
|
+
# Byte-compiled / optimized / DLL files
|
|
23
|
+
__pycache__/
|
|
24
|
+
*.py[cod]
|
|
25
|
+
*$py.class
|
|
26
|
+
|
|
27
|
+
# C extensions
|
|
28
|
+
*.so
|
|
29
|
+
|
|
30
|
+
# Distribution / packaging
|
|
31
|
+
.Python
|
|
32
|
+
build/
|
|
33
|
+
develop-eggs/
|
|
34
|
+
dist/
|
|
35
|
+
downloads/
|
|
36
|
+
eggs/
|
|
37
|
+
.eggs/
|
|
38
|
+
lib/
|
|
39
|
+
lib64/
|
|
40
|
+
parts/
|
|
41
|
+
sdist/
|
|
42
|
+
var/
|
|
43
|
+
wheels/
|
|
44
|
+
pip-wheel-metadata/
|
|
45
|
+
share/python-wheels/
|
|
46
|
+
.installed.cfg
|
|
47
|
+
*.egg
|
|
48
|
+
MANIFEST
|
|
49
|
+
|
|
50
|
+
# PyInstaller
|
|
51
|
+
# Usually these files are written by a python script from a template
|
|
52
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
53
|
+
*.manifest
|
|
54
|
+
*.spec
|
|
55
|
+
|
|
56
|
+
# Installer logs
|
|
57
|
+
pip-log.txt
|
|
58
|
+
pip-delete-this-directory.txt
|
|
59
|
+
|
|
60
|
+
# Unit test / coverage reports
|
|
61
|
+
htmlcov/
|
|
62
|
+
.tox/
|
|
63
|
+
.nox/
|
|
64
|
+
.coverage
|
|
65
|
+
.coverage.*
|
|
66
|
+
.cache
|
|
67
|
+
nosetests.xml
|
|
68
|
+
coverage/
|
|
69
|
+
coverage.xml
|
|
70
|
+
*.cover
|
|
71
|
+
.hypothesis/
|
|
72
|
+
.pytest_cache/
|
|
73
|
+
|
|
74
|
+
# Translations
|
|
75
|
+
*.mo
|
|
76
|
+
*.pot
|
|
77
|
+
|
|
78
|
+
# Scrapy stuff:
|
|
79
|
+
.scrapy
|
|
80
|
+
|
|
81
|
+
# Sphinx documentation
|
|
82
|
+
docs/_build/
|
|
83
|
+
|
|
84
|
+
# PyBuilder
|
|
85
|
+
target/
|
|
86
|
+
|
|
87
|
+
# pyenv
|
|
88
|
+
.python-version
|
|
89
|
+
|
|
90
|
+
# celery beat schedule file
|
|
91
|
+
celerybeat-schedule
|
|
92
|
+
|
|
93
|
+
# SageMath parsed files
|
|
94
|
+
*.sage.py
|
|
95
|
+
|
|
96
|
+
# Spyder project settings
|
|
97
|
+
.spyderproject
|
|
98
|
+
.spyproject
|
|
99
|
+
|
|
100
|
+
# Rope project settings
|
|
101
|
+
.ropeproject
|
|
102
|
+
|
|
103
|
+
# Mr Developer
|
|
104
|
+
.mr.developer.cfg
|
|
105
|
+
.project
|
|
106
|
+
.pydevproject
|
|
107
|
+
|
|
108
|
+
# mkdocs documentation
|
|
109
|
+
/site
|
|
110
|
+
|
|
111
|
+
# mypy
|
|
112
|
+
.mypy_cache/
|
|
113
|
+
.dmypy.json
|
|
114
|
+
dmypy.json
|
|
115
|
+
|
|
116
|
+
# Pyre type checker
|
|
117
|
+
.pyre/
|
|
118
|
+
|
|
119
|
+
# End of https://www.gitignore.io/api/python
|
|
120
|
+
|
|
121
|
+
# OSX files
|
|
122
|
+
.DS_Store
|
|
123
|
+
|
|
124
|
+
# Yarn cache
|
|
125
|
+
.yarn/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodeLinker: node-modules
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# Build and Publishing Guide for jupytutor
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This guide explains how to build and publish the jupytutor package to PyPI, ensuring all React components and JavaScript assets are included.
|
|
6
|
+
|
|
7
|
+
## What Was Fixed
|
|
8
|
+
|
|
9
|
+
The original configuration was missing the `hatch-jupyter-builder` in the build requirements, which caused the JavaScript/React components to not be built during package creation. The following changes were made:
|
|
10
|
+
|
|
11
|
+
1. **pyproject.toml updates:**
|
|
12
|
+
- Added `hatch-jupyter-builder>=0.5` to `build-system.requires`
|
|
13
|
+
- Added `[tool.hatch.build.targets.wheel]` section with artifacts
|
|
14
|
+
- Added `install-pre-commit-hook = false` to jupyter-builder configuration
|
|
15
|
+
|
|
16
|
+
2. **Created MANIFEST.in:**
|
|
17
|
+
- Ensures all source files, styles, and built assets are included in the source distribution
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
|
|
21
|
+
Before building, ensure you have:
|
|
22
|
+
|
|
23
|
+
- Python >= 3.9
|
|
24
|
+
- Node.js and npm/yarn
|
|
25
|
+
- `jlpm` (JupyterLab package manager)
|
|
26
|
+
|
|
27
|
+
Install build dependencies:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install build hatchling hatch-jupyter-builder jupyterlab
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Building the Package
|
|
34
|
+
|
|
35
|
+
### 1. Clean Previous Builds
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Clean JavaScript build artifacts
|
|
39
|
+
jlpm clean:all
|
|
40
|
+
|
|
41
|
+
# Clean Python build artifacts
|
|
42
|
+
rm -rf dist/ build/ *.egg-info
|
|
43
|
+
rm -rf jupytutor/labextension
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### 2. Build JavaScript/TypeScript Components
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Install npm dependencies
|
|
50
|
+
jlpm install
|
|
51
|
+
|
|
52
|
+
# Build the labextension
|
|
53
|
+
jlpm build:prod
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
This will:
|
|
57
|
+
|
|
58
|
+
- Compile TypeScript to JavaScript
|
|
59
|
+
- Bundle React components
|
|
60
|
+
- Create the labextension in `jupytutor/labextension/`
|
|
61
|
+
|
|
62
|
+
### 3. Build Python Package
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Build both wheel and source distribution
|
|
66
|
+
python -m build
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This will:
|
|
70
|
+
|
|
71
|
+
- Trigger the `hatch-jupyter-builder` to build the extension
|
|
72
|
+
- Create the wheel (`.whl`) in `dist/`
|
|
73
|
+
- Create the source distribution (`.tar.gz`) in `dist/`
|
|
74
|
+
|
|
75
|
+
### 4. Verify the Build
|
|
76
|
+
|
|
77
|
+
Check that the wheel contains the labextension:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# List contents of the wheel
|
|
81
|
+
unzip -l dist/jupytutor-*.whl | grep labextension
|
|
82
|
+
|
|
83
|
+
# You should see entries like:
|
|
84
|
+
# share/jupyter/labextensions/jupytutor/static/...
|
|
85
|
+
# share/jupyter/labextensions/jupytutor/package.json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Or use a tool like `check-wheel-contents`:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install check-wheel-contents
|
|
92
|
+
check-wheel-contents dist/jupytutor-*.whl
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Publishing to PyPI
|
|
96
|
+
|
|
97
|
+
### Test PyPI (Recommended First)
|
|
98
|
+
|
|
99
|
+
1. Register at https://test.pypi.org/
|
|
100
|
+
2. Create an API token
|
|
101
|
+
3. Upload:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pip install twine
|
|
105
|
+
twine upload --repository testpypi dist/*
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
4. Test installation:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pip install --index-url https://test.pypi.org/simple/ jupytutor
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Production PyPI
|
|
115
|
+
|
|
116
|
+
1. Register at https://pypi.org/
|
|
117
|
+
2. Create an API token
|
|
118
|
+
3. Upload:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
twine upload dist/*
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Development Installation
|
|
125
|
+
|
|
126
|
+
For development, use editable install:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Install in development mode
|
|
130
|
+
pip install -e .
|
|
131
|
+
|
|
132
|
+
# In another terminal, watch for changes
|
|
133
|
+
jlpm watch
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Troubleshooting
|
|
137
|
+
|
|
138
|
+
### React Components Not Showing Up
|
|
139
|
+
|
|
140
|
+
If React components aren't appearing after installation:
|
|
141
|
+
|
|
142
|
+
1. Check that labextension is installed:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
jupyter labextension list
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
2. Rebuild the extension:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
jlpm build:prod
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
3. Verify the built files exist:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
ls -la jupytutor/labextension/static/
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
4. Check browser console for errors
|
|
161
|
+
|
|
162
|
+
### Build Failures
|
|
163
|
+
|
|
164
|
+
If the build fails:
|
|
165
|
+
|
|
166
|
+
1. Ensure all dependencies are installed:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
jlpm install
|
|
170
|
+
pip install -e ".[dev]"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
2. Clear all caches:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
jlpm clean:all
|
|
177
|
+
rm -rf node_modules
|
|
178
|
+
rm -rf ~/.jupyter/lab/staging
|
|
179
|
+
jlpm install
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
3. Check for TypeScript errors:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
jlpm build:lib
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Key Files
|
|
189
|
+
|
|
190
|
+
- `pyproject.toml` - Python package configuration
|
|
191
|
+
- `package.json` - JavaScript package configuration
|
|
192
|
+
- `MANIFEST.in` - Source distribution file inclusion rules
|
|
193
|
+
- `jupytutor/labextension/` - Built JavaScript assets (auto-generated)
|
|
194
|
+
- `src/` - TypeScript/React source code
|
|
195
|
+
- `style/` - CSS styles
|
|
196
|
+
|
|
197
|
+
## CI/CD Integration
|
|
198
|
+
|
|
199
|
+
For automated publishing, you can use GitHub Actions. Example workflow:
|
|
200
|
+
|
|
201
|
+
```yaml
|
|
202
|
+
name: Publish to PyPI
|
|
203
|
+
|
|
204
|
+
on:
|
|
205
|
+
release:
|
|
206
|
+
types: [published]
|
|
207
|
+
|
|
208
|
+
jobs:
|
|
209
|
+
publish:
|
|
210
|
+
runs-on: ubuntu-latest
|
|
211
|
+
steps:
|
|
212
|
+
- uses: actions/checkout@v3
|
|
213
|
+
|
|
214
|
+
- uses: actions/setup-python@v4
|
|
215
|
+
with:
|
|
216
|
+
python-version: '3.11'
|
|
217
|
+
|
|
218
|
+
- uses: actions/setup-node@v3
|
|
219
|
+
with:
|
|
220
|
+
node-version: '18'
|
|
221
|
+
|
|
222
|
+
- name: Install dependencies
|
|
223
|
+
run: |
|
|
224
|
+
pip install build twine
|
|
225
|
+
npm install -g yarn
|
|
226
|
+
|
|
227
|
+
- name: Build
|
|
228
|
+
run: |
|
|
229
|
+
jlpm install
|
|
230
|
+
jlpm build:prod
|
|
231
|
+
python -m build
|
|
232
|
+
|
|
233
|
+
- name: Publish
|
|
234
|
+
env:
|
|
235
|
+
TWINE_USERNAME: __token__
|
|
236
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
237
|
+
run: twine upload dist/*
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Version Management
|
|
241
|
+
|
|
242
|
+
The package version is managed through `package.json` using `hatch-nodejs-version`. To bump the version:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Update version in package.json
|
|
246
|
+
npm version patch # or minor, or major
|
|
247
|
+
|
|
248
|
+
# Commit the change
|
|
249
|
+
git add package.json
|
|
250
|
+
git commit -m "Bump version to X.Y.Z"
|
|
251
|
+
git tag vX.Y.Z
|
|
252
|
+
git push && git push --tags
|
|
253
|
+
```
|
jupytutor-0.1.4/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Kevin Gillespie
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include README.md
|
|
3
|
+
include pyproject.toml
|
|
4
|
+
include install.json
|
|
5
|
+
include babel.config.js
|
|
6
|
+
include jest.config.js
|
|
7
|
+
include tsconfig.json
|
|
8
|
+
include tsconfig.test.json
|
|
9
|
+
include webpack.config.js
|
|
10
|
+
include package.json
|
|
11
|
+
include yarn.lock
|
|
12
|
+
|
|
13
|
+
graft jupytutor/labextension
|
|
14
|
+
graft jupytutor
|
|
15
|
+
graft jupyter-server-config
|
|
16
|
+
graft src
|
|
17
|
+
graft style
|
|
18
|
+
|
|
19
|
+
# Patterns to exclude from any directory
|
|
20
|
+
global-exclude *~
|
|
21
|
+
global-exclude *.pyc
|
|
22
|
+
global-exclude *.pyo
|
|
23
|
+
global-exclude .git
|
|
24
|
+
global-exclude .ipynb_checkpoints
|
|
25
|
+
|
|
26
|
+
# Exclude specific directories
|
|
27
|
+
prune .github
|
|
28
|
+
prune binder
|
|
29
|
+
prune node_modules
|
|
30
|
+
prune lib
|
|
31
|
+
prune ui-tests
|
|
32
|
+
|
jupytutor-0.1.4/PKG-INFO
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: jupytutor
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: A Jupyter extension for providing students LLM feedback based on autograder results and supplied course context.
|
|
5
|
+
Project-URL: Homepage, https://github.com/kevyg03/jupytutor
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/kevyg03/jupytutor/issues
|
|
7
|
+
Project-URL: Repository, https://github.com/kevyg03/jupytutor.git
|
|
8
|
+
Author-email: Kevin Gillespie <kevin.gillespie@berkeley.edu>
|
|
9
|
+
License: BSD 3-Clause License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2025, Kevin Gillespie
|
|
12
|
+
All rights reserved.
|
|
13
|
+
|
|
14
|
+
Redistribution and use in source and binary forms, with or without
|
|
15
|
+
modification, are permitted provided that the following conditions are met:
|
|
16
|
+
|
|
17
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
18
|
+
list of conditions and the following disclaimer.
|
|
19
|
+
|
|
20
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
21
|
+
this list of conditions and the following disclaimer in the documentation
|
|
22
|
+
and/or other materials provided with the distribution.
|
|
23
|
+
|
|
24
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
25
|
+
contributors may be used to endorse or promote products derived from
|
|
26
|
+
this software without specific prior written permission.
|
|
27
|
+
|
|
28
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
29
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
30
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
31
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
32
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
33
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
34
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
35
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
36
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
37
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
38
|
+
License-File: LICENSE
|
|
39
|
+
Keywords: jupyter,jupyterlab,jupyterlab-extension
|
|
40
|
+
Classifier: Framework :: Jupyter
|
|
41
|
+
Classifier: Framework :: Jupyter :: JupyterLab
|
|
42
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: 4
|
|
43
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
|
|
44
|
+
Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
|
|
45
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
46
|
+
Classifier: Programming Language :: Python
|
|
47
|
+
Classifier: Programming Language :: Python :: 3
|
|
48
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
49
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
50
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
51
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
52
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
53
|
+
Requires-Python: >=3.9
|
|
54
|
+
Requires-Dist: jupyter-server<3,>=2.0.0
|
|
55
|
+
Description-Content-Type: text/markdown
|
|
56
|
+
|
|
57
|
+
# jupytutor
|
|
58
|
+
|
|
59
|
+
[](https://github.com/kevyg03/jupytutor/actions/workflows/build.yml)
|
|
60
|
+
[](https://mybinder.org/v2/gh/kevyg03/jupytutor/main?urlpath=lab)
|
|
61
|
+
|
|
62
|
+
A Jupyter extension for providing students LLM feedback based on autograder results and supplied course context.
|
|
63
|
+
|
|
64
|
+
## Requirements
|
|
65
|
+
|
|
66
|
+
- JupyterLab >= 4.0.0
|
|
67
|
+
- Python >= 3.9
|
|
68
|
+
|
|
69
|
+
## Installation
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pip install jupytutor
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Configuration
|
|
76
|
+
|
|
77
|
+
jupytutor supports custom configuration through a JSON file in your home directory.
|
|
78
|
+
|
|
79
|
+
### Quick Setup
|
|
80
|
+
|
|
81
|
+
1. Create the config directory:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
mkdir -p ~/.config/jupytutor
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
2. Create the config file at
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
~/.config/jupytutor/config.json
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
3. Edit the config file with your settings (reference the jupytutor repository (https://github.com/kevyg03/jupytutor), src/config.ts)
|
|
94
|
+
|
|
95
|
+
4. Restart JupyterLab
|
|
96
|
+
|
|
97
|
+
The config.json can only contain keys that exist in src/config.ts. Keys that aren't provided will default to the values set by config.ts.
|
|
98
|
+
|
|
99
|
+
## Testing Locally
|
|
100
|
+
|
|
101
|
+
Create a new conda environment (conda create -n <env_name>) and enter it, then run:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pip install jupytutor
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
From another terminal in the same environment, run
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
jupyter lab
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Right click and hit "Inspect Element" and navigate to "Console" to confirm everything is activated.
|
|
114
|
+
|
|
115
|
+
## Contributing
|
|
116
|
+
|
|
117
|
+
### Development install
|
|
118
|
+
|
|
119
|
+
Note: You will need NodeJS to build the extension package.
|
|
120
|
+
|
|
121
|
+
The `jlpm` command is JupyterLab's pinned version of
|
|
122
|
+
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
|
|
123
|
+
`yarn` or `npm` in lieu of `jlpm` below.
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Clone the repo to your local environment
|
|
127
|
+
# Change directory to the jupytutor directory
|
|
128
|
+
# Install package in development mode
|
|
129
|
+
pip install -e "."
|
|
130
|
+
# Link your development version of the extension with JupyterLab
|
|
131
|
+
jupyter labextension develop . --overwrite
|
|
132
|
+
# Rebuild extension Typescript source after making changes
|
|
133
|
+
jlpm build
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Watch the source directory in one terminal, automatically rebuilding when needed
|
|
140
|
+
jlpm watch
|
|
141
|
+
# Run JupyterLab in another terminal
|
|
142
|
+
jupyter lab
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
|
|
146
|
+
|
|
147
|
+
By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
jupyter lab build --minimize=False
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Development uninstall
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
pip uninstall jupytutor
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
|
|
160
|
+
command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
|
|
161
|
+
folder is located. Then you can remove the symlink named `jupytutor` within that folder.
|
|
162
|
+
|
|
163
|
+
### Packaging the extension
|
|
164
|
+
|
|
165
|
+
See [RELEASE](RELEASE.md)
|