Skip to content

make a single artifact tarball #3941

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

Merged
merged 3 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 10 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ jobs:
conda create -n env --yes python=3.9 conda-build conda-verify
conda install -n env -c conda-forge jupyterlab nodejs=12
conda init bash
mkdir output

- run:
name: initial NPM Build
Expand All @@ -284,12 +285,7 @@ jobs:
conda activate env
cd packages/python/plotly
python setup.py sdist bdist_wheel
mkdir pypi_dist
tar czf pypi_dist/all.tgz dist

- store_artifacts:
path: packages/python/plotly/pypi_dist
destination: pypi_dist
cp -R dist ../../../output/dist

- run:
name: Conda Build
Expand All @@ -298,12 +294,7 @@ jobs:
conda activate env
cd packages/python/plotly
conda build recipe/
mkdir conda_dist
mv /opt/conda/envs/env/conda-bld/noarch/plotly*.tar.bz2 conda_dist

- store_artifacts:
path: packages/python/plotly/conda_dist
destination: conda_dist
mv /opt/conda/envs/env/conda-bld/noarch/plotly*.tar.bz2 ../../../output

- run:
name: NPM Pack
Expand All @@ -312,12 +303,15 @@ jobs:
conda activate env
cd packages/javascript/jupyterlab-plotly
npm pack
mkdir npm_dist
mv jupyterlab-plotly*.tgz npm_dist
mv jupyterlab-plotly*.tgz ../../../output

- run:
name: Zip output
command: |
tar czf output.tgz output

- store_artifacts:
path: packages/javascript/jupyterlab-plotly/npm_dist
destination: npm_dist
path: output.tgz

build-doc:
resource_class: xlarge
Expand Down
16 changes: 6 additions & 10 deletions release.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ Manually update the versions to `X.Y.Z` in the files specified below.

### Download and QA CI Artifacts

The `full_build` job in the `release_build` workflow in CircleCI produces three sets of artifacts. Download all three:

1. `pypi_dist/all.tgz`
2. `conda_dist/plotly-X.Y.Z.tar.bz2`
3. `npm_dist/jupyterlab-plotly-X.Y.Z.tgz`
The `full_build` job in the `release_build` workflow in CircleCI produces a tarball of artifacts `output.tgz` which you should download and decompress, which will give you a directory called `output`. The filenames contained within will contain version numbers.

**Note: if any of the version numbers are not simply `X.Y.Z` but include some kind of git hash, then this is a dirty build and you'll need to clean up whatever is dirtying the tree and follow the instructions above to trigger the build again.** (That said, you can do QA on dirty builds, you just can't publish them.)

Expand All @@ -72,13 +68,13 @@ To locally install the PyPI dist, make sure you have an environment with Jupyter
- `tar xzf all.tgz`
- `pip uninstall plotly`
- `conda uninstall plotly` (just in case!)
- `pip install dist/plotly-X.Y.X-py2.py3-none-any.whl`
- `pip install path/to/output/dist/plotly-X.Y.X-py2.py3-none-any.whl`

To locally install the Conda dist (generally do this in a different, clean environment from the one above!):

- `conda uninstall plotly`
- `pip uninstall plotly` (just in case!)
- `conda install conda_dist/plotly-X.Y.Z.tar.bz2`
- `conda install path/to/output/plotly-X.Y.Z.tar.bz2`

It's more complicated to locally install the NPM bundle, as you'll need to have a JupyterLab 2 environment installed... Undocumented for now :see_no_evil:.

Expand All @@ -94,21 +90,21 @@ you can publish the artifacts. **You will need special credentials from Plotly l

Publishing to PyPI:
```bash
(plotly_dev) $ cd pypi_dist/dist
(plotly_dev) $ cd path/to/output/dist
(plotly_dev) $ twine upload plotly-X.Y.Z*
```

Publishing to NPM:

```bash
(plotly_dev) $ cd npm_dist
(plotly_dev) $ cd path/to/output
(plotly_dev) $ npm publish jupyterlab-plotly-X.Y.Z.tgz
```

Publishing to `plotly` conda channel (make sure you have run `conda install anaconda-client` to get the `anaconda` command):

```
(plotly_dev) $ cd conda_dist
(plotly_dev) $ cd path/to/output
(plotly_dev) $ anaconda upload plotly-X.Y.Z.tar.bz2
```

Expand Down