-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to use pyct, pyctdev, nbsite (#19)
* Updated packaging, testing, docs to match standard pyviz. * Allows release on tag, website building, etc. * Expanded the website, with notebooks, favicon, etc. * Added license * Added unit tests
- Loading branch information
Showing
37 changed files
with
919 additions
and
13,148 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
environment: | ||
global: | ||
CHANS_DEV: "-c pyviz/label/dev" | ||
matrix: | ||
- PY: "3.6" | ||
PYTHON: "C:\\Python36-x64" | ||
CONDA: "C:\\Miniconda36-x64" | ||
|
||
install: | ||
- "SET PATH=%CONDA%;%CONDA%\\Scripts;%PATH%" | ||
- "conda install -y %CHANS_DEV% pyctdev && doit ecosystem_setup" | ||
- "doit env_create --name=colorcet --python=%PY%" | ||
- "activate colorcet" | ||
- "doit develop_install %CHANS_DEV% -o examples" | ||
- "doit env_capture" | ||
|
||
build: off | ||
|
||
test_script: | ||
- "doit test_all" |
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,2 @@ | ||
colorcet/__init__.py export-subst | ||
setup.cfg export-subst |
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,105 @@ | ||
language: generic | ||
|
||
env: | ||
global: | ||
- CHANS_DEV="-c pyviz/label/dev" | ||
- CHANS_REL="-c pyviz" | ||
- LABELS_DEV="--label dev" | ||
- LABELS_REL="--label dev --label main" | ||
- PYENV_VERSION=3.6 | ||
- PKG_TEST_PYTHON="--test-python=py36 --test-python=py27" | ||
|
||
stages: | ||
- test | ||
- name: conda_dev_package | ||
if: tag =~ ^v(\d+|\.)+[a-z]\d+$ | ||
- name: pip_dev_package | ||
if: tag =~ ^v(\d+|\.)+[a-z]\d+$ | ||
- name: conda_package | ||
if: tag =~ ^v(\d+|\.)+[^a-z]\d+$ | ||
- name: pip_package | ||
if: tag =~ ^v(\d+|\.)+[^a-z]\d+$ | ||
- name: website_dev | ||
if: tag =~ ^v(\d+|\.)+[a-z]\d+$ OR tag = website_dev | ||
- name: website_release | ||
if: tag =~ ^v(\d+|\.)+[^a-z]\d+$ OR tag = website | ||
|
||
jobs: | ||
include: | ||
- &default | ||
stage: test | ||
os: linux | ||
install: | ||
- pip install pyctdev && doit miniconda_install && pip uninstall -y doit pyctdev | ||
- export PATH="$HOME/miniconda/bin:$PATH" && hash -r | ||
- conda config --set always_yes True | ||
- conda install -c pyviz/label/dev pyctdev && doit ecosystem_setup | ||
before_script: | ||
- doit env_create --name=colorcet --python=$PYENV_VERSION | ||
- source activate colorcet | ||
- doit develop_install $CHANS_DEV -o examples | ||
- doit env_capture | ||
script: | ||
- doit test_all | ||
|
||
|
||
- &website | ||
<<: *default | ||
stage: website_release | ||
script: | ||
# TODO: set chans according to dev/rel | ||
- doit develop_install $CHANS_DEV -o doc -o examples | ||
- doit build_website | ||
|
||
deploy: | ||
- provider: pages | ||
skip_cleanup: true | ||
github_token: $GITHUB_TOKEN | ||
local_dir: ./builtdocs | ||
fqdn: colorcet.pyviz.org | ||
on: | ||
tags: true | ||
all_branches: true | ||
|
||
- <<: *website | ||
stage: website_dev | ||
deploy: | ||
- provider: pages | ||
skip_cleanup: true | ||
github_token: $GITHUB_TOKEN | ||
local_dir: ./builtdocs | ||
repo: pyviz-dev/colorcet | ||
on: | ||
tags: true | ||
all_branches: true | ||
|
||
## dev packages | ||
|
||
- &pip_pkg | ||
env: PYPI=testpypi PYPIUSER=$TPPU PYPIPASS=$TPPP | ||
stage: pip_dev_package | ||
install: pip install pyctdev && doit ecosystem=pip ecosystem_setup | ||
before_script: | ||
- doit ecosystem=pip package_build $PKG_TEST_PYTHON --test-group=unit --sdist-install-build-deps | ||
script: doit ecosystem=pip package_upload -u $PYPIUSER -p $PYPIPASS --pypi ${PYPI} | ||
|
||
- &conda_pkg | ||
<<: *default | ||
stage: conda_dev_package | ||
env: LABELS=$LABELS_DEV CHANS=$CHANS_DEV | ||
before_script: | ||
- travis_wait 60 doit package_build $CHANS $PKG_TEST_PYTHON --package-name colorcet --test-group=unit | ||
script: doit package_upload --token=$ANACONDA_TOKEN $LABELS | ||
|
||
## release packages | ||
|
||
- <<: *pip_pkg | ||
env: PYPI=pypi PYPIUSER=$PPU PYPIPASS=$PPP | ||
stage: pip_package | ||
|
||
- <<: *conda_pkg | ||
stage: conda_package | ||
env: LABELS=$LABELS_REL CHANS=$CHANS_REL | ||
|
||
notifications: | ||
email: false |
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,8 @@ | ||
include LICENSE.txt | ||
include README.md | ||
include colorcet/.version | ||
graft examples | ||
graft colorcet/examples | ||
global-exclude *.py[co] | ||
global-exclude *~ | ||
global-exclude *.ipynb_checkpoints/* |
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,20 @@ | ||
## Matplotlib tests | ||
|
||
These tests contain baseline images generated using [pytest-mpl](https://github.com/matplotlib/pytest-mpl). | ||
To run these tests with the fig checking enabled first install pytest-mpl: | ||
|
||
```bash | ||
pip install pytest-mpl | ||
``` | ||
|
||
To regenerate these figures from within this dir run: | ||
|
||
```bash | ||
pytest --mpl-generate-path=baseline | ||
``` | ||
|
||
To run the tests checking that the output is as expected run: | ||
|
||
```bash | ||
pytest --mpl | ||
``` |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 @@ | ||
import pytest # noqa | ||
import colorcet as cc | ||
|
||
def test_bokeh_palettes_available(): | ||
assert len(cc.palette.items()) == 72 | ||
assert len(cc.palette_n.items()) == 21 | ||
|
||
def test_bokeh_palette_is_a_list(): | ||
assert isinstance(cc.blues, list) | ||
assert len(cc.blues) == 256 | ||
assert cc.blues[0] == '#f0f0f0' | ||
assert cc.blues[-1] == '#3a7bb1' |
Oops, something went wrong.