-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from ktaletsk/master
Move to prebuilt extension system
- Loading branch information
Showing
38 changed files
with
1,673 additions
and
1,474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,48 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Install node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '14.x' | ||
- name: Run a one-line script | ||
run: echo Hello, world! | ||
- name: Install dependencies | ||
run: python -m pip install -U jupyter_packaging~=0.10.4 jupyterlab~=3.0.16 pip wheel | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Install node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '14.x' | ||
- name: Install Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.8' | ||
architecture: 'x64' | ||
|
||
|
||
- name: Setup pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-3.8-${{ hashFiles('package.json') }} | ||
restore-keys: | | ||
pip-3.8- | ||
pip- | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Setup yarn cache | ||
uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
yarn- | ||
- name: Install dependencies | ||
run: python -m pip install -U jupyter_packaging~=0.10.4 jupyterlab~=3.0.16 pip wheel | ||
- name: Install the extension | ||
run: | | ||
set -eux | ||
python -m pip install . | ||
- name: Integration test | ||
run: | | ||
jupyter serverextension list 2>&1 | grep -ie "jupyterlab_latex.*OK" | ||
jupyter labextension list 2>&1 | grep -ie "@jupyterlab/latex.*OK" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
.ipynb_checkpoints/ | ||
*.bundle.* | ||
*.gz | ||
dist/ | ||
jupyterlab_latex.egg-info/ | ||
jupyterlab_latex/__pycache__/ | ||
jupyterlab_latex/labextension/ | ||
lib/ | ||
test/build/* | ||
node_modules/ | ||
npm-debug.log | ||
test/build/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules | ||
**/lib | ||
**/lib/ | ||
dist/ | ||
jupyterlab_latex/labextension/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Making a new release of jupyterlab_latex | ||
|
||
The extension can be published to `PyPI` and `npm` using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser). | ||
|
||
## Automated releases with the Jupyter Releaser | ||
|
||
The extension repository should already be compatible with the Jupyter Releaser. | ||
|
||
Check out the [workflow documentation](https://github.com/jupyter-server/jupyter_releaser#typical-workflow) for more information. | ||
|
||
Here is a summary of the steps to cut a new release: | ||
|
||
- Fork the [`jupyter-releaser` repo](https://github.com/jupyter-server/jupyter_releaser) | ||
- Add `ADMIN_GITHUB_TOKEN`, `PYPI_TOKEN` and `NPM_TOKEN` to the Github Secrets in the fork | ||
- Go to the Actions panel | ||
- Run the "Draft Changelog" workflow | ||
- Merge the Changelog PR | ||
- Run the "Draft Release" workflow | ||
- Run the "Publish Release" workflow | ||
|
||
## Publishing to `conda-forge` | ||
|
||
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 | ||
|
||
Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
#!/bin/bash | ||
|
||
jupyter labextension install @jupyterlab/[email protected] | ||
#!/usr/bin/env bash | ||
python -m pip install . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
jupyterlab==0.35 | ||
jupyterlab_latex==0.4.1 | ||
notebook==6.1.5 | ||
jupyter_packaging ~=0.10,<2 | ||
jupyterlab ~=3.0 | ||
setuptools | ||
nbgitpuller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"packageManager": "python", | ||
"packageName": "jupyterlab-latex", | ||
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyterlab-latex" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"ServerApp": { | ||
"jpserver_extensions": { | ||
"jupyterlab_latex": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
__version__ = '3.0.0' | ||
import json | ||
from pathlib import Path | ||
|
||
__all__ = ["__version__", "__js__"] | ||
|
||
def _fetchJS(): | ||
settings = Path(__file__).parent.resolve() / "labextension/package.json" | ||
|
||
try: | ||
with settings.open() as f: | ||
return json.load(f) | ||
except FileNotFoundError: | ||
pass | ||
|
||
raise FileNotFoundError(f"Could not find package.json at {settings!s}") | ||
|
||
|
||
def _fetchVersion(): | ||
return _fetchJS()["version"] | ||
|
||
__js__ = _fetchJS() | ||
__version__ = _fetchVersion() |
Oops, something went wrong.