jupyterlab-biolm 1.0.7__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 (43) hide show
  1. jupyterlab_biolm-1.0.7/.github/workflows/ci.yml +112 -0
  2. jupyterlab_biolm-1.0.7/.github/workflows/publish.yml +124 -0
  3. jupyterlab_biolm-1.0.7/.gitignore +80 -0
  4. jupyterlab_biolm-1.0.7/CICD.md +538 -0
  5. jupyterlab_biolm-1.0.7/Makefile +131 -0
  6. jupyterlab_biolm-1.0.7/PKG-INFO +160 -0
  7. jupyterlab_biolm-1.0.7/README.md +136 -0
  8. jupyterlab_biolm-1.0.7/REQUIREMENTS.md +264 -0
  9. jupyterlab_biolm-1.0.7/check_extension.js +25 -0
  10. jupyterlab_biolm-1.0.7/clear_cache_instructions.md +25 -0
  11. jupyterlab_biolm-1.0.7/diagnose_extension.py +104 -0
  12. jupyterlab_biolm-1.0.7/install.json +5 -0
  13. jupyterlab_biolm-1.0.7/jupyterlab_biolm/__init__.py +23 -0
  14. jupyterlab_biolm-1.0.7/jupyterlab_biolm/_hatchling.py +37 -0
  15. jupyterlab_biolm-1.0.7/jupyterlab_biolm/serverextension.py +188 -0
  16. jupyterlab_biolm-1.0.7/package-lock.json +13731 -0
  17. jupyterlab_biolm-1.0.7/package.json +119 -0
  18. jupyterlab_biolm-1.0.7/pyproject.toml +67 -0
  19. jupyterlab_biolm-1.0.7/schema/plugin.json +49 -0
  20. jupyterlab_biolm-1.0.7/scripts/check_server_status.py +38 -0
  21. jupyterlab_biolm-1.0.7/scripts/prepare_wheel.py +26 -0
  22. jupyterlab_biolm-1.0.7/scripts/test_deployment.py +405 -0
  23. jupyterlab_biolm-1.0.7/scripts/test_endpoint.py +45 -0
  24. jupyterlab_biolm-1.0.7/scripts/test_local.py +324 -0
  25. jupyterlab_biolm-1.0.7/scripts/test_pypi_install.sh +248 -0
  26. jupyterlab_biolm-1.0.7/scripts/wait_for_server.py +25 -0
  27. jupyterlab_biolm-1.0.7/setup.py +101 -0
  28. jupyterlab_biolm-1.0.7/src/api/client.ts +182 -0
  29. jupyterlab_biolm-1.0.7/src/api/types.ts +43 -0
  30. jupyterlab_biolm-1.0.7/src/components/ModelsTab.tsx +241 -0
  31. jupyterlab_biolm-1.0.7/src/components/OperationsTab.tsx +142 -0
  32. jupyterlab_biolm-1.0.7/src/components/SettingsTab.tsx +338 -0
  33. jupyterlab_biolm-1.0.7/src/data/operations.ts +105 -0
  34. jupyterlab_biolm-1.0.7/src/index.ts +56 -0
  35. jupyterlab_biolm-1.0.7/src/services/codeInsertion.ts +68 -0
  36. jupyterlab_biolm-1.0.7/src/services/localStorage.ts +100 -0
  37. jupyterlab_biolm-1.0.7/src/services/settings.ts +136 -0
  38. jupyterlab_biolm-1.0.7/src/widget.tsx +86 -0
  39. jupyterlab_biolm-1.0.7/style/index.css +354 -0
  40. jupyterlab_biolm-1.0.7/test_api.html +12 -0
  41. jupyterlab_biolm-1.0.7/test_extension.py +98 -0
  42. jupyterlab_biolm-1.0.7/tsconfig.json +29 -0
  43. jupyterlab_biolm-1.0.7/webpack.config.js +12 -0
