escobar 0.1.0__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.
- escobar-0.1.0/.env.example +4 -0
- escobar-0.1.0/.gitignore +124 -0
- escobar-0.1.0/.prettierignore +6 -0
- escobar-0.1.0/.yarnrc.yml +3 -0
- escobar-0.1.0/CHANGELOG.md +5 -0
- escobar-0.1.0/LICENSE +29 -0
- escobar-0.1.0/PKG-INFO +201 -0
- escobar-0.1.0/README.md +147 -0
- escobar-0.1.0/RELEASE.md +77 -0
- escobar-0.1.0/check_pypi_name.sh +25 -0
- escobar-0.1.0/escobar/__init__.py +8 -0
- escobar-0.1.0/escobar/_version.py +4 -0
- escobar-0.1.0/escobar/labextension/package.json +194 -0
- escobar-0.1.0/escobar/labextension/schemas/escobar/package.json.orig +189 -0
- escobar-0.1.0/escobar/labextension/schemas/escobar/plugin.json +41 -0
- escobar-0.1.0/escobar/labextension/static/602.03403ea901c58a925a9b.js +1 -0
- escobar-0.1.0/escobar/labextension/static/728.e8a7cb661059b77f1278.js +1 -0
- escobar-0.1.0/escobar/labextension/static/remoteEntry.7a30f8cbb701063c3c74.js +1 -0
- escobar-0.1.0/escobar/labextension/static/style.js +4 -0
- escobar-0.1.0/escobar/labextension/static/third-party-licenses.json +16 -0
- escobar-0.1.0/install.json +5 -0
- escobar-0.1.0/install.sh +63 -0
- escobar-0.1.0/package-lock.json +9619 -0
- escobar-0.1.0/package.json +189 -0
- escobar-0.1.0/publish_to_pypi.sh +67 -0
- escobar-0.1.0/pyproject.toml +76 -0
- escobar-0.1.0/schema/plugin.json +41 -0
- escobar-0.1.0/setup.py +1 -0
- escobar-0.1.0/src/chat.ts +771 -0
- escobar-0.1.0/src/index.ts +122 -0
- escobar-0.1.0/src/integrations/jupyter_integrations.ts +1192 -0
- escobar-0.1.0/src/integrations/jupyter_integrations_fs.ts +234 -0
- escobar-0.1.0/src/integrations/jupyter_integrations_terminal.ts +128 -0
- escobar-0.1.0/src/js/setting_page.ts +289 -0
- escobar-0.1.0/src/js/ui_elements.ts +98 -0
- escobar-0.1.0/src/voitta/prompts.ts +98 -0
- escobar-0.1.0/src/voitta/pythonBridge.ts +357 -0
- escobar-0.1.0/src/voitta/pythonBridge_browser.ts +379 -0
- escobar-0.1.0/src/voitta/voittaServer.ts +288 -0
- escobar-0.1.0/style/base.css +419 -0
- escobar-0.1.0/style/index.css +1 -0
- escobar-0.1.0/style/index.js +1 -0
- escobar-0.1.0/tsconfig.json +25 -0
- escobar-0.1.0/yarn.lock +5302 -0
escobar-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
*.bundle.*
|
|
2
|
+
lib/
|
|
3
|
+
node_modules/
|
|
4
|
+
*.log
|
|
5
|
+
.eslintcache
|
|
6
|
+
.stylelintcache
|
|
7
|
+
*.egg-info/
|
|
8
|
+
.ipynb_checkpoints
|
|
9
|
+
*.tsbuildinfo
|
|
10
|
+
escobar/labextension
|
|
11
|
+
# Version file is handled by hatchling
|
|
12
|
+
escobar/_version.py
|
|
13
|
+
|
|
14
|
+
# Created by https://www.gitignore.io/api/python
|
|
15
|
+
# Edit at https://www.gitignore.io/?templates=python
|
|
16
|
+
|
|
17
|
+
### Python ###
|
|
18
|
+
# Byte-compiled / optimized / DLL files
|
|
19
|
+
__pycache__/
|
|
20
|
+
*.py[cod]
|
|
21
|
+
*$py.class
|
|
22
|
+
|
|
23
|
+
# C extensions
|
|
24
|
+
*.so
|
|
25
|
+
|
|
26
|
+
# Distribution / packaging
|
|
27
|
+
.Python
|
|
28
|
+
build/
|
|
29
|
+
develop-eggs/
|
|
30
|
+
dist/
|
|
31
|
+
downloads/
|
|
32
|
+
eggs/
|
|
33
|
+
.eggs/
|
|
34
|
+
lib/
|
|
35
|
+
lib64/
|
|
36
|
+
parts/
|
|
37
|
+
sdist/
|
|
38
|
+
var/
|
|
39
|
+
wheels/
|
|
40
|
+
pip-wheel-metadata/
|
|
41
|
+
share/python-wheels/
|
|
42
|
+
.installed.cfg
|
|
43
|
+
*.egg
|
|
44
|
+
MANIFEST
|
|
45
|
+
|
|
46
|
+
# PyInstaller
|
|
47
|
+
# Usually these files are written by a python script from a template
|
|
48
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
49
|
+
*.manifest
|
|
50
|
+
*.spec
|
|
51
|
+
|
|
52
|
+
# Installer logs
|
|
53
|
+
pip-log.txt
|
|
54
|
+
pip-delete-this-directory.txt
|
|
55
|
+
|
|
56
|
+
# Unit test / coverage reports
|
|
57
|
+
htmlcov/
|
|
58
|
+
.tox/
|
|
59
|
+
.nox/
|
|
60
|
+
.coverage
|
|
61
|
+
.coverage.*
|
|
62
|
+
.cache
|
|
63
|
+
nosetests.xml
|
|
64
|
+
coverage/
|
|
65
|
+
coverage.xml
|
|
66
|
+
*.cover
|
|
67
|
+
.hypothesis/
|
|
68
|
+
.pytest_cache/
|
|
69
|
+
|
|
70
|
+
# Translations
|
|
71
|
+
*.mo
|
|
72
|
+
*.pot
|
|
73
|
+
|
|
74
|
+
# Scrapy stuff:
|
|
75
|
+
.scrapy
|
|
76
|
+
|
|
77
|
+
# Sphinx documentation
|
|
78
|
+
docs/_build/
|
|
79
|
+
|
|
80
|
+
# PyBuilder
|
|
81
|
+
target/
|
|
82
|
+
|
|
83
|
+
# pyenv
|
|
84
|
+
.python-version
|
|
85
|
+
|
|
86
|
+
# celery beat schedule file
|
|
87
|
+
celerybeat-schedule
|
|
88
|
+
|
|
89
|
+
# SageMath parsed files
|
|
90
|
+
*.sage.py
|
|
91
|
+
|
|
92
|
+
# Spyder project settings
|
|
93
|
+
.spyderproject
|
|
94
|
+
.spyproject
|
|
95
|
+
|
|
96
|
+
# Rope project settings
|
|
97
|
+
.ropeproject
|
|
98
|
+
|
|
99
|
+
# Mr Developer
|
|
100
|
+
.mr.developer.cfg
|
|
101
|
+
.project
|
|
102
|
+
.pydevproject
|
|
103
|
+
|
|
104
|
+
# mkdocs documentation
|
|
105
|
+
/site
|
|
106
|
+
|
|
107
|
+
# mypy
|
|
108
|
+
.mypy_cache/
|
|
109
|
+
.dmypy.json
|
|
110
|
+
dmypy.json
|
|
111
|
+
|
|
112
|
+
# Pyre type checker
|
|
113
|
+
.pyre/
|
|
114
|
+
|
|
115
|
+
# End of https://www.gitignore.io/api/python
|
|
116
|
+
|
|
117
|
+
# OSX files
|
|
118
|
+
.DS_Store
|
|
119
|
+
|
|
120
|
+
# Yarn cache
|
|
121
|
+
.yarn/
|
|
122
|
+
|
|
123
|
+
# Environment variables
|
|
124
|
+
.env
|
escobar-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Escobar
|
|
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.
|
escobar-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: escobar
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Dynamic: Keywords
|
|
5
|
+
Summary: AI CHAT EXTENSION
|
|
6
|
+
Project-URL: Homepage, https://github.com/github_username/escobar
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/github_username/escobar/issues
|
|
8
|
+
Project-URL: Repository, https://github.com/github_username/escobar.git
|
|
9
|
+
Author-email: Escobar <me@test.com>
|
|
10
|
+
License: BSD 3-Clause License
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2025, Escobar
|
|
13
|
+
All rights reserved.
|
|
14
|
+
|
|
15
|
+
Redistribution and use in source and binary forms, with or without
|
|
16
|
+
modification, are permitted provided that the following conditions are met:
|
|
17
|
+
|
|
18
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
19
|
+
list of conditions and the following disclaimer.
|
|
20
|
+
|
|
21
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
22
|
+
this list of conditions and the following disclaimer in the documentation
|
|
23
|
+
and/or other materials provided with the distribution.
|
|
24
|
+
|
|
25
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
26
|
+
contributors may be used to endorse or promote products derived from
|
|
27
|
+
this software without specific prior written permission.
|
|
28
|
+
|
|
29
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
30
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
31
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
32
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
33
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
34
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
35
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
36
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
37
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
38
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
39
|
+
License-File: LICENSE
|
|
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.8
|
|
49
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
50
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
51
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
52
|
+
Requires-Python: >=3.8
|
|
53
|
+
Description-Content-Type: text/markdown
|
|
54
|
+
|
|
55
|
+
# Escobar Chat Extension for JupyterLab
|
|
56
|
+
|
|
57
|
+
A lightweight chat interface extension for JupyterLab.
|
|
58
|
+
|
|
59
|
+
## Features
|
|
60
|
+
|
|
61
|
+
- Simple chat-like interface
|
|
62
|
+
- Send and receive messages
|
|
63
|
+
- Keyboard shortcuts (Enter to send, Shift+Enter for new line)
|
|
64
|
+
- Configurable settings
|
|
65
|
+
- Accessible from the launcher and help menu
|
|
66
|
+
|
|
67
|
+
## Requirements
|
|
68
|
+
|
|
69
|
+
* JupyterLab >= 3.6.0 and < 4.0.0
|
|
70
|
+
|
|
71
|
+
**Note:** This extension is compatible with JupyterLab 3.x. If you're using JupyterLab 4.x, you may need to downgrade or wait for a future update.
|
|
72
|
+
|
|
73
|
+
## Installation
|
|
74
|
+
|
|
75
|
+
### Quick Installation
|
|
76
|
+
|
|
77
|
+
To quickly install the extension, use the provided installation script:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Make the script executable if needed
|
|
81
|
+
chmod +x install.sh
|
|
82
|
+
|
|
83
|
+
# Run the installation script
|
|
84
|
+
./install.sh
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Manual Installation
|
|
88
|
+
|
|
89
|
+
Alternatively, you can install the extension manually:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Install dependencies
|
|
93
|
+
npm install
|
|
94
|
+
|
|
95
|
+
# Build the extension
|
|
96
|
+
npm run build
|
|
97
|
+
|
|
98
|
+
# Install the extension in development mode
|
|
99
|
+
pip3 install -e .
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Usage
|
|
103
|
+
|
|
104
|
+
After installation, you can access the Escobar Chat in several ways:
|
|
105
|
+
|
|
106
|
+
1. From the launcher (look for the "Escobar Chat" card)
|
|
107
|
+
2. From the command palette (Ctrl+Shift+C, then search for "Escobar Chat")
|
|
108
|
+
3. From the Help menu (Help > Escobar Chat)
|
|
109
|
+
4. Using the keyboard shortcut (Ctrl+E)
|
|
110
|
+
|
|
111
|
+
## Configuration
|
|
112
|
+
|
|
113
|
+
You can configure the extension through the JupyterLab Settings menu:
|
|
114
|
+
|
|
115
|
+
1. Go to Settings > Settings Editor
|
|
116
|
+
2. Search for "Escobar Chat"
|
|
117
|
+
3. Modify the following settings:
|
|
118
|
+
- Default Greeting: The message shown when opening a new chat
|
|
119
|
+
- Maximum Messages: The maximum number of messages to keep in the chat history
|
|
120
|
+
|
|
121
|
+
## Development
|
|
122
|
+
|
|
123
|
+
### Local Development Install
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Clone the repository
|
|
127
|
+
git clone https://github.com/your-username/escobar.git
|
|
128
|
+
cd escobar
|
|
129
|
+
|
|
130
|
+
# Install dependencies
|
|
131
|
+
npm install
|
|
132
|
+
|
|
133
|
+
# Build the extension
|
|
134
|
+
npm run build
|
|
135
|
+
|
|
136
|
+
# Install the extension in development mode
|
|
137
|
+
pip3 install -e .
|
|
138
|
+
jupyter labextension develop . --overwrite
|
|
139
|
+
|
|
140
|
+
# Run JupyterLab
|
|
141
|
+
jupyter lab
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Watch Mode
|
|
145
|
+
|
|
146
|
+
For development, you can run the extension in watch mode:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# In one terminal, watch for changes
|
|
150
|
+
npm run watch
|
|
151
|
+
|
|
152
|
+
# In another terminal, run JupyterLab
|
|
153
|
+
jupyter lab
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Publishing to PyPI
|
|
157
|
+
|
|
158
|
+
### Checking Package Name Availability
|
|
159
|
+
|
|
160
|
+
Before publishing, you can check if your desired package name is available on PyPI:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Check the name in pyproject.toml
|
|
164
|
+
./check_pypi_name.sh
|
|
165
|
+
|
|
166
|
+
# Or check a specific name
|
|
167
|
+
./check_pypi_name.sh my-package-name
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Publishing Process
|
|
171
|
+
|
|
172
|
+
To publish this extension to PyPI, follow these steps:
|
|
173
|
+
|
|
174
|
+
1. Create a PyPI account if you don't have one at [https://pypi.org/account/register/](https://pypi.org/account/register/)
|
|
175
|
+
|
|
176
|
+
2. Generate an API token at [https://pypi.org/manage/account/token/](https://pypi.org/manage/account/token/)
|
|
177
|
+
|
|
178
|
+
3. Create a `.env` file in the project root with your PyPI token:
|
|
179
|
+
```
|
|
180
|
+
PYPI_TOKEN=your-token-here
|
|
181
|
+
```
|
|
182
|
+
(You can copy `.env.example` to `.env` and replace the token)
|
|
183
|
+
|
|
184
|
+
4. Run the publishing script:
|
|
185
|
+
```bash
|
|
186
|
+
./publish_to_pypi.sh
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
The script will:
|
|
190
|
+
- Check if your package name is available on PyPI
|
|
191
|
+
- Build the extension
|
|
192
|
+
- Upload it to PyPI using your token
|
|
193
|
+
|
|
194
|
+
After successful publishing, users can install your extension with:
|
|
195
|
+
```bash
|
|
196
|
+
pip install escobar
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
BSD-3-Clause
|
escobar-0.1.0/README.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Escobar Chat Extension for JupyterLab
|
|
2
|
+
|
|
3
|
+
A lightweight chat interface extension for JupyterLab.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Simple chat-like interface
|
|
8
|
+
- Send and receive messages
|
|
9
|
+
- Keyboard shortcuts (Enter to send, Shift+Enter for new line)
|
|
10
|
+
- Configurable settings
|
|
11
|
+
- Accessible from the launcher and help menu
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
|
|
15
|
+
* JupyterLab >= 3.6.0 and < 4.0.0
|
|
16
|
+
|
|
17
|
+
**Note:** This extension is compatible with JupyterLab 3.x. If you're using JupyterLab 4.x, you may need to downgrade or wait for a future update.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
### Quick Installation
|
|
22
|
+
|
|
23
|
+
To quickly install the extension, use the provided installation script:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Make the script executable if needed
|
|
27
|
+
chmod +x install.sh
|
|
28
|
+
|
|
29
|
+
# Run the installation script
|
|
30
|
+
./install.sh
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Manual Installation
|
|
34
|
+
|
|
35
|
+
Alternatively, you can install the extension manually:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Install dependencies
|
|
39
|
+
npm install
|
|
40
|
+
|
|
41
|
+
# Build the extension
|
|
42
|
+
npm run build
|
|
43
|
+
|
|
44
|
+
# Install the extension in development mode
|
|
45
|
+
pip3 install -e .
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
After installation, you can access the Escobar Chat in several ways:
|
|
51
|
+
|
|
52
|
+
1. From the launcher (look for the "Escobar Chat" card)
|
|
53
|
+
2. From the command palette (Ctrl+Shift+C, then search for "Escobar Chat")
|
|
54
|
+
3. From the Help menu (Help > Escobar Chat)
|
|
55
|
+
4. Using the keyboard shortcut (Ctrl+E)
|
|
56
|
+
|
|
57
|
+
## Configuration
|
|
58
|
+
|
|
59
|
+
You can configure the extension through the JupyterLab Settings menu:
|
|
60
|
+
|
|
61
|
+
1. Go to Settings > Settings Editor
|
|
62
|
+
2. Search for "Escobar Chat"
|
|
63
|
+
3. Modify the following settings:
|
|
64
|
+
- Default Greeting: The message shown when opening a new chat
|
|
65
|
+
- Maximum Messages: The maximum number of messages to keep in the chat history
|
|
66
|
+
|
|
67
|
+
## Development
|
|
68
|
+
|
|
69
|
+
### Local Development Install
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Clone the repository
|
|
73
|
+
git clone https://github.com/your-username/escobar.git
|
|
74
|
+
cd escobar
|
|
75
|
+
|
|
76
|
+
# Install dependencies
|
|
77
|
+
npm install
|
|
78
|
+
|
|
79
|
+
# Build the extension
|
|
80
|
+
npm run build
|
|
81
|
+
|
|
82
|
+
# Install the extension in development mode
|
|
83
|
+
pip3 install -e .
|
|
84
|
+
jupyter labextension develop . --overwrite
|
|
85
|
+
|
|
86
|
+
# Run JupyterLab
|
|
87
|
+
jupyter lab
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Watch Mode
|
|
91
|
+
|
|
92
|
+
For development, you can run the extension in watch mode:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# In one terminal, watch for changes
|
|
96
|
+
npm run watch
|
|
97
|
+
|
|
98
|
+
# In another terminal, run JupyterLab
|
|
99
|
+
jupyter lab
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Publishing to PyPI
|
|
103
|
+
|
|
104
|
+
### Checking Package Name Availability
|
|
105
|
+
|
|
106
|
+
Before publishing, you can check if your desired package name is available on PyPI:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Check the name in pyproject.toml
|
|
110
|
+
./check_pypi_name.sh
|
|
111
|
+
|
|
112
|
+
# Or check a specific name
|
|
113
|
+
./check_pypi_name.sh my-package-name
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Publishing Process
|
|
117
|
+
|
|
118
|
+
To publish this extension to PyPI, follow these steps:
|
|
119
|
+
|
|
120
|
+
1. Create a PyPI account if you don't have one at [https://pypi.org/account/register/](https://pypi.org/account/register/)
|
|
121
|
+
|
|
122
|
+
2. Generate an API token at [https://pypi.org/manage/account/token/](https://pypi.org/manage/account/token/)
|
|
123
|
+
|
|
124
|
+
3. Create a `.env` file in the project root with your PyPI token:
|
|
125
|
+
```
|
|
126
|
+
PYPI_TOKEN=your-token-here
|
|
127
|
+
```
|
|
128
|
+
(You can copy `.env.example` to `.env` and replace the token)
|
|
129
|
+
|
|
130
|
+
4. Run the publishing script:
|
|
131
|
+
```bash
|
|
132
|
+
./publish_to_pypi.sh
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The script will:
|
|
136
|
+
- Check if your package name is available on PyPI
|
|
137
|
+
- Build the extension
|
|
138
|
+
- Upload it to PyPI using your token
|
|
139
|
+
|
|
140
|
+
After successful publishing, users can install your extension with:
|
|
141
|
+
```bash
|
|
142
|
+
pip install escobar
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
BSD-3-Clause
|
escobar-0.1.0/RELEASE.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Making a new release of escobar
|
|
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.
|
|
62
|
+
|
|
63
|
+
Check out the [workflow documentation](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html) for more information.
|
|
64
|
+
|
|
65
|
+
Here is a summary of the steps to cut a new release:
|
|
66
|
+
|
|
67
|
+
- Add `ADMIN_GITHUB_TOKEN`, `PYPI_TOKEN` and `NPM_TOKEN` to the [Github Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) in the repository
|
|
68
|
+
- Go to the Actions panel
|
|
69
|
+
- Run the "Step 1: Prep Release" workflow
|
|
70
|
+
- Check the draft changelog
|
|
71
|
+
- Run the "Step 2: Publish Release" workflow
|
|
72
|
+
|
|
73
|
+
## Publishing to `conda-forge`
|
|
74
|
+
|
|
75
|
+
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
|
|
76
|
+
|
|
77
|
+
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,25 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# check_pypi_name.sh - Script to check if a package name is available on PyPI
|
|
3
|
+
|
|
4
|
+
# Get package name from command line argument or from pyproject.toml
|
|
5
|
+
if [ -n "$1" ]; then
|
|
6
|
+
PACKAGE_NAME="$1"
|
|
7
|
+
else
|
|
8
|
+
# Get package name from pyproject.toml
|
|
9
|
+
PACKAGE_NAME=$(grep -m 1 'name = ' pyproject.toml | sed 's/name = "\(.*\)"/\1/')
|
|
10
|
+
echo "Using package name from pyproject.toml: $PACKAGE_NAME"
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
echo "Checking availability for package name: $PACKAGE_NAME"
|
|
14
|
+
|
|
15
|
+
# Check if package name is available on PyPI
|
|
16
|
+
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/$PACKAGE_NAME/json")
|
|
17
|
+
|
|
18
|
+
if [ "$HTTP_STATUS" -eq 200 ]; then
|
|
19
|
+
echo "Warning: Package name '$PACKAGE_NAME' is already taken on PyPI."
|
|
20
|
+
echo "Consider choosing a different name in pyproject.toml."
|
|
21
|
+
else
|
|
22
|
+
echo "Good news! Package name '$PACKAGE_NAME' appears to be available on PyPI."
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
echo "You can also check manually by visiting: https://pypi.org/project/$PACKAGE_NAME/"
|