-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update the ml5.js example upload script to pull examples from ml5-library@main #1762
Update the ml5.js example upload script to pull examples from ml5-library@main #1762
Conversation
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. |
Release Environmentsp5.js-web-editor |
I noticed that on some runs of this, I get a connection failure while trying to save the files.
It seems to be associated with a failure in the docker
It looks like these are due to me not having set up an AWS S3 instance, though I am curious to understand why some runs fail and some don't. I'm going to take a look to understand the cases where this happens, but it looks like:
Should I go ahead and make an S3 bucket to sufficiently test this? |
Thank you for working on this, @Bomani! I know the workflow is not 100% ideal right now and I hope to make it so ml5 can manage this script separately soon 😄 I tested this myself locally, and it is working for me. My instinct with the s3 error is that sometimes the web editor server is crashing from running some code that needs access to the s3 bucket. Maybe this happens when you're trying something out in the UI, as I don't think any of the code related to this PR would use anything that relies on the S3 configuration. |
Oh I lied! I was able to reproduce the error you're talking about. Will get more details. |
Think I figured it out! See #1764. |
I just merged in the latest develop to this PR—try pulling and see if you still see the same issue! |
Thanks @catarak for your quick analysis and fix here! I've pulled the changes and after about 8 consecutive runs in my local Docker environment, I'm not seeing the aforementioned issue. I think the fix is good! |
okay yay! |
Fixes ml5js/ml5-library#1002 from the ml5.js repository.
I have verified that this pull request:
npm run lint
)develop
branch. (If I was asked to make more changes, I have made sure to rebase ontodevelop
then too)Fixes #123
Context
In ml5js/ml5-library#831, I moved all of our examples from the ml5-examples repo to ml5-library, and then archived ml5-examples. After making this change, we broke our script on the p5js web editor server, which looks for the examples only in the ml5-examples repo.
Changes
This PR updates the script to pull from the
/examples
directory in the ml5-library repo, instead of from ml5-examples.Test Plan
UI_ACCESS_TOKEN_ENABLED=true
ml5
on your local p5.js Web Editor instance.EDITOR_API_URL=http://localhost:8000/api/v1
EDITOR_API_ACCESS_TOKEN=<INSERT API TOKEN YOU GENERATED FOR THE ML5 ACCOUNT>
GITHUB_ID=<INSERT YOUR GITHUB OAUTH KEY>
GITHUB_SECRET=<INSERT YOUR GITHUB OAUTH SECRET>
npm run fetch-examples-ml5