Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[WIP] Conda package #108

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

Closed
wants to merge 24 commits into from
Closed

[WIP] Conda package #108

wants to merge 24 commits into from

Conversation

jonmmease
Copy link
Contributor

@jonmmease jonmmease commented Aug 2, 2018

Work towards adding a conda build of orca to the CI build.

Discussion: #107
Standalone prototype: https://github.com/jonmmease/orca-feedstock

@jonmmease
Copy link
Contributor Author

jonmmease commented Aug 2, 2018

@etpinard it doesn't look like the Travis build ran (I only see AppVeyor). Is there anything else I need to do?

@etpinard
Copy link
Contributor

etpinard commented Aug 2, 2018

it doesn't look like the Travis build ran (I only see AppVeyor)

Ha. It might only run on branches based off the repo origin, and not on branches based off forks.

I should get an invite giving you write rights to this repo. I think the easier way forward would be for you to pull down this repo, cherry-pick your commits unto a new branch and make a new PR. Sorry for the inconvenience.

@etpinard
Copy link
Contributor

etpinard commented Aug 2, 2018

Actually, pushing another commit to this branch should now do the trick:

image

image

@jonmmease
Copy link
Contributor Author

Cool, I'll give that a try first

@jonmmease
Copy link
Contributor Author

Looks like they're all running now. Thanks!

@jonmmease
Copy link
Contributor Author

@etpinard the conda builds for Circle/Travis/AppVeyor are all working now. Each one successfully performs the conda build and lists the directory where the build artifact is output.

The docker-build-and-push job is failing on "Push Docker image to Quay", which is probably a good thing since I'm not intending up push a new docker image 🙂

All that's left now is to figure out how we want to upload the packages to anaconda cloud. I don't have a good sense of how this part should work. Should the CI jobs do the upload, or should we try to get the built packages out of the CI systems and upload them manually?

Also, someone with some experience with these CI tools should probably take a look at what I did to get things working 🙂

Copy link
Contributor

@etpinard etpinard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the conda builds for Circle/Travis/AppVeyor are all working now.

Fantastic 🎉

The docker-build-and-push job is failing on "Push Docker image to Quay",

That thing should still succeed. We build and push to quay.io a new image for every commit at the moment. Perhaps, it's only intermittent. Perhaps, one needs permissions from quay.io to push from a fork branch?

All that's left now is to figure out how we want to upload the packages to anaconda cloud. I don't have a good sense of how this part should work.

Electron builds are currently uploaded manually to the release page (https://github.com/plotly/orca/releases), so I'd be ok with also manually uploading the conda builds to the conda cloud.

To do so though, we'll need to include the conda builds as CI artifacts so that we can download them:

  • For Circle: this is done through the store_artifacts field. Moving the conda build to a blank directory and listing it under store_artifacts should do the trick. See how's it's done for the Electron builds

orca/.circleci/config.yml

Lines 154 to 158 in 647239b

- run: mkdir artifacts
- run: mv release/*.yml artifacts || true
- run: mv release/orca* artifacts
- store_artifacts:
path: artifacts

  • For Travis: the artifact paths field is here. I'm not sure if it support multiple paths; we might need to mkdir a directory.

  • For AppVeyor: adding another item under

orca/appveyor.yml

Lines 30 to 32 in 647239b

artifacts:
- path: release.zip
name: release

should do the trick.

Moreover, we'll need to document the "push-to-conda-cloud" in our release instructions and mention conda installs in our installation instructions.


Thanks for all your hard work!

@@ -21,6 +21,7 @@ workflows:
requires:
- test-node-v6
- test-node-v8
- conda-build-and-upload
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably only want to run this if test-node-v6 and test-node-v8 succeed. Adding

  requires:
     - test-node-v6
     - test-node-v8

should do the trick

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and we should probably rename this step conda-build as we won't be uploading the builds on CI.

keys:
- v3-npm-

- run: wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably cache this, but conda-build-and-upload runs in under 3 minutes, so I don't see the need 👌

package.json Outdated
@@ -1,6 +1,6 @@
{
"name": "orca",
"version": "1.0.0",
"version": "1.0.1-rc.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you base your branch off master or #103 ? If the former, we should stick to 1.0.0 here.

@@ -0,0 +1,16 @@
{% set data = load_setup_py_data() %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a README.md file in recipe/ briefly explanation the conda-build process.

@jonmmease
Copy link
Contributor Author

@etpinard
Well that took more tries that I thought it would 🙂 The artifact zip files look good for CircleCI and AppVeyor. I don't have access to the Travis artifacts (at least I don't have an AWS account), could you check that one?

I think I also addressed all of your feedback. Let me know if the Travis artifacts need any work, and if there are any other changes you'd like to see before merging this in.

Thanks!

@etpinard
Copy link
Contributor

etpinard commented Aug 2, 2018

I don't have access to the Travis artifacts

Actually, looks like the artifacts didn't get pushed to S3 after your commits, perhaps due to another permissions restriction.

Oh well, I fetched your branch and created https://github.com/plotly/orca/compare/conda-build and all CI builds there (including the docker-build-and-push job on Circle) are ✅

Here's the link to Mac conda build:

https://s3.amazonaws.com/image-exporter-travis-artifacts/plotly/orca/433/433.1/conda-osx-64.zip

if you like to try it out.

The resulting package will be named `plotly-orca-*.tar.bz2`, and the build
command will display the full path of the output location.

How it works
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. I didn't expect this much detail. Thanks for your efforts!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha, sure. Once I got started a bunch of details came to mind that I thought would be useful background for future contributors.

@@ -14,6 +14,17 @@ Follow [@plotlygraphs](https://twitter.com/plotlygraphs) on Twitter for Orca ann

## Installation

### Method 1: conda
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautifully done. Thanks!

@@ -114,6 +114,19 @@ automate this process somehow.
+ Grab the Mac build automatically pushed to [Amazon S3](https://s3.console.aws.amazon.com/s3/buckets/image-exporter-travis-artifacts/plotly/orca/?region=us-east-1&tab=overview) from Travis.
**N.B.** Select the latest build (largest number *note:* the folders are not necessarily sequential) -> release.zip
- Run `npm publish`
- Publish conda packages:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clear. 📚

@jonmmease
Copy link
Contributor Author

Great! And the mac artifact looks good (At least it's got the right stuff in it when I unzip if, I haven't done a test install of the new packages yet).

So perhaps all that's left is tracking down the plotly channel credentials? I can try out the installation on Mac, Linux, and Windows as soon as we publish everything to the plotly channel. But we should probably get some other independent users to give it a try as well.

@etpinard
Copy link
Contributor

etpinard commented Aug 3, 2018

So perhaps all that's left is tracking down the plotly channel credentials?

Yep! Perhaps @chriddyp could help us out for this?

But we should probably get some other independent users to give it a try as well.

Good call 👌

This causes the bash process to become the orca process, which means
that signals will be processed by the orca executable directly.
See http://veithen.github.io/2014/11/16/sigterm-propagation.html

This fixes a problem where it was not possible to kill an orca server
from Python if it was launched through the wrapper script using
subprocess.Popen
@jonmmease jonmmease mentioned this pull request Aug 9, 2018
@jonmmease
Copy link
Contributor Author

Replaced by #113

@jonmmease jonmmease closed this Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants