Skip to content

Commit 6ae0837

Browse files
authored
Convert conda packages back noarch format (#1453)
* Convert conda packaging to noarch format and update release instructions * Run dev_build on all branches
1 parent 2718db3 commit 6ae0837

File tree

4 files changed

+64
-149
lines changed

4 files changed

+64
-149
lines changed

Diff for: .circleci/config.yml

+1-62
Original file line numberDiff line numberDiff line change
@@ -437,16 +437,10 @@ workflows:
437437
version: 2
438438
dev_build:
439439
jobs:
440-
- plotlyjs_dev_build:
441-
filters:
442-
branches:
443-
only:
444-
- master
445-
- bleeding_edge
440+
- plotlyjs_dev_build
446441

447442
build:
448443
jobs:
449-
450444
- python-2.7-core
451445
- python-3.4-core
452446
- python-3.5-core
@@ -465,58 +459,3 @@ workflows:
465459
- python-3-5-orca
466460
- python-3-7-orca
467461

468-
- python-2-7-conda:
469-
requires:
470-
- python-2.7-core
471-
- python-2.7-optional
472-
- python-2.7-plot_ly
473-
- python-2-7-orca
474-
475-
filters:
476-
branches:
477-
only:
478-
- master
479-
- /release_.*/
480-
- /conda_build_.*/
481-
482-
- python-3-5-conda:
483-
requires:
484-
- python-3.5-core
485-
- python-3.5-optional
486-
# - python-3.5-plot_ly
487-
- python-3-5-orca
488-
489-
filters:
490-
branches:
491-
only:
492-
- master
493-
- /release_.*/
494-
- /conda_build_.*/
495-
496-
- python-3-6-conda:
497-
requires:
498-
- python-3.6-core
499-
- python-3.6-optional
500-
# - python-3.6-plot_ly
501-
# - python-3-6-orca
502-
503-
filters:
504-
branches:
505-
only:
506-
- master
507-
- /release_.*/
508-
- /conda_build_.*/
509-
510-
- python-3-7-conda:
511-
requires:
512-
- python-3.7-core
513-
# - python-3.7-optional
514-
- python-3.7-plot_ly
515-
- python-3-7-orca
516-
517-
filters:
518-
branches:
519-
only:
520-
- master
521-
- /release_.*/
522-
- /conda_build_.*/

Diff for: .circleci/create_conda_packages.sh

-19
This file was deleted.

Diff for: contributing.md

+61-67
Original file line numberDiff line numberDiff line change
@@ -230,27 +230,6 @@ After all of the functionality for the release has been merged into master,
230230
create a branch named `release_X.Y.Z`. This branch will become the
231231
final version
232232

233-
#### Bump to release candidate version
234-
Next increment the version of `plotly.py` to `X.Y.Zrc1`, and the version of
235-
`plotlywidget` to `A.B.C-rc.1`. In both cases `rc` is the semantic versioning
236-
code for Release Candidate. The number 1 means that this is the first release
237-
candidate, this number can be incremented if we need to publish multiple
238-
release candidates. Note that the `npm` suffix is `-rc.1` and the PyPI
239-
suffix is `rc1`.
240-
241-
- `plotly/version.py`:
242-
+ Update `__version__` to `X.Y.Zrc1`
243-
+ Update `__frontend_version__` to `^A.B.C-rc.1` (Note the `^` prefix)
244-
- `js/package.json`
245-
+ Update `"version"` to `A.B.C-rc.1`
246-
247-
Publishing `plotly.py` and `plotlywidget` as release candidates
248-
allows us to go through the publication process, and test that the
249-
installed packages work properly before general users will get them by
250-
default. It also gives us the opportunity to ask specific users to test
251-
that their bug reports are in fact resolved before we pull the trigger
252-
on the official release.
253-
254233
#### Finalize changelog
255234
Review the contents of `CHANGELOG.md`. We try to follow the
256235
[keepachangelog](https://keepachangelog.com/en/1.0.0/) guidelines. Make sure
@@ -278,14 +257,46 @@ of the dependencies. Use the release candidate versions, this way we can point
278257
people to the README of the `release_X.Y.Z` as the instructions for trying out
279258
the release candidate.
280259

260+
Note that the conda installation instructions must include
261+
"-c plotly/lable/test" rather than "-c plotly" in order to install the
262+
release candidate version.
263+
264+
Commit Changelog and README updates.
265+
266+
#### Bump to release candidate version
267+
1) Manually update the plotlywidget version to `A.B.C-rc.1` in the files
268+
specified below.
269+
270+
- `plotly/_widget_version.py`:
271+
+ Update `__frontend_version__` to `^A.B.C-rc.1` (Note the `^` prefix)
272+
- `js/package.json`
273+
+ Update `"version"` to `A.B.C-rc.1`
274+
275+
2) Commit the changes
276+
277+
3) Tag this commit on the release branch as `vX.Y.Zrc1` and `widget-vA.B.C-rc.1`
278+
279+
In both cases `rc` is the semantic versioning code for Release Candidate.
280+
281+
The number 1 means that this is the first release candidate, this number can
282+
be incremented if we need to publish multiple release candidates.
283+
Note that the `npm` suffix is `-rc.1` and the PyPI suffix is `rc1`.
284+
285+
Publishing `plotly.py` and `plotlywidget` as release candidates
286+
allows us to go through the publication process, and test that the
287+
installed packages work properly before general users will get them by
288+
default. It also gives us the opportunity to ask specific users to test
289+
that their bug reports are in fact resolved before we pull the trigger
290+
on the official release.
291+
281292
#### Publish release candidate to PyPI
282293
To upload to PyPI you'll also need to have `twine` installed:
283294
```bash
284295
(plotly.py) $ pip install twine
285296
```
286297

287298
And, you'll need the credentials file `~/.pypirc`. Request access from
288-
@theengineear and @chriddyp. Then, from inside the repository:
299+
@jonmmease and @chriddyp. Then, from inside the repository:
289300

290301
```bash
291302
(plotly.py) $ git checkout release_X.Y.Z
@@ -306,36 +317,13 @@ The `--tag next` part ensures that users won't install this version unless
306317
they explicitly ask for the version or for the version wtih the `next` tag.
307318

308319
#### Publish release candidate to plotly anaconda channel
309-
Conda packages are built automatically on circleci for each push where all
310-
tests pass on `master` and `release_` branches.
311-
312-
Conda packages for Python X.Y are included as "artifacts" of the circleci
313-
job named `python-X-Y-conda`.
314-
315-
First download the artifacts for each Python version:
316-
- Click the "Details" button next to check named " ci/circleci: python-X-Y-conda". This will take you to the circleci dashboard for that job.
317-
- Click on the "Artifacts" tab, and expend the directory tree to root/project/artifacts/conda_packages_X.Y.zip.
318-
- Click to download this zip file.
319-
320-
Then unzip all of the artifact zip files into the same directory. You should
321-
end up with a directory structure like
322-
- /path/to/packages
323-
- conda_packages_2_7
324-
- win-64
325-
- plotly-X.Y.Z-py27_0.tar.bz2
326-
- win-32
327-
- plotly-X.Y.Z-py27_0.tar.bz2
328-
- linux-64
329-
- plotly-X.Y.Z-py27_0.tar.bz2
330-
- ...
331-
- conda_packages_3_5
332-
- win-64
333-
- plotly-X.Y.Z-py35_0.tar.bz2
334-
- ...
335-
- conda_packages_3_6
336-
- ...
337-
- conda_packages_3_7
338-
- ...
320+
To publish package to the plotly anaconda channel you'll need to have the
321+
anaconda or miniconda distribution installed, and you'll need to have the
322+
`anaconda-client` package installed.
323+
324+
```bash
325+
(plotly.py) $ conda build recipe/
326+
```
339327

340328
Next run `anaconda login` and enter the credentials for the plotly anaconda
341329
channel.
@@ -345,20 +333,15 @@ label will ensure that people will only download the release candidate version
345333
if they explicitly request it.
346334

347335
```
348-
$ anaconda upload --label test /path/to/packages/conda_packages_*/*/plotly-*.tar.bz2
336+
$ anaconda upload --label test /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
349337
```
350338

351339
Then logout with `anaconda logout`
352340

353341
#### Manually test the release candidate
354342
Create a fresh virtual environment (or conda environment) and install
355-
the release candidate by following the new `README.md` instructions,
356-
replacing `X.Y.Z` with `X.Y.Zrc1` and `A.B.C` with `A.B.C-rc.1`.
357-
358-
In particular
359-
- `pip install plotly==X.Y.Z` -> `pip install plotly==X.Y.Zrc1`
360-
- `jupyter labextension install [email protected]` ->
361-
`jupyter labextension install [email protected]`
343+
the release candidate by following the new `README.md` instructions
344+
(the instructions updated above to include the release candidate versions)
362345

363346
Run through the example notebooks at
364347
https://github.com/jonmmease/plotly_ipywidget_notebooks using the classic
@@ -372,29 +355,42 @@ If problems are found in the release candidate, fix them on the release
372355
branch and then publish another release candidate with the candidate number
373356
incremented.
374357

358+
#### Finalize CHANGELOG and README
359+
Update CHANGELOG with release date and update README with final versions.
360+
361+
In the conda installation instructions, be sure to change the
362+
"-c plotly/lable/test" argument to "-c plotly"
363+
364+
Commit updates.
365+
375366
#### Finalize versions
376367
When no problems are identified in the release candidate, remove the
377368
release candidate suffix from the following version strings:
378-
379-
- `plotly/version.py`:
380-
+ Update `__version__` to `X.Y.Z`
369+
370+
- `plotly/_widget_version.py`:
381371
+ Update `__frontend_version__` to `^A.B.C` (Note the `^` prefix)
382372
- `js/package.json`
383373
+ Update `"version"` to `A.B.C`
374+
375+
Commit and push to the release branch.
384376

385377
#### Merge release into master
386378
Make sure the integration tests are passing on the release branch, then merge
387379
it into master on GitHub.
388380

389381
Make sure tests also pass on master, then update your local master,
390-
tag this merge commit as `vX.Y.Z` (e.g. `v3.1.1`), and push the tag.
382+
tag this merge commit as `vX.Y.Z` (e.g. `v3.1.1`) and `widget-vA.B.C`
383+
384+
push the tag.
391385

392386
```bash
393387
(plotly.py) $ git checkout master
394388
(plotly.py) $ git stash
395389
(plotly.py) $ git pull origin master
396390
(plotly.py) $ git tag vX.Y.Z
397391
(plotly.py) $ git push origin vX.Y.Z
392+
(plotly.py) $ git tag widget-vA.B.C
393+
(plotly.py) $ git push origin widget-vA.B.C
398394
```
399395

400396
#### Publishing to Pip
@@ -427,12 +423,10 @@ npm publish --access public
427423
Follow the anaconda upload instructions as described for the release candidate
428424
above, except:
429425

430-
- Download the package artifacts from the circleci jobs that ran against
431-
master.
432426
- Do not include the `--label test` argument when uploading
433427

434428
```
435-
$ anaconda upload /path/to/packages/conda_packages_*/*/plotly-*.tar.bz2
429+
$ anaconda upload /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
436430
```
437431

438432
#### Add GitHub Release entry

Diff for: recipe/meta.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ source:
1111
build:
1212
number: 0
1313
script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -q"
14+
noarch: python
1415

1516
requirements:
1617
build:
@@ -47,4 +48,4 @@ about:
4748

4849
extra:
4950
recipe-maintainers:
50-
- jonmmease
51+
- jonmmease

0 commit comments

Comments
 (0)