Skip to content

Commit

Permalink
Publish update (#140)
Browse files Browse the repository at this point in the history
* Testing the publish step alone.

* Changing the circleci image to use the node:stretch-browser version and match the image used for testing.

* Updated version to test publish

* Made it so publish is only done when merged to master

* Modified circleci config to have conda_upload as part of publish job. Also updated the README for steps on publishing vcdat.

* Fixed minor issue with config.

* Added possiblility to upload to conda without commiting to master.

* Temporary test to check publish job on circleci

* Updated the version number so that it will be the latest. Publish tests passed.

* Updated the vcdat introductory tutorial to include the colormap dropdown.

* Updated the jupyter-vcdat intro tutorial and fixed issue with overlay and plot to sidecar tutorial elements missing.
  • Loading branch information
downiec committed Oct 5, 2019
1 parent d6b3ef3 commit 391e6f0
Show file tree
Hide file tree
Showing 9 changed files with 119 additions and 80 deletions.
3 changes: 0 additions & 3 deletions .circleci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
22 changes: 11 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
version: 2

aliases:
- &setup_jupyter_vcdat
name: setup_jupyter_vcdat
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down
39 changes: 36 additions & 3 deletions kube/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,43 @@
## 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
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-version> 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:

Expand All @@ -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
Expand All @@ -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:<new version>
docker image tag cdat/vcdat:<new version> cdat/vcdat:latest
docker push cdat/vcdat:latest
```
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/components/ColormapEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class ColormapEditor extends React.Component<
toggle={this.toggleDropdown}
>
<DropdownToggle
className={"graphics-dropdown-vcdat"}
className={/*@tag<colormap-dropdown>*/ "colormap-dropdown-vcdat"}
disabled={!this.props.plotReady}
caret={true}
>
Expand All @@ -80,7 +80,9 @@ export default class ColormapEditor extends React.Component<
};
return (
<DropdownItem
className={"graphics-dropdown-item-vcdat"}
className={
/*@tag<colormap-dropdown-item>*/ "colormap-dropdown-item-vcdat"
}
onClick={selectCM}
key={cmName}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/GraphicsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export default class GraphicsMenu extends React.Component<
</Button>
<Button
className={
/*@tag<float-right graphics-copy-btn>*/ "float-left graphics-copy-btn-vcdat"
/*@tag<float-right graphics-copy-btn>*/ "float-right graphics-copy-btn-vcdat"
}
style={{ marginLeft: "0.5em" }}
hidden={
Expand Down
37 changes: 23 additions & 14 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,26 @@ export const GETTING_STARTED: Step[] = [
target: ".vcsmenu-clear-btn-vcdat",
title: "Clear"
},
{
content: `Use this button to load variables from a data file. You can subset
the variables so not all of the data is loaded. For example, you can constrain
the latitude and longitude so data from a specific area is loaded instead of
the whole dataset.`,
disableCloseOnEsc: true,
hideCloseButton: true,
placement: "right",
target: ".varmenu-load-variables-btn-vcdat",
title: "Load Variable"
},
{
content: `When the overlay mode is on, new plots will overlap previous plots.
This allows you to plot isolines on top of a map created using the isofill
graphic method, for example.`,
disableCloseOnEsc: true,
hideCloseButton: true,
placement: "right",
target: `#left-sidebar > div > div.card > div > div
> div:nth-child(2) > div > div`,
target: `#left-sidebar > div > div:nth-child(3) > div > div >
div.clearfix.card-subtitle > div:nth-child(1)`,
title: "Overlay Mode"
},
{
Expand All @@ -313,29 +324,27 @@ export const GETTING_STARTED: Step[] = [
disableCloseOnEsc: true,
hideCloseButton: true,
placement: "right",
target: `#left-sidebar > div > div.card > div > div
> div:nth-child(2) > div:nth-child(2) > div`,
target: `#left-sidebar > div > div:nth-child(3) > div > div >
div.clearfix.card-subtitle > div:nth-child(2)`,
title: "Plot to Sidecar"
},
{
content: `Use this button to load variables from a data file. You can subset
the variables so not all of the data is loaded. For example, you can constrain
the latitude and longitude so data from a specific area is loaded instead of
the whole dataset.`,
content: `Use this dropdown to choose the type of plot you'd like,
for example: boxfill, isofill, isoline, etc.`,
disableCloseOnEsc: true,
hideCloseButton: true,
placement: "right",
target: ".varmenu-load-variables-btn-vcdat",
title: "Load Variable"
target: ".graphics-dropdown-vcdat",
title: "Plot Type Dropdown"
},
{
content: `Use this graphics dropdown to choose the type of plot you'd like,
for example, boxfill, isofill, isoline, etc.`,
content: `Use the colormap dropdown to choose the colormap you'd like to use,
for example: blends, categorical, classic, etc.`,
disableCloseOnEsc: true,
hideCloseButton: true,
placement: "right",
target: ".graphics-dropdown-vcdat",
title: "Graphics Options"
target: ".colormap-dropdown-vcdat",
title: "Colormap Dropdown"
},
{
content: `Use this button to change the way the plot looks on the "page".
Expand Down
7 changes: 1 addition & 6 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@ import {

// Project Components
import "../style/css/index.css";
import {
EXTENSIONS,
GETTING_STARTED,
REPLACEMENT_STEPS,
VCDAT_VERSION
} from "./constants";
import { EXTENSIONS, GETTING_STARTED, REPLACEMENT_STEPS } from "./constants";
import NCViewerWidget from "./NCViewerWidget";
import NotebookUtilities from "./NotebookUtilities";
import LeftSideBarWidget from "./LeftSideBarWidget";
Expand Down
33 changes: 18 additions & 15 deletions tests/component_tags.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Tag in: src/components/AboutVCDAT.tsx
Line 103, Col 22: "about-vcdat-modal" --> "about-vcdat-modal-vcdat"
Line 134, Col 19: "float-right about-modal-btn" --> "float-right about-modal-btn-vcdat"
Tag in: src/components/ColormapEditor.tsx
Line 67, Col 24: "colormap-dropdown" --> "colormap-dropdown-vcdat"
Line 83, Col 30: "colormap-dropdown-item" --> "colormap-dropdown-item-vcdat"
Tag in: src/components/DimensionSlider.tsx
Line 172, Col 23: "dimension-slider" --> "dimension-slider-vcdat"
Line 198, Col 32: "slider-handles" --> "slider-handles-vcdat"
Expand All @@ -19,15 +22,17 @@ Tag in: src/components/ExportPlotModal.tsx
Line 331, Col 26: "export-format-btn" --> "export-format-btn-vcdat"
Line 357, Col 26: "export-unit-btn" --> "export-unit-btn-vcdat"
Tag in: src/components/GraphicsMenu.tsx
Line 181, Col 32: "graphics-menu" --> "graphics-menu-vcdat"
Line 192, Col 21: "graphics-dropdown" --> "graphics-dropdown-vcdat"
Line 221, Col 29: "graphics-dropdown-item" --> "graphics-dropdown-item-vcdat"
Line 233, Col 27: "graphics-dropdown-item" --> "graphics-dropdown-item-vcdat"
Line 246, Col 19: "float-left graphics-close-btn" --> "float-left graphics-close-btn-vcdat"
Line 257, Col 19: "float-right graphics-copy-btn" --> "float-right graphics-copy-btn-vcdat"
Line 273, Col 19: "float-right graphics-cancel-btn" --> "float-right graphics-cancel-btn-vcdat"
Line 288, Col 19: "float-left graphics-name-input" --> "float-left graphics-name-input-vcdat"
Line 297, Col 21: "float-right graphics-enter-btn" --> "float-right graphics-enter-btn-vcdat"
Line 191, Col 32: "graphics-menu" --> "graphics-menu-vcdat"
Line 197, Col 19: "vcsmenu-overlay-mode-switch" --> "vcsmenu-overlay-mode-switch-vcdat"
Line 209, Col 19: "vcsmenu-sidecar-switch" --> "vcsmenu-sidecar-switch-vcdat"
Line 225, Col 21: "graphics-dropdown" --> "graphics-dropdown-vcdat"
Line 254, Col 29: "graphics-dropdown-item" --> "graphics-dropdown-item-vcdat"
Line 266, Col 27: "graphics-dropdown-item" --> "graphics-dropdown-item-vcdat"
Line 279, Col 19: "float-left graphics-close-btn" --> "float-left graphics-close-btn-vcdat"
Line 290, Col 19: "float-right graphics-copy-btn" --> "float-right graphics-copy-btn-vcdat"
Line 307, Col 19: "float-right graphics-cancel-btn" --> "float-right graphics-cancel-btn-vcdat"
Line 326, Col 19: "float-left graphics-name-input" --> "float-left graphics-name-input-vcdat"
Line 335, Col 21: "float-right graphics-enter-btn" --> "float-right graphics-enter-btn-vcdat"
No tags found in: src/components/PlotMenu.tsx
Tag in: src/components/PopUpModal.tsx
Line 45, Col 31: "popup-modal" --> "popup-modal-vcdat"
Expand All @@ -38,12 +43,10 @@ Tag in: src/components/TemplateMenu.tsx
Line 118, Col 29: "template-item" --> "template-item-vcdat"
No tags found in: src/components/Tracks.tsx
Tag in: src/components/VCSMenu.tsx
Line 434, Col 32: "vcsmenu-main" --> "vcsmenu-main-vcdat"
Line 440, Col 23: "vcsmenu-plot-btn" --> "vcsmenu-plot-btn-vcdat"
Line 455, Col 23: "vcsmenu-export-btn" --> "vcsmenu-export-btn-vcdat"
Line 470, Col 23: "vcsmenu-clear-btn" --> "vcsmenu-clear-btn-vcdat"
Line 488, Col 23: "vcsmenu-overlay-mode-switch" --> "vcsmenu-overlay-mode-switch-vcdat"
Line 501, Col 23: "vcsmenu-sidecar-switch" --> "vcsmenu-sidecar-switch-vcdat"
Line 515, Col 32: "vcsmenu-main" --> "vcsmenu-main-vcdat"
Line 521, Col 23: "vcsmenu-plot-btn" --> "vcsmenu-plot-btn-vcdat"
Line 536, Col 23: "vcsmenu-export-btn" --> "vcsmenu-export-btn-vcdat"
Line 551, Col 23: "vcsmenu-clear-btn" --> "vcsmenu-clear-btn-vcdat"
Tag in: src/components/VarCard.tsx
Line 164, Col 33: "varcard-main" --> "varcard-main-vcdat"
Line 168, Col 25: "varcard-name-btn" --> "varcard-name-btn-vcdat"
Expand Down

0 comments on commit 391e6f0

Please sign in to comment.