diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile index a842b2e..a78f16d 100644 --- a/.circleci/Dockerfile +++ b/.circleci/Dockerfile @@ -24,7 +24,4 @@ RUN /bin/bash -c "source ${workdir}/miniconda/etc/profile.d/conda.sh; \ pip install selenium; \ pip install pyvirtualdisplay" -# Following line is causing permission denied -# RUN conda install -n jupyter-vcdat ${cdat_channels} -c conda-forge vcs - CMD ["/bin/bash"] diff --git a/.circleci/config.yml b/.circleci/config.yml index dc4987d..0800368 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,4 @@ version: 2 - aliases: - &setup_jupyter_vcdat name: setup_jupyter_vcdat @@ -63,23 +62,18 @@ aliases: environment: CHANNELS: "-c cdat/label/nightly -c conda-forge -c cdat" command: | - if [[ $CIRCLE_BRANCH == 'master' ]]; then - export LABEL=nightly - else - exit 0 - fi export PKG_NAME=jupyter-vcdat + export LABEL=nightly export USER=cdat - export VERSION=2.1.1 conda install conda-build anaconda-client conda config --set anaconda_upload no export CONDA_BLD_PATH=`pwd`/conda_build git clone git://github.com/cdat/conda-recipes cd conda-recipes ln -s ../recipe $PKG_NAME - python ./prep_for_build.py -l $VERSION -b ${CIRCLE_BRANCH} + python ./prep_for_build.py -l $VCDAT_VERSION -b ${CIRCLE_BRANCH} conda build $PKG_NAME $CHANNELS --python=3.6 - anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l $LABEL $CONDA_BLD_PATH/noarch/$PKG_NAME-$VERSION.`date +%Y*`0.tar.bz2 --force + anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l $LABEL $CONDA_BLD_PATH/noarch/$PKG_NAME-$VCDAT_VERSION.`date +%Y*`0.tar.bz2 --force - &npm_publish name: npm_publish @@ -95,18 +89,23 @@ aliases: cd kube echo "$DOCKER_TOKEN" | docker login --username downie4 --password-stdin docker build --no-cache --tag=cdat/vcdat:nightly . + docker image tag cdat/vcdat:nightly cdat/vcdat:$VCDAT_VERSION + docker push cdat/vcdat:$VCDAT_VERSION docker push cdat/vcdat:nightly docker logout jobs: publish: docker: - - image: circleci/buildpack-deps:stretch + - image: cdat/vcdat_circleci:nightly + environment: + VCDAT_VERSION: "2.1.1" steps: - checkout - run: *npm_publish - setup_remote_docker - run: *docker_publish + - run: *conda_upload linux_jupyter_vcdat: docker: @@ -129,7 +128,8 @@ jobs: destination: tests_firefox_html - store_artifacts: path: jupyter-vcdat_logfile.txt - - run: *conda_upload + # Uncomment below to upload directly to conda without merging to master + #- run: *conda_upload workflows: version: 2 diff --git a/kube/README.md b/kube/README.md index 09360e5..85e4903 100644 --- a/kube/README.md +++ b/kube/README.md @@ -1,4 +1,4 @@ -## New Jupyter-vcdat Release Steps: +# New Jupyter-vcdat Release Steps: When making a new jupyter-vcdat official release, make sure master contains all the latest updates and the package.json version has been updated to the @@ -6,8 +6,38 @@ new version number. Check all documentation has been updated to reflect new release number and features. Go to https://github.com/CDAT/jupyter-vcdat/releases and make sure the release has been tagged with latest commit. Once everything has been done and all tests have passed, then jupyter-vcdat is -ready to publish to npm and docker hub. Follow steps below to publish a new docker -image and the npm package. +ready to publish to npm and docker hub. Follow the steps below to make official +published versions. + +## Convert nightly to latest release +Nightly docker images, conda and npm packages are generated by each commit to +master. Therefore, in order to do an official release, all that's needed is to +remove the nightly tag from the latest packages in conda, npm and docker. + +## Convert latest nightly package to official: +- Get the version of the latest nightly npm package (the one to make official) +```bash +npm view jupyter-vcdat dist-tags #Get the latest nightly version number +npm dist-tag rm jupyter-vcdat@ nightly #Removes nightly tag +``` + +## Convert latest nightly docker image to official latest +- Create a tag for the nightly image to latest +```bash +docker pull cdat/vcdat:nightly #Get the latest docker nightly image +docker image tag cdat/vcdat:nightly cdat/vcdat:latest #Set as the latest image +docker push cdat/vcdat:latest #Push to docker hub +``` + +## For Conda package +- Go to anaconda cloud and edit the label of the nightly package, so that it +includes the latest official label: https://anaconda.org/cdat/jupyter-vcdat/files +Find the latests stable file and click 'labels'. Then enter new version label. + +# Manual Publish steps: +Note: The steps below are for manually publishing jupyter-vcdat to npm and docker hub, +however every commit to master will automaticaly publish as the nightly tag +(after tests pass), so these steps are only if you need to run it manually. ## NPM Publish steps: @@ -19,6 +49,8 @@ git pull #Pull latest changes from master ``` - Publish to npm: +Note: Make sure the package.json contains the correct official version being published +before running this step. ```bash npm login npm install @@ -42,5 +74,6 @@ Note: Within browser, go to: localhost:9000, and enter the jupyterlab token from - After test is successful and image is running properly, publish to docker hub: ```bash docker push cdat/vcdat: +docker image tag cdat/vcdat: cdat/vcdat:latest docker push cdat/vcdat:latest ``` diff --git a/package.json b/package.json index 44cb92b..995c3b2 100644 --- a/package.json +++ b/package.json @@ -55,30 +55,30 @@ } }, "dependencies": { - "@jupyterlab/application": "^1.1.0", - "@jupyterlab/apputils": "^1.1.0", - "@jupyterlab/cells": "^1.1.0", - "@jupyterlab/console": "^1.1.0", + "@jupyterlab/application": "^1.1.3", + "@jupyterlab/apputils": "^1.1.3", + "@jupyterlab/cells": "^1.1.3", + "@jupyterlab/console": "^1.1.3", "@jupyterlab/coreutils": "^3.1.0", - "@jupyterlab/docregistry": "^1.1.0", - "@jupyterlab/filebrowser": "^1.1.0", - "@jupyterlab/mainmenu": "^1.1.0", - "@jupyterlab/notebook": "^1.1.0", - "@jupyterlab/outputarea": "^1.1.0", - "@jupyterlab/services": "^4.1.0", + "@jupyterlab/docregistry": "^1.1.3", + "@jupyterlab/filebrowser": "^1.1.3", + "@jupyterlab/mainmenu": "^1.1.3", + "@jupyterlab/notebook": "^1.1.3", + "@jupyterlab/outputarea": "^1.1.3", + "@jupyterlab/services": "^4.1.1", "@phosphor/algorithm": "^1.2.0", "@phosphor/commands": "^1.7.1", "@phosphor/coreutils": "^1.3.1", "@phosphor/disposable": "^1.3.0", "@phosphor/messaging": "^1.3.0", "@phosphor/signaling": "^1.3.0", - "@phosphor/widgets": "^1.9.1", + "@phosphor/widgets": "^1.9.2", "@types/bootstrap-slider": "^9.9.0", "@types/jquery": "^3.3.31", - "@types/lodash": "^4.14.138", + "@types/lodash": "^4.14.141", "@types/rc-slider": "^8.6.5", "@types/react": "~16.8.4", - "@types/react-bootstrap": "^0.32.19", + "@types/react-bootstrap": "^0.32.20", "@types/react-dom": "~16.8.4", "@types/react-html-parser": "^2.0.1", "@types/react-joyride": "^2.0.2", @@ -91,34 +91,34 @@ "jupyterlab-tutorial": "^1.0.4", "lodash": "^4.17.15", "moment": "^2.24.0", - "node": "^12.9.0", + "node": "^12.11.0", "query-string": "^6.8.2", "rc-slider": "^8.7.1", "react": "~16.8.4", - "react-compound-slider": "^2.2.0", + "react-compound-slider": "^2.3.0", "react-dom": "~16.8.4", "react-html-parser": "^2.0.2", "react-joyride": "^2.1.1", - "react-list": "^0.8.10", + "react-list": "^0.8.13", "react-load-script": "0.0.6", - "react-toastify": "^5.3.2", + "react-toastify": "^5.4.0", "reactstrap": "^8.0.1", "remove": "^0.1.5", - "tar": "^4.4.10" + "tar": "^4.4.13" }, "devDependencies": { - "husky": "^3.0.4", - "lint-staged": "^9.2.5", + "husky": "^3.0.8", + "lint-staged": "^9.4.1", "node-sass": "^4.12.0", - "nodemon": "^1.19.1", + "nodemon": "^1.19.3", "prettier": "^1.18.2", "prettier-tslint": "^0.4.2", "rimraf": "^2.7.1", - "tslint": "^5.19.0", - "tslint-config-airbnb": "^5.11.1", + "tslint": "^5.20.0", + "tslint-config-airbnb": "^5.11.2", "tslint-config-prettier": "^1.18.0", - "tslint-react": "^4.0.0", - "typescript": "^3.6.2" + "tslint-react": "^4.1.0", + "typescript": "^3.6.3" }, "jupyterlab": { "extension": true diff --git a/src/components/ColormapEditor.tsx b/src/components/ColormapEditor.tsx index 63e9424..1fbcc84 100644 --- a/src/components/ColormapEditor.tsx +++ b/src/components/ColormapEditor.tsx @@ -64,7 +64,7 @@ export default class ColormapEditor extends React.Component< toggle={this.toggleDropdown} > */ "colormap-dropdown-vcdat"} disabled={!this.props.plotReady} caret={true} > @@ -80,7 +80,9 @@ export default class ColormapEditor extends React.Component< }; return ( */ "colormap-dropdown-item-vcdat" + } onClick={selectCM} key={cmName} > diff --git a/src/components/GraphicsMenu.tsx b/src/components/GraphicsMenu.tsx index 3f1024a..9661329 100644 --- a/src/components/GraphicsMenu.tsx +++ b/src/components/GraphicsMenu.tsx @@ -287,7 +287,7 @@ export default class GraphicsMenu extends React.Component<