Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ has_settings: true
kind: server
labextension_name: '@notebook-intelligence/notebook-intelligence'
project_short_description: Notebook Intelligence extension for JupyterLab
python_name: notebook_intelligence
python_name: lab_notebook_intelligence
repository: https://github.com/notebook-intelligence/notebook-intelligence
test: false

6 changes: 0 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ jobs:
- name: Install dependencies
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check

- name: Build the extension
run: |
set -eux
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ jobs:
- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:

token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
uses: actions/upload-artifact@v4
with:
name: notebook_intelligence-releaser-dist-${{ github.run_number }}
name: lab_notebook_intelligence-releaser-dist-${{ github.run_number }}
path: .jupyter_releaser_checkout/dist
44 changes: 44 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Check Code Formatting

on:
pull_request:
branches: ['main']
types: [opened, reopened, ready_for_review, synchronize]
workflow_dispatch:

jobs:
check-format:
name: Check Code Formatting
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install black isort>=6.0.0

- name: Check Python code formatting
run: |
black --check lab_notebook_intelligence
isort --check lab_notebook_intelligence
2 changes: 1 addition & 1 deletion .github/workflows/upload-s3-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ jobs:
- name: Copy wheel file to S3 lab-extensions bucket
run: |
aws s3 rm s3://qbraid-lab-extensions/production/ --recursive --exclude "*" --include "lab_notebook_intelligence*.whl"
aws s3 cp ./ s3://qbraid-lab-extensions/production/ --recursive --exclude "*" --include "lab_notebook_intelligence*.whl"
aws s3 cp ./ s3://qbraid-lab-extensions/production/ --recursive --exclude "*" --include "lab_notebook_intelligence*.whl"
2 changes: 1 addition & 1 deletion .github/workflows/upload-s3-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ jobs:
- name: Copy wheel file to S3 lab-extensions bucket
run: |
aws s3 rm s3://qbraid-lab-extensions/staging/ --recursive --exclude "*" --include "lab_notebook_intelligence*.whl"
aws s3 cp ./ s3://qbraid-lab-extensions/staging/ --recursive --exclude "*" --include "lab_notebook_intelligence*.whl"
aws s3 cp ./ s3://qbraid-lab-extensions/staging/ --recursive --exclude "*" --include "lab_notebook_intelligence*.whl"
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ node_modules
**/lib
**/package.json
!/package.json
notebook_intelligence
lab_notebook_intelligence
22 changes: 11 additions & 11 deletions lab_notebook_intelligence/__init__.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Copyright (c) Mehmet Bektas <mbektasgh@outlook.com>

try:
from ._version import __version__
except ImportError:
# Fallback when using the package in dev mode without installing
# in editable mode with pip. It is highly recommended to install
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
import warnings

warnings.warn("Importing 'lab_notebook_intelligence' outside a proper installation.")
__version__ = "dev"

import logging
logging.basicConfig(format='%(asctime)s - %(name)s - %(filename)s - %(levelname)s - %(message)s', level=logging.INFO)

from .extension import NotebookIntelligence
logging.basicConfig(
format="%(asctime)s - %(name)s - %(filename)s - %(levelname)s - %(message)s",
level=logging.INFO,
)

from .api import *
from .extension import NotebookIntelligence


def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "@qbraid/lab-notebook-intelligence"
}]
return [{"src": "labextension", "dest": "@qbraid/lab-notebook-intelligence"}]


def _jupyter_server_extension_points():
return [{
"module": "lab_notebook_intelligence",
"app": NotebookIntelligence
}]
return [{"module": "lab_notebook_intelligence", "app": NotebookIntelligence}]
Loading