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

produce voila-sourcemaps with only the sourcemaps #51

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8148b77
produce voila-sourcemaps with only the sourcemaps
maartenbreddels Oct 20, 2020
f0ea505
update docs, move outputs
maartenbreddels Oct 20, 2020
8971e06
build in place
maartenbreddels Oct 20, 2020
990a2d6
add pip and nodejs
maartenbreddels Oct 20, 2020
8803bb9
just run npm
maartenbreddels Oct 20, 2020
de57de1
download 2 packages
maartenbreddels Oct 20, 2020
d001e8f
wrong url
maartenbreddels Oct 20, 2020
8800ff9
fix script
maartenbreddels Oct 20, 2020
541fe67
fix script
maartenbreddels Oct 20, 2020
f7d9067
install dir
maartenbreddels Oct 20, 2020
f9c6534
license moved
maartenbreddels Oct 20, 2020
ff16c7e
put tests and build stuff under outputs
maartenbreddels Oct 20, 2020
b4d6c13
build twice?
maartenbreddels Oct 20, 2020
88af420
can script be part of build?
maartenbreddels Oct 20, 2020
0a06025
try with single build
maartenbreddels Oct 20, 2020
e885494
just use pip
maartenbreddels Oct 20, 2020
bacb05a
are test run?
maartenbreddels Oct 20, 2020
fdfc78f
move requirements
maartenbreddels Oct 20, 2020
c8214d6
tests
maartenbreddels Oct 20, 2020
cba37b7
try with test scripts
maartenbreddels Oct 20, 2020
d95e1be
no top level skip
maartenbreddels Oct 21, 2020
f96b48e
run script as script file, not command
maartenbreddels Oct 21, 2020
9d03680
add missing files
maartenbreddels Oct 21, 2020
1782596
should fail on voila test
maartenbreddels Oct 21, 2020
72c1372
change top level name
maartenbreddels Oct 21, 2020
0f198a7
add bogus top level test to make linter happy
maartenbreddels Oct 21, 2020
ad41557
make test run
maartenbreddels Oct 21, 2020
ebbe647
cleanups
maartenbreddels Oct 21, 2020
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
4 changes: 2 additions & 2 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions recipe/install_voila-sourcemaps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -euxo pipefail

# this currently fails, because the source distribution is broken
# $PYTHON -m pip install ./voila-sourcemaps --no-deps --ignore-installed --no-cache-dir -vvv

# TODO: on next release, we can remove the next lines
mkdir -p $PREFIX/share/jupyter/voila/templates/base/static
cp $SRC_DIR/voila-sourcemaps/share/jupyter/voila/templates/base/static/*.map $PREFIX/share/jupyter/voila/templates/base/static
5 changes: 5 additions & 0 deletions recipe/install_voila.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -euxo pipefail

$PYTHON -m pip install ./voila --no-deps --ignore-installed --no-cache-dir -vvv
70 changes: 47 additions & 23 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,67 @@
{% set name = "voila" %}
{% set version = "0.2.4" %}

# this recipe fetches both voila and voila-sourcemaps (which are released in tandom)

package:
name: {{ name|lower }}
# the package name should not equal any of the output names, otherwise the tests do not run
name: {{ name|lower }}-combined
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: 332725b88fb026ad421db90fdad53d7e8de2ffd03a8584a55d9940465932ede8
- url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
folder: {{ name }}
sha256: 332725b88fb026ad421db90fdad53d7e8de2ffd03a8584a55d9940465932ede8
- url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}-sourcemaps/{{ name }}-sourcemaps-{{ version }}.tar.gz
folder: {{ name }}-sourcemaps
sha256: 6b36c5e598c8ad43d56671589a01e24db19cc3e070d2841491663b7ff8e48c20

build:
number: 0
noarch: python
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
entry_points:
- voila = voila.app:main

requirements:
host:
- python >=3.6
- pip
- nodejs
run:
- python >=3.6
- nbconvert >=6.0.0,<7
- jupyter_server >=0.3.0,<2
- nbclient >=0.4.0,<0.6
number: 1

test:
imports:
- voila
commands:
- voila --help
- echo "Tests are done in the outputs"

outputs:
- name: voila
version: {{ version }}
script: install_voila.sh
build:
noarch: python
entry_points:
- voila = voila.app:main
requirements:
host:
- python >=3.6
- pip
- nodejs
run:
- python >=3.6
- nbconvert >=6.0.0,<7
- jupyter_server >=0.3.0,<2
- nbclient >=0.4.0,<0.6
test:
script: run_test_voila.sh
- name: voila-sourcemaps
version: {{ version }}
script: install_voila-sourcemaps.sh
build:
noarch: python
requirements:
host:
- python
- pip
run:
- {{ pin_subpackage('voila', exact=True) }}
test:
script: run_test_voila-sourcemaps.sh

about:
home: https://github.com/voila-dashboards/voila
license: BSD-3-Clause
license_family: BSD
license_file: LICENSE
license_file: voila/LICENSE
summary: Rendering of live Jupyter notebooks with interactive widgets
description: |
Voila serves live Jupyter notebooks including Jupyter interactive widgets.
Expand Down
5 changes: 5 additions & 0 deletions recipe/run_test_voila-sourcemaps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -euxo pipefail

test -f "${PREFIX}/share/jupyter/voila/templates//base/static/voila.js.map"
6 changes: 6 additions & 0 deletions recipe/run_test_voila.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -euxo pipefail

python -c "import voila"
voila --help