nbgitpuller-jl-interface 0.2.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.
Files changed (51) hide show
  1. nbgitpuller_jl_interface-0.2.4/.copier-answers.yml +15 -0
  2. nbgitpuller_jl_interface-0.2.4/.gitignore +131 -0
  3. nbgitpuller_jl_interface-0.2.4/.prettierignore +6 -0
  4. nbgitpuller_jl_interface-0.2.4/.vscode/settings.json +4 -0
  5. nbgitpuller_jl_interface-0.2.4/.yarnrc.yml +2 -0
  6. nbgitpuller_jl_interface-0.2.4/CHANGELOG.md +22 -0
  7. nbgitpuller_jl_interface-0.2.4/LICENSE +29 -0
  8. nbgitpuller_jl_interface-0.2.4/PKG-INFO +213 -0
  9. nbgitpuller_jl_interface-0.2.4/README.md +147 -0
  10. nbgitpuller_jl_interface-0.2.4/RELEASE.md +80 -0
  11. nbgitpuller_jl_interface-0.2.4/babel.config.js +1 -0
  12. nbgitpuller_jl_interface-0.2.4/conftest.py +8 -0
  13. nbgitpuller_jl_interface-0.2.4/install.json +5 -0
  14. nbgitpuller_jl_interface-0.2.4/jest.config.js +31 -0
  15. nbgitpuller_jl_interface-0.2.4/jupyter-config/server-config/nbgitpuller_jl_interface.json +7 -0
  16. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/__init__.py +36 -0
  17. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/_version.py +4 -0
  18. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/labextension/package.json +219 -0
  19. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/labextension/schemas/nbgitpuller-jl-interface/package.json.orig +214 -0
  20. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/labextension/schemas/nbgitpuller-jl-interface/plugin.json +41 -0
  21. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/labextension/static/293.bece27d6c314a7589472.js +1 -0
  22. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/labextension/static/728.c80bd4566fc22d8dd093.js +1 -0
  23. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/labextension/static/remoteEntry.9fc18bb225b134e17c4d.js +1 -0
  24. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/labextension/static/style.js +4 -0
  25. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/labextension/static/third-party-licenses.json +16 -0
  26. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/routes.py +96 -0
  27. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/tests/__init__.py +1 -0
  28. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/tests/test_routes.py +224 -0
  29. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/tests/test_utils.py +276 -0
  30. nbgitpuller_jl_interface-0.2.4/nbgitpuller_jl_interface/utils.py +125 -0
  31. nbgitpuller_jl_interface-0.2.4/package.json +214 -0
  32. nbgitpuller_jl_interface-0.2.4/pyproject.toml +93 -0
  33. nbgitpuller_jl_interface-0.2.4/schema/plugin.json +41 -0
  34. nbgitpuller_jl_interface-0.2.4/setup.py +1 -0
  35. nbgitpuller_jl_interface-0.2.4/src/__tests__/nbgitpuller_jb_interface.spec.ts +173 -0
  36. nbgitpuller_jl_interface-0.2.4/src/index.ts +86 -0
  37. nbgitpuller_jl_interface-0.2.4/src/request.ts +51 -0
  38. nbgitpuller_jl_interface-0.2.4/src/utils.ts +259 -0
  39. nbgitpuller_jl_interface-0.2.4/style/base.css +80 -0
  40. nbgitpuller_jl_interface-0.2.4/style/index.css +1 -0
  41. nbgitpuller_jl_interface-0.2.4/style/index.js +1 -0
  42. nbgitpuller_jl_interface-0.2.4/style/tmp_logo.svg +2 -0
  43. nbgitpuller_jl_interface-0.2.4/tsconfig.json +25 -0
  44. nbgitpuller_jl_interface-0.2.4/tsconfig.test.json +3 -0
  45. nbgitpuller_jl_interface-0.2.4/ui-tests/README.md +167 -0
  46. nbgitpuller_jl_interface-0.2.4/ui-tests/jupyter_server_test_config.py +12 -0
  47. nbgitpuller_jl_interface-0.2.4/ui-tests/package.json +15 -0
  48. nbgitpuller_jl_interface-0.2.4/ui-tests/playwright.config.js +14 -0
  49. nbgitpuller_jl_interface-0.2.4/ui-tests/tests/nbgitpuller_jl_interface.spec.ts +33 -0
  50. nbgitpuller_jl_interface-0.2.4/ui-tests/yarn.lock +5967 -0
  51. nbgitpuller_jl_interface-0.2.4/yarn.lock +11061 -0