@@ -0,0 +1,112 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ['3.9', '3.10', '3.11']
15
+ node-version: ['18', '20']
16
+
17
+ steps:
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Set up Node.js ${{ matrix.node-version }}
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: ${{ matrix.node-version }}
25
+
26
+ - name: Set up Python ${{ matrix.python-version }}
27
+ uses: actions/setup-python@v5
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+
31
+ - name: Install JupyterLab
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ pip install "jupyterlab>=4.0.0,<5"
35
+
36
+ - name: Install Node.js dependencies
37
+ run: |
38
+ npm install -g npm
39
+ npm ci
40
+
41
+ - name: Install Python dependencies
42
+ run: |
43
+ pip install -e .[dev]
44
+
45
+ - name: Build TypeScript
46
+ run: |
47
+ npm run clean:lib
48
+ npm run build:lib
49
+
50
+ - name: Build labextension
51
+ run: |
52
+ mkdir -p jupyterlab_biolm/labextension
53
+ JUPYTERLAB_CORE=$(python3 -c "import jupyterlab; import os; print(os.path.join(os.path.dirname(jupyterlab.__file__), 'staging'))")
54
+ node node_modules/@jupyterlab/builder/lib/build-labextension.js . --core-path "$JUPYTERLAB_CORE"
55
+
56
+ - name: Verify labextension files
57
+ run: |
58
+ if [ ! -f "jupyterlab_biolm/labextension/package.json" ]; then
59
+ echo "ERROR: package.json not found in labextension directory"
60
+ exit 1
61
+ fi
62
+ if [ ! -f "jupyterlab_biolm/labextension/static/style.js" ]; then
63
+ echo "ERROR: style.js not found in labextension/static directory"
64
+ exit 1
65
+ fi
66
+ echo "✅ Labextension files verified"
67
+
68
+ - name: Install build dependencies
69
+ run: |
70
+ pip install build hatchling hatch-nodejs-version
71
+
72
+ - name: Build Python package (includes pre-built extension)
73
+ run: |
74
+ python -m build
75
+
76
+ - name: Check package contents
77
+ run: |
78
+ pip install check-wheel-contents
79
+ check-wheel-contents dist/*.whl || true
80
+
81
+ version:
82
+ runs-on: ubuntu-latest
83
+ needs: test
84
+ # Only run on pushes to main, but skip if it's a release commit (to avoid loops)
85
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]')
86
+ permissions:
87
+ contents: write # Required to push version bumps and tags
88
+ steps:
89
+ - name: Checkout repository
90
+ uses: actions/checkout@v4
91
+ with:
92
+ fetch-depth: 0 # Required for semantic-release to analyze commits
93
+ token: ${{ secrets.GITHUB_TOKEN }}
94
+
95
+ - name: Set up Node.js
96
+ uses: actions/setup-node@v4
97
+ with:
98
+ node-version: '20'
99
+
100
+ - name: Configure Git
101
+ run: |
102
+ git config --local user.email "action@github.com"
103
+ git config --local user.name "GitHub Action"
104
+
105
+ - name: Install dependencies
106
+ run: npm ci
107
+
108
+ - name: Run semantic-release
109
+ env:
110
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111
+ run: npx semantic-release
112
+
@@ -0,0 +1,124 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published] # Triggers on manual GitHub releases only
6
+ workflow_dispatch: # Allow manual triggering
7
+ inputs:
8
+ repository:
9
+ description: 'Repository to publish to (pypi, testpypi, or empty for testpypi)'
10
+ required: false
11
+ default: 'testpypi'
12
+ type: choice
13
+ options:
14
+ - testpypi
15
+ - pypi
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout repository
22
+ uses: actions/checkout@v4
23
+
24
+ - name: Set up Node.js
25
+ uses: actions/setup-node@v4
26
+ with:
27
+ node-version: '20'
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: '3.11'
33
+
34
+ - name: Install JupyterLab
35
+ run: |
36
+ python -m pip install --upgrade pip
37
+ pip install "jupyterlab>=4.0.0,<5"
38
+
39
+ - name: Install Node.js dependencies
40
+ run: |
41
+ npm install -g npm
42
+ npm ci
43
+
44
+ - name: Build TypeScript
45
+ run: |
46
+ npm run clean:lib
47
+ npm run build:lib
48
+
49
+ - name: Install Python package (editable)
50
+ run: |
51
+ pip install -e .
52
+
53
+ - name: Build labextension
54
+ run: |
55
+ mkdir -p jupyterlab_biolm/labextension
56
+ JUPYTERLAB_CORE=$(python3 -c "import jupyterlab; import os; print(os.path.join(os.path.dirname(jupyterlab.__file__), 'staging'))")
57
+ node node_modules/@jupyterlab/builder/lib/build-labextension.js . --core-path "$JUPYTERLAB_CORE"
58
+
59
+ - name: Verify labextension files
60
+ run: |
61
+ if [ ! -f "jupyterlab_biolm/labextension/package.json" ]; then
62
+ echo "ERROR: package.json not found in labextension directory"
63
+ exit 1
64
+ fi
65
+ if [ ! -f "jupyterlab_biolm/labextension/static/style.js" ]; then
66
+ echo "ERROR: style.js not found in labextension/static directory"
67
+ exit 1
68
+ fi
69
+ echo "✅ Labextension files verified"
70
+
71
+ - name: Build Python package (includes pre-built extension)
72
+ run: |
73
+ pip install build hatchling hatch-nodejs-version
74
+ python -m build
75
+
76
+
77
+ - name: Upload artifacts
78
+ uses: actions/upload-artifact@v4
79
+ with:
80
+ name: python-dist
81
+ path: dist/
82
+ retention-days: 7
83
+
84
+ publish-testpypi:
85
+ runs-on: ubuntu-latest
86
+ needs: build
87
+ if: github.event_name == 'workflow_dispatch' && (github.event.inputs.repository == 'testpypi' || github.event.inputs.repository == '') || github.event_name == 'release' && contains(github.event.release.tag_name, 'rc')
88
+ environment:
89
+ name: testpypi
90
+ permissions:
91
+ id-token: write # Required for TestPyPI trusted publishing
92
+ steps:
93
+ - name: Download artifacts
94
+ uses: actions/download-artifact@v4
95
+ with:
96
+ name: python-dist
97
+ path: dist/
98
+
99
+ - name: Publish package to TestPyPI
100
+ uses: pypa/gh-action-pypi-publish@release/v1
101
+ with:
102
+ packages-dir: dist/
103
+ repository-url: https://test.pypi.org/legacy/
104
+
105
+ publish-pypi:
106
+ runs-on: ubuntu-latest
107
+ needs: build
108
+ if: github.event_name == 'release' && !contains(github.event.release.tag_name, 'rc') || github.event_name == 'workflow_dispatch' && github.event.inputs.repository == 'pypi'
109
+ environment:
110
+ name: pypi
111
+ permissions:
112
+ id-token: write # Required for PyPI trusted publishing
113
+ steps:
114
+ - name: Download artifacts
115
+ uses: actions/download-artifact@v4
116
+ with:
117
+ name: python-dist
118
+ path: dist/
119
+
120
+ - name: Publish package to PyPI
121
+ uses: pypa/gh-action-pypi-publish@release/v1
122
+ with:
123
+ packages-dir: dist/
124
+
@@ -0,0 +1,80 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ *.egg-info/
20
+ .installed.cfg
21
+ *.egg
22
+ .pytest_cache/
23
+ .mypy_cache/
24
+ .ruff_cache/
25
+ .coverage
26
+ coverage/
27
+ htmlcov/
28
+ .tox/
29
+
30
+ # Jupyter
31
+ .ipynb_checkpoints/
32
+ *.ipynb_checkpoints
33
+ *.ipynb
34
+ .jupyter/
35
+
36
+ # Node
37
+ node_modules/
38
+ npm-debug.log
39
+ yarn-error.log
40
+ lerna-debug.log
41
+ .yarn/
42
+ .pnp.*
43
+ .yarn/cache
44
+ .yarn/unplugged
45
+ .yarn/build-state.yml
46
+ .yarn/install-state.gz
47
+
48
+ # TypeScript
49
+ *.tsbuildinfo
50
+ lib/
51
+
52
+ # Lab extension
53
+ jupyterlab_biolm/labextension/
54
+
55
+ # IDE
56
+ .vscode/
57
+ .idea/
58
+ *.swp
59
+ *.swo
60
+ *~
61
+
62
+ # OS
63
+ .DS_Store
64
+ Thumbs.db
65
+
66
+ # Environment
67
+ .env
68
+ .venv
69
+ env/
70
+ venv/
71
+ .env.local
72
+ .env.*.local
73
+
74
+ # Logs
75
+ *.log
76
+ logs/
77
+
78
+ # Cache
79
+ .cache/
80
+