Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for JupyterLab 3 #62

Merged
merged 52 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
89135f3
inspirational text for the end state of this PR
nrbgt Dec 29, 2020
578a876
start upgrading random versions
nrbgt Dec 29, 2020
bfcc271
bump more versions, resolve envs
nrbgt Dec 29, 2020
e6433d5
use lumino
nrbgt Dec 29, 2020
e823784
linting
nrbgt Dec 29, 2020
5d3a88a
add jlab builder
nrbgt Dec 29, 2020
f9a424e
keep cutting lab stuff
nrbgt Dec 29, 2020
9a1abd2
start working on install cruft
nrbgt Dec 29, 2020
6353948
spec version, more work on prettier, entropy, etc.
nrbgt Dec 29, 2020
0aed676
add @jupyter-widgets/base to shared packages
nrbgt Dec 29, 2020
7d5fe73
add explicit jupyterlab_widgets dep
nrbgt Dec 29, 2020
a082f4f
more tinkering with condarc
nrbgt Dec 29, 2020
4508a53
update some more deps
nrbgt Dec 29, 2020
d9fa570
more work on extension entropy, start messing with ci
nrbgt Dec 29, 2020
e5f2cb3
more changelog updating
nrbgt Dec 29, 2020
e424d7b
start working on robot
nrbgt Dec 29, 2020
e0ae7e0
more work on robot, watching
nrbgt Dec 29, 2020
6ead3c6
more robot work, update python version in notebook meta
nrbgt Dec 29, 2020
26ced2a
fix robot, more tuning of test stuff
nrbgt Dec 29, 2020
0daa0a5
update isort
nrbgt Dec 29, 2020
27e1b26
add more data_files
nrbgt Dec 29, 2020
843eb07
more work on data_files
nrbgt Dec 29, 2020
ac0f1d1
more tweaking of lab preflight
nrbgt Dec 29, 2020
980b52e
cleaning up after rebase
nrbgt Dec 29, 2020
860c65b
fix up references to .ci
nrbgt Dec 29, 2020
ac94868
add 'needs' back to test step
nrbgt Dec 29, 2020
5004351
relax channels on ci for a sec
nrbgt Dec 29, 2020
495de9c
more ci env work
nrbgt Dec 29, 2020
1b4240a
re-lock envs
nrbgt Dec 29, 2020
c000526
try mamba again
nrbgt Dec 29, 2020
f41fc61
turns out build and linux tests can share cache
nrbgt Dec 29, 2020
bf15040
specify sdist install correctly on linux
nrbgt Dec 29, 2020
5474902
fix path for dist unpacking
nrbgt Dec 29, 2020
267cdac
hoist mamba env var
nrbgt Dec 29, 2020
f971061
update anaconda-project-lock.yml (for jedi, lab, jupyter_server, etc)
nrbgt Jan 8, 2021
52f824a
bump copyright year
nrbgt Jan 8, 2021
2da142c
belt-and-suspenders no-browser
nrbgt Jan 8, 2021
66c0e79
merging master
nrbgt Jan 12, 2021
20ece85
resolve yarn lock, envs
nrbgt Jan 12, 2021
169bd8a
update bqplot pin
nrbgt Jan 12, 2021
e1d9a15
use bqplot in simulation
nrbgt Jan 12, 2021
5abd78b
add docs to lock
nrbgt Jan 14, 2021
b5f8454
relock envs
nrbgt Jan 14, 2021
d5c2747
bump jupyterlab/builder
nrbgt Jan 14, 2021
4dae1a1
resolve with new builder
nrbgt Jan 14, 2021
499072b
backport schema fix from #60
nrbgt Jan 19, 2021
aceaffa
merge master
nrbgt Jan 19, 2021
e15609c
more lumino
nrbgt Jan 19, 2021
63ca49a
more work on schema generation
nrbgt Jan 19, 2021
3458f08
Merge remote-tracking branch 'UPSTREAM/master' into gh-6-lab3
nrbgt Jan 21, 2021
2f6a062
bump versions, hoist stuff to index for export
nrbgt Jan 21, 2021
98c509d
fix up preflight with index/tokens, etc
nrbgt Jan 21, 2021
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
14 changes: 14 additions & 0 deletions .github/.condarc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
add_pip_as_python_dependency: False
aggressive_update_packages: []
always_yes: True
auto_update_conda: False
default_channels: []
local_repodata_ttl: 99999
notify_outdated_conda: False
remote_connect_timeout_secs: 600.0
remote_max_retries: 10
remote_read_timeout_secs: 600.0
show_channel_urls: True
show_sources: True
unsatisfiable_hints_check_depth: 0
use_only_tar_bz2: True
3 changes: 2 additions & 1 deletion .github/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ channels:

