Skip to content

Commit

Permalink
add a collaborative chat extension (#9)
Browse files Browse the repository at this point in the history
* add a collaborative chat extension

* lint

* fix header licence

* Automatic application of license header

* remover version command from collaborative chat pyproject

* fix releaser workflow

* Add the factory for the chat document and widget

* Automatic application of license header

* Add a npm commands to build only a specific extension

* Fix the 'build_python' workflow of the releaser

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
brichet and github-actions[bot] authored Apr 8, 2024
1 parent 6ae629b commit 6d052e1
Show file tree
Hide file tree
Showing 50 changed files with 2,328 additions and 20 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,36 @@ jobs:
- name: Build packages
run: jlpm build

- name: Package the extension
- name: Package jupyterlab_ws_chat
working-directory: packages/jupyterlab-ws-chat
run: |
set -eux
pip install build
python -m build
pip uninstall -y "jupyterlab_ws_chat" jupyterlab
- name: Upload project packages
- name: Upload jupyterlab_ws_chat packages
uses: actions/upload-artifact@v3
with:
name: package-artifacts
path: packages/jupyterlab-ws-chat/dist/jupyterlab_ws_chat*
if-no-files-found: error

- name: Package jupyterlab_collaborative_chat
working-directory: packages/jupyterlab-collaborative-chat
run: |
set -eux
pip install build
python -m build
pip uninstall -y "jupyterlab_collaborative_chat" jupyterlab
- name: Upload jupyterlab_collaborative_chat packages
uses: actions/upload-artifact@v3
with:
name: package-artifacts
path: packages/jupyterlab-collaborative-chat/dist/jupyterlab_collaborative_chat*
if-no-files-found: error

check_links:
name: Check Links
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/update-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,10 @@ jobs:
# Playwright knows how to start JupyterLab server
start_server_script: 'null'
test_folder: packages/jupyterlab-ws-chat/ui-tests

- uses: jupyterlab/maintainer-tools/.github/actions/update-snapshots@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Playwright knows how to start JupyterLab server
start_server_script: 'null'
test_folder: packages/jupyterlab-collaborative-chat/ui-tests
2 changes: 1 addition & 1 deletion .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ header:
- '*.map.js'
- '*.bundle.js'
- '**/.*'
- 'binder/postBuild'
- '**/binder/postBuild'
- 'coverage'
- 'LICENSE'
- 'yarn.lock'
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
],
"scripts": {
"build": "lerna run build --stream",
"build:core": "lerna run build --stream --scope \"@jupyter-ai/core\"",
"build:core": "lerna run build --stream --scope \"chat-jupyter\"",
"build:collaborative": "lerna run build --scope=jupyterlab-collaborative-chat --include-filtered-dependencies",
"build:websocket": "lerna run build --scope=jupyterlab-ws-chat --include-filtered-dependencies",
"build:prod": "lerna run build:prod --stream",
"clean": "lerna run clean",
"clean:all": "lerna run clean:all",
Expand Down
19 changes: 19 additions & 0 deletions packages/jupyterlab-collaborative-chat/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v4.2.5
_src_path: https://github.com/jupyterlab/extension-template
author_email: jupyter@googlegroups.com
author_name: Jupyter Development Team
data_format: string
file_extension: ''
has_binder: true
has_settings: true
kind: server
labextension_name: jupyterlab-collaborative-chat
mimetype: ''
mimetype_name: ''
project_short_description: A chat extension based on shared documents
python_name: jupyterlab_collaborative_chat
repository: https://github.com/jupyterlab-contrib/jupyter-chat
test: true
viewer_name: ''

125 changes: 125 additions & 0 deletions packages/jupyterlab-collaborative-chat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
*.bundle.*
lib/
node_modules/
*.log
.eslintcache
.stylelintcache
*.egg-info/
.ipynb_checkpoints
*.tsbuildinfo
jupyterlab_collaborative_chat/labextension
# Version file is handled by hatchling
jupyterlab_collaborative_chat/_version.py

# Integration tests
ui-tests/test-results/
ui-tests/playwright-report/

# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage/
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# End of https://www.gitignore.io/api/python

# OSX files
.DS_Store

# Yarn cache
.yarn/
6 changes: 6 additions & 0 deletions packages/jupyterlab-collaborative-chat/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
**/node_modules
**/lib
**/package.json
!/package.json
jupyterlab_collaborative_chat
1 change: 1 addition & 0 deletions packages/jupyterlab-collaborative-chat/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
5 changes: 5 additions & 0 deletions packages/jupyterlab-collaborative-chat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

<!-- <START NEW CHANGELOG ENTRY> -->

<!-- <END NEW CHANGELOG ENTRY> -->
29 changes: 29 additions & 0 deletions packages/jupyterlab-collaborative-chat/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2024, Jupyter Development Team
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 6d052e1

Please sign in to comment.