@@ -0,0 +1,15 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: v4.5.2
3
+ _src_path: https://github.com/jupyterlab/extension-template
4
+ author_email: admin@opensciencelab.asf.alaska.edu
5
+ author_name: OpenScienceLab
6
+ has_ai_rules: false
7
+ has_binder: true
8
+ has_settings: true
9
+ kind: frontend-and-server
10
+ labextension_name: nbgitpuller-jl-interface
11
+ project_short_description: A human interface with nbgitpuller in JupyterBook
12
+ python_name: nbgitpuller_jl_interface
13
+ repository: https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface
14
+ test: true
15
+
@@ -0,0 +1,131 @@
1
+ *.bundle.*
2
+ lib/
3
+ node_modules/
4
+ *.log
5
+ .eslintcache
6
+ .stylelintcache
7
+ *.egg-info/
8
+ .ipynb_checkpoints
9
+ *.tsbuildinfo
10
+ nbgitpuller_jl_interface/labextension
11
+ # Version file is handled by hatchling
12
+ nbgitpuller_jl_interface/_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
+ # Virtual environments
23
+ .venv
24
+
25
+ # Byte-compiled / optimized / DLL files
26
+ __pycache__/
27
+ *.py[cod]
28
+ *$py.class
29
+
30
+ # C extensions
31
+ *.so
32
+
33
+ # Distribution / packaging
34
+ .Python
35
+ build/
36
+ develop-eggs/
37
+ dist/
38
+ downloads/
39
+ eggs/
40
+ .eggs/
41
+ lib/
42
+ lib64/
43
+ parts/
44
+ sdist/
45
+ var/
46
+ wheels/
47
+ pip-wheel-metadata/
48
+ share/python-wheels/
49
+ .installed.cfg
50
+ *.egg
51
+ MANIFEST
52
+
53
+ # PyInstaller
54
+ # Usually these files are written by a python script from a template
55
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
56
+ *.manifest
57
+ *.spec
58
+
59
+ # Installer logs
60
+ pip-log.txt
61
+ pip-delete-this-directory.txt
62
+
63
+ # Unit test / coverage reports
64
+ htmlcov/
65
+ .tox/
66
+ .nox/
67
+ .coverage
68
+ .coverage.*
69
+ .cache
70
+ nosetests.xml
71
+ coverage/
72
+ coverage.xml
73
+ *.cover
74
+ .hypothesis/
75
+ .pytest_cache/
76
+
77
+ # Translations
78
+ *.mo
79
+ *.pot
80
+
81
+ # Scrapy stuff:
82
+ .scrapy
83
+
84
+ # Sphinx documentation
85
+ docs/_build/
86
+
87
+ # PyBuilder
88
+ target/
89
+
90
+ # pyenv
91
+ .python-version
92
+
93
+ # celery beat schedule file
94
+ celerybeat-schedule
95
+
96
+ # SageMath parsed files
97
+ *.sage.py
98
+
99
+ # Spyder project settings
100
+ .spyderproject
101
+ .spyproject
102
+
103
+ # Rope project settings
104
+ .ropeproject
105
+
106
+ # Mr Developer
107
+ .mr.developer.cfg
108
+ .project
109
+ .pydevproject
110
+
111
+ # mkdocs documentation
112
+ /site
113
+
114
+ # mypy
115
+ .mypy_cache/
116
+ .dmypy.json
117
+ dmypy.json
118
+
119
+ # Pyre type checker
120
+ .pyre/
121
+
122
+ # End of https://www.gitignore.io/api/python
123
+
124
+ # OSX files
125
+ .DS_Store
126
+
127
+ # Yarn cache
128
+ .yarn/
129
+
130
+ # Additional
131
+ junit.xml
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ **/node_modules
3
+ **/lib
4
+ **/package.json
5
+ !/package.json
6
+ nbgitpuller_jl_interface
@@ -0,0 +1,4 @@
1
+ {
2
+ "python-envs.defaultEnvManager": "ms-python.python:conda",
3
+ "python-envs.defaultPackageManager": "ms-python.python:conda"
4
+ }
@@ -0,0 +1,2 @@
1
+ nodeLinker: node-modules
2
+ enableScripts: false
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ <!-- <START NEW CHANGELOG ENTRY> -->
4
+
5
+ ## 0.2.4
6
+
7
+ ([Full Changelog](https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface/compare/v0.2.1...fa249abe827af836d7aa2ac0a870c4d30eff516e))
8
+
9
+ ### Enhancements made
10
+
11
+ - Update Functionality to be functional [#2](https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface/pull/2) ([@segallagher](https://github.com/segallagher), [@dgpalmieri](https://github.com/dgpalmieri))
12
+
13
+ ### Contributors to this release
14
+
15
+ The following people contributed discussions, new ideas, code and documentation contributions, and review.
16
+ See [our definition of contributors](https://github-activity.readthedocs.io/en/latest/use/#how-does-this-tool-define-contributions-in-the-reports).
17
+
18
+ ([GitHub contributors page for this release](https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface/graphs/contributors?from=2026-04-06&to=2026-04-07&type=c))
19
+
20
+ @dgpalmieri ([activity](https://github.com/search?q=repo%3AASFOpenSARlab%2Fnbgitpuller-jl-interface+involves%3Adgpalmieri+updated%3A2026-04-06..2026-04-07&type=Issues)) | @segallagher ([activity](https://github.com/search?q=repo%3AASFOpenSARlab%2Fnbgitpuller-jl-interface+involves%3Asegallagher+updated%3A2026-04-06..2026-04-07&type=Issues))
21
+
22
+ <!-- <END NEW CHANGELOG ENTRY> -->
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, OpenScienceLab
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,213 @@
1
+ Metadata-Version: 2.4
2
+ Name: nbgitpuller_jl_interface
3
+ Version: 0.2.4
4
+ Summary: A human interface with nbgitpuller in JupyterBook
5
+ Project-URL: Homepage, https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface
6
+ Project-URL: Bug Tracker, https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface/issues
7
+ Project-URL: Repository, https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface.git
8
+ Author-email: OpenScienceLab <admin@opensciencelab.asf.alaska.edu>
9
+ License: BSD 3-Clause License
10
+
11
+ Copyright (c) 2026, OpenScienceLab
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.10
49
+ Classifier: Programming Language :: Python :: 3.11
50
+ Classifier: Programming Language :: Python :: 3.12
51
+ Classifier: Programming Language :: Python :: 3.13
52
+ Classifier: Programming Language :: Python :: 3.14
53
+ Requires-Python: >=3.10
54
+ Requires-Dist: jupyter-server<3,>=2.4.0
55
+ Requires-Dist: nbgitpuller>=1.2.2
56
+ Provides-Extra: dev
57
+ Requires-Dist: jupyterlab>=4; extra == 'dev'
58
+ Provides-Extra: test
59
+ Requires-Dist: coverage; extra == 'test'
60
+ Requires-Dist: pytest; extra == 'test'
61
+ Requires-Dist: pytest-asyncio; extra == 'test'
62
+ Requires-Dist: pytest-cov; extra == 'test'
63
+ Requires-Dist: pytest-jupyter[server]>=0.6.0; extra == 'test'
64
+ Requires-Dist: pytest-mock; extra == 'test'
65
+ Description-Content-Type: text/markdown
66
+
67
+ # nbgitpuller_jl_interface
68
+
69
+ [![Github Actions Status](https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface/workflows/Build/badge.svg)](https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface/actions/workflows/build.yml)
70
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ASFOpenSARlab/nbgitpuller-jl-interface/main?urlpath=lab)
71
+
72
+ A human interface with nbgitpuller in JupyterBook
73
+
74
+ This extension is composed of a Python package named `nbgitpuller_jl_interface`
75
+ for the server extension and a NPM package named `nbgitpuller-jl-interface`
76
+ for the frontend extension.
77
+
78
+ ## Requirements
79
+
80
+ - JupyterLab >= 4.0.0
81
+
82
+ ## Install
83
+
84
+ To install the extension, execute:
85
+
86
+ ```bash
87
+ pip install nbgitpuller_jl_interface
88
+ ```
89
+
90
+ ## Uninstall
91
+
92
+ To remove the extension, execute:
93
+
94
+ ```bash
95
+ pip uninstall nbgitpuller_jl_interface
96
+ ```
97
+
98
+ ## Troubleshoot
99
+
100
+ If you are seeing the frontend extension, but it is not working, check
101
+ that the server extension is enabled:
102
+
103
+ ```bash
104
+ jupyter server extension list
105
+ ```
106
+
107
+ If the server extension is installed and enabled, but you are not seeing
108
+ the frontend extension, check the frontend extension is installed:
109
+
110
+ ```bash
111
+ jupyter labextension list
112
+ ```
113
+
114
+ ## Contributing
115
+
116
+ ### Development install
117
+
118
+ Note: You will need NodeJS to build the extension package.
119
+
120
+ The `jlpm` command is JupyterLab's pinned version of
121
+ [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
122
+ `yarn` or `npm` in lieu of `jlpm` below.
123
+
124
+ ```bash
125
+ # Clone the repo to your local environment
126
+ # Change directory to the nbgitpuller_jl_interface directory
127
+
128
+ # Set up a virtual environment and install package in development mode
129
+ python -m venv .venv
130
+ source .venv/bin/activate
131
+ pip install --editable ".[dev,test]"
132
+
133
+ # Link your development version of the extension with JupyterLab
134
+ jupyter labextension develop . --overwrite
135
+ # Server extension must be manually installed in develop mode
136
+ jupyter server extension enable nbgitpuller_jl_interface
137
+
138
+ # Rebuild extension Typescript source after making changes
139
+ # IMPORTANT: Unlike the steps above which are performed only once, do this step
140
+ # every time you make a change.
141
+ jlpm build
142
+ ```
143
+
144
+ 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.
145
+
146
+ ```bash
147
+ # Watch the source directory in one terminal, automatically rebuilding when needed
148
+ jlpm watch
149
+ # Run JupyterLab in another terminal
150
+ jupyter lab
151
+ ```
152
+
153
+ 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).
154
+
155
+ 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:
156
+
157
+ ```bash
158
+ jupyter lab build --minimize=False
159
+ ```
160
+
161
+ ### Development uninstall
162
+
163
+ ```bash
164
+ # Server extension must be manually disabled in develop mode
165
+ jupyter server extension disable nbgitpuller_jl_interface
166
+ pip uninstall nbgitpuller_jl_interface
167
+ ```
168
+
169
+ In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
170
+ command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
171
+ folder is located. Then you can remove the symlink named `nbgitpuller-jl-interface` within that folder.
172
+
173
+ ### Testing the extension
174
+
175
+ #### Server tests
176
+
177
+ This extension is using [Pytest](https://docs.pytest.org/) for Python code testing.
178
+
179
+ Install test dependencies (needed only once):
180
+
181
+ ```sh
182
+ pip install -e ".[test]"
183
+ # Each time you install the Python package, you need to restore the front-end extension link
184
+ jupyter labextension develop . --overwrite
185
+ ```
186
+
187
+ To execute them, run:
188
+
189
+ ```sh
190
+ pytest -vv -r ap --cov nbgitpuller_jl_interface
191
+ ```
192
+
193
+ #### Frontend tests
194
+
195
+ This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
196
+
197
+ To execute them, execute:
198
+
199
+ ```sh
200
+ jlpm
201
+ jlpm test
202
+ ```
203
+
204
+ #### Integration tests
205
+
206
+ This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
207
+ More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
208
+
209
+ More information are provided within the [ui-tests](./ui-tests/README.md) README.
210
+
211
+ ### Packaging the extension
212
+
213
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,147 @@
1
+ # nbgitpuller_jl_interface
2
+
3
+ [![Github Actions Status](https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface/workflows/Build/badge.svg)](https://github.com/ASFOpenSARlab/nbgitpuller-jl-interface/actions/workflows/build.yml)
4
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ASFOpenSARlab/nbgitpuller-jl-interface/main?urlpath=lab)
5
+
6
+ A human interface with nbgitpuller in JupyterBook
7
+
8
+ This extension is composed of a Python package named `nbgitpuller_jl_interface`
9
+ for the server extension and a NPM package named `nbgitpuller-jl-interface`
10
+ for the frontend extension.
11
+
12
+ ## Requirements
13
+
14
+ - JupyterLab >= 4.0.0
15
+
16
+ ## Install
17
+
18
+ To install the extension, execute:
19
+
20
+ ```bash
21
+ pip install nbgitpuller_jl_interface
22
+ ```
23
+
24
+ ## Uninstall
25
+
26
+ To remove the extension, execute:
27
+
28
+ ```bash
29
+ pip uninstall nbgitpuller_jl_interface
30
+ ```
31
+
32
+ ## Troubleshoot
33
+
34
+ If you are seeing the frontend extension, but it is not working, check
35
+ that the server extension is enabled:
36
+
37
+ ```bash
38
+ jupyter server extension list
39
+ ```
40
+
41
+ If the server extension is installed and enabled, but you are not seeing
42
+ the frontend extension, check the frontend extension is installed:
43
+
44
+ ```bash
45
+ jupyter labextension list
46
+ ```
47
+
48
+ ## Contributing
49
+
50
+ ### Development install
51
+
52
+ Note: You will need NodeJS to build the extension package.
53
+
54
+ The `jlpm` command is JupyterLab's pinned version of
55
+ [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
56
+ `yarn` or `npm` in lieu of `jlpm` below.
57
+
58
+ ```bash
59
+ # Clone the repo to your local environment
60
+ # Change directory to the nbgitpuller_jl_interface directory
61
+
62
+ # Set up a virtual environment and install package in development mode
63
+ python -m venv .venv
64
+ source .venv/bin/activate
65
+ pip install --editable ".[dev,test]"
66
+
67
+ # Link your development version of the extension with JupyterLab
68
+ jupyter labextension develop . --overwrite
69
+ # Server extension must be manually installed in develop mode
70
+ jupyter server extension enable nbgitpuller_jl_interface
71
+
72
+ # Rebuild extension Typescript source after making changes
73
+ # IMPORTANT: Unlike the steps above which are performed only once, do this step
74
+ # every time you make a change.
75
+ jlpm build
76
+ ```
77
+
78
+ 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.
79
+
80
+ ```bash
81
+ # Watch the source directory in one terminal, automatically rebuilding when needed
82
+ jlpm watch
83
+ # Run JupyterLab in another terminal
84
+ jupyter lab
85
+ ```
86
+
87
+ 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).
88
+
89
+ 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:
90
+
91
+ ```bash
92
+ jupyter lab build --minimize=False
93
+ ```
94
+
95
+ ### Development uninstall
96
+
97
+ ```bash
98
+ # Server extension must be manually disabled in develop mode
99
+ jupyter server extension disable nbgitpuller_jl_interface
100
+ pip uninstall nbgitpuller_jl_interface
101
+ ```
102
+
103
+ In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
104
+ command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
105
+ folder is located. Then you can remove the symlink named `nbgitpuller-jl-interface` within that folder.
106
+
107
+ ### Testing the extension
108
+
109
+ #### Server tests
110
+
111
+ This extension is using [Pytest](https://docs.pytest.org/) for Python code testing.
112
+
113
+ Install test dependencies (needed only once):
114
+
115
+ ```sh
116
+ pip install -e ".[test]"
117
+ # Each time you install the Python package, you need to restore the front-end extension link
118
+ jupyter labextension develop . --overwrite
119
+ ```
120
+
121
+ To execute them, run:
122
+
123
+ ```sh
124
+ pytest -vv -r ap --cov nbgitpuller_jl_interface
125
+ ```
126
+
127
+ #### Frontend tests
128
+
129
+ This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
130
+
131
+ To execute them, execute:
132
+
133
+ ```sh
134
+ jlpm
135
+ jlpm test
136
+ ```
137
+
138
+ #### Integration tests
139
+
140
+ This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
141
+ More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
142
+
143
+ More information are provided within the [ui-tests](./ui-tests/README.md) README.
144
+
145
+ ### Packaging the extension
146
+
147
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,80 @@
1
+ # Making a new release of nbgitpuller_jl_interface
2
+
3
+ The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).
4
+
5
+ ## Manual release
6
+
7
+ ### Python package
8
+
9
+ This extension can be distributed as Python packages. All of the Python
10
+ packaging instructions are in the `pyproject.toml` file to wrap your extension in a
11
+ Python package. Before generating a package, you first need to install some tools:
12
+
13
+ ```bash
14
+ pip install build twine hatch
15
+ ```
16
+
17
+ Bump the version using `hatch`. By default this will create a tag.
18
+ See the docs on [hatch-nodejs-version](https://github.com/agoose77/hatch-nodejs-version#semver) for details.
19
+
20
+ ```bash
21
+ hatch version <new-version>
22
+ ```
23
+
24
+ Make sure to clean up all the development files before building the package:
25
+
26
+ ```bash
27
+ jlpm clean:all
28
+ ```
29
+
30
+ You could also clean up the local git repository:
31
+
32
+ ```bash
33
+ git clean -dfX
34
+ ```
35
+
36
+ To create a Python source package (`.tar.gz`) and the binary package (`.whl`) in the `dist/` directory, do:
37
+
38
+ ```bash
39
+ python -m build
40
+ ```
41
+
42
+ > `python setup.py sdist bdist_wheel` is deprecated and will not work for this package.
43
+
44
+ Then to upload the package to PyPI, do:
45
+
46
+ ```bash
47
+ twine upload dist/*
48
+ ```
49
+
50
+ ### NPM package
51
+
52
+ To publish the frontend part of the extension as a NPM package, do:
53
+
54
+ ```bash
55
+ npm login
56
+ npm publish --access public
57
+ ```
58
+
59
+ ## Automated releases with the Jupyter Releaser
60
+
61
+ The extension repository should already be compatible with the Jupyter Releaser. But
62
+ the GitHub repository and the package managers need to be properly set up. Please
63
+ follow the instructions of the Jupyter Releaser [checklist](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_repo.html).
64
+
65
+ Here is a summary of the steps to cut a new release:
66
+
67
+ - Go to the Actions panel
68
+ - Run the "Step 1: Prep Release" workflow
69
+ - Check the draft changelog
70
+ - Run the "Step 2: Publish Release" workflow
71
+
72
+ > [!NOTE]
73
+ > Check out the [workflow documentation](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html)
74
+ > for more information.
75
+
76
+ ## Publishing to `conda-forge`
77
+
78
+ If the package is not on conda forge yet, check the documentation to learn how to add it: https://conda-forge.org/docs/maintainer/adding_pkgs.html
79
+
80
+ Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically.
@@ -0,0 +1 @@
1
+ module.exports = require('@jupyterlab/testutils/lib/babel.config');
@@ -0,0 +1,8 @@
1
+ import pytest
2
+
3
+ pytest_plugins = ("pytest_jupyter.jupyter_server", )
4
+
5
+
6
+ @pytest.fixture
7
+ def jp_server_config(jp_server_config):
8
+ return {"ServerApp": {"jpserver_extensions": {"nbgitpuller_jl_interface": True}}}
@@ -0,0 +1,5 @@
1
+ {
2
+ "packageManager": "python",
3
+ "packageName": "nbgitpuller_jl_interface",
4
+ "uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package nbgitpuller_jl_interface"
5
+ }