dependencies:
- anaconda-project =0.8.4
- conda =4.8.3
- conda =4.9
- doit ==0.32
- mamba =0.7
- pip
- python >=3.7,<3.8
- twine
Expand Down
96 changes: 74 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,65 @@ on:
- master

env:
ATEST_RETRIES: 2
INSTALL_ARTIFACT: wheel
PIP_DISABLE_PIP_VERSION_CHECK: 1
PYTHONIOENCODING: utf-8
PYTHONUNBUFFERED: 1
PYTHONUNBUFFERED: '1'
PIP_DISABLE_PIP_VERSION_CHECK: '1'
# until have mamabforge...
CONDA_EXE: mamba
# our stuff
SKIP_CONDA_PREFLIGHT: 1
CACHE_EPOCH: 0

jobs:
ci:
build:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu]
steps:
- name: git checkout
uses: actions/checkout@v2

- name: cache (conda)
uses: actions/cache@v1
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ hashFiles('.github/environment.yml',
'anaconda-project-lock.yml') }}
restore-keys: |
${{ runner.os }}-conda-

- name: cache (yarn)
uses: actions/cache@v1
with:
path: .yarn-packages
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock', '.yarnrc') }}
restore-keys: |
yarn-${{ runner.os }}-
yarn-

- name: base env (conda)
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: .github/environment.yml
use-only-tar-bz2: true

- name: build
shell: bash -l {0}
run: |
doit -n4 lint release || doit lint release || exit 1

- name: publish dists
uses: actions/upload-artifact@v2
with:
name: ipyelk dist ${{ github.run_number }}
path: ./dist

test:
runs-on: ${{ matrix.vm }}
needs: [build]
strategy:
fail-fast: false
matrix:
Expand All @@ -37,6 +85,10 @@ jobs:
- os: windows
miniforge: Windows-x86_64.exe
vm: windows-latest
env:
INSTALL_ARTIFACT: wheel
TESTING_IN_CI: 'true'
ATEST_RETRIES: '2'
steps:
- name: configure line endings
run: |
Expand All @@ -54,6 +106,14 @@ jobs:
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-conda-

- name: env (conda)
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: .github/environment.yml
use-only-tar-bz2: true
installer-url: |
https://github.com/conda-forge/miniforge/releases/download/4.9.2-4/Miniforge3-4.9.2-4-${{ matrix.miniforge }}

- name: cache (yarn)
uses: actions/cache@v1
with:
Expand All @@ -64,39 +124,31 @@ jobs:
${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
${{ env.CACHE_EPOCH }}-yarn-

- name: env (conda)
uses: conda-incubator/setup-miniconda@v2
- uses: actions/download-artifact@v2
with:
environment-file: .github/environment.yml
use-only-tar-bz2: true
installer-url: |
https://github.com/conda-forge/miniforge/releases/download/4.9.2-0/Miniforge3-4.9.2-0-${{ matrix.miniforge }}
name: ipyelk dist ${{ github.run_number }}
path: ./dist

- name: build (linux)
- name: test (linux)
if: ${{ contains(matrix.os, 'ubuntu') }}
shell: bash -l {0}
run: INSTALL_ARTIFACT=sdist doit -n4 all || doit all || exit 1
run: |
export INSTALL_ARTIFACT=sdist
doit -n4 all || doit all || exit 1

- name: build (macos)
- name: test (macos)
if: ${{ contains(matrix.os, 'macos') }}
shell: bash -l {0}
run: doit -n4 all || doit all || exit 1

- name: build (windows)
- name: test (windows)
if: ${{ contains(matrix.os, 'windows') }}
shell: cmd /C CALL {0}
env:
ATEST_PROCESSES: 1
WIN_CI: 1
run: doit all || doit all || exit 1

- name: publish (linux)
if: ${{ contains(matrix.os, 'ubuntu') }}
uses: actions/upload-artifact@v2
with:
name: ipyelk dist ${{ github.run_number }}
path: ./dist

- name: reports
uses: actions/upload-artifact@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ py_src/ipyelk/labextension/*.tgz

# generated files
py_src/ipyelk/schema/*.json
py_src/ipyelk/labextension/

# editors
.idea/
Expand Down
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.yarn-packages/
**/__pycache__/**/*
**/.ipynb_checkpoints/**/*
build/
envs/
lib/
node_modules/
py_src/ipyelk/labextension
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## @jupyrdf/jupyter-elk 1.0.0

- updates for JupyterLab 3 ([#6][])
- uses `@lumino` components

## ipyelk 1.0.0

- supports (and depends on) JupyterLab 3 ([#6][])
- labextension is delivered as part of the `ipyelk` python package, no more
`lab build`
- `npm` tarballs will still be uploaded

[#6]: https://github.com/jupyrdf/ipyelk/issues/6

--

## @jupyrdf/jupyter-elk 0.3.0

## ipyelk 0.3.0
Expand Down
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

## Install

- Get [Miniconda3](https://docs.conda.io/en/latest/miniconda.html)
- Get [Miniforge](https://github.com/conda-forge/miniforge)
- Get [anaconda-project](https://anaconda-project.readthedocs.io)
- Get [doit](https://pydoit.org)

```bash
conda install anaconda-project=0.8.4 doit=0.32
```

To have an environment _similar_ to what's on CI:

```bash
CONDA_EXE=$(which mamba) CONDARC=.github/.condarc conda env update --file .github/environment.yml
```

## Get Started

```bash
Expand Down Expand Up @@ -140,7 +146,7 @@ anaconda-project run twine upload where-you-expanded-the-archive/ipyelk-*
- Run:

```bash
anaconda-project update
python scripts/lock.py
doit lint
```

Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include LICENSE.txt README.md COPYRIGHT.md py_src/ipyelk/schema/elkschema.json
recursive-include third-party *.html
recursive-include py_src/ipyelk/labextension *.*
recursive-exclude scripts *.*

exclude src lib docs examples package.json scripts
Expand Down
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,31 @@
## Prerequisites

- `python >=3.7`
- `jupyterlab >=1,<2` _JupyterLab 2+ compatibility coming soon!_
- `nodejs >=10,<14`

### JupyterLab compatibility

| `jupyterlab` | `ipyelk` | special concerns |
| ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| `==1.*` | `>1` | needs `nodejs >10`<br/>`jupyter labextension install @jupyrdf/jupyter-elk`<br/>backports, etc. land on the `0.3.x` branch |
| `==2.*` | `>1` | _untested_ |
| `==3.*` | `>=1` |

## Install

`ipyelk` is distributed on [conda-forge][] and [PyPI][].

### `ipyelk` with `conda` (recommended)

`conda` can also install `nodejs`.

```bash
conda install -c conda-forge ipyelk jupyterlab=1 nodejs
conda install -c conda-forge ipyelk jupyterlab=3
```

### `ipyelk` with `pip`

install `nodejs` with a [package manager][package-manager]

```bash
pip install ipyelk jupyterlab=1
```

### `@jupyrdf/jupyter-elk` with `jupyter labextension install`

`@jupyrdf/jupyter-elk` is distributed on [npm][], and relies on
`@jupyter-widgets/jupyterlab-manager`.

```bash
jupyter labextension install @jupyter-widgets/jupyterlab-manager @jupyrdf/jupyter-elk
pip install ipyelk jupyterlab=3
```

### Developing
Expand All @@ -62,6 +57,11 @@ In your kernel, `ipyelk`:
- build [ELK JSON][elk-json]
- optionally, use [networkx][]

In your `jupyter_server`:

- serve the `@jupyrdf/jupyter-elk` assets as a
[federated module](https://jupyterlab.readthedocs.io/en/latest/extension/extension_dev.html#prebuilt-extensions)

In the browser, `@jupyrdf/jupyter-elk`:

- [ELK][] lays out the diagram in a WebWorker
Expand All @@ -72,7 +72,6 @@ In the browser, `@jupyrdf/jupyter-elk`:

```bash
pip uninstall ipyelk
jupyter labextension uninstall @jupyrdf/jupyter-elk
```

## Open Source
Expand Down
Loading