-
Notifications
You must be signed in to change notification settings - Fork 903
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
[devOps] Move examples from ml5-example into the core ml5-library repo #809
Comments
Tagging @yining1023 who might also have some thoughts since she has also worked extensively on the library! |
Hi @bomanimc! My two cents: Re: Cons
Re: Pros
|
I would love to get more feedback cc @shiffman @yining1023, but in the meantime, I'll put together a PR for this change so that folks can get a sense of the change! What I'm also interested in exploring is if the examples could be a submodule inside of this repo and later imported into the ml5-website repo so that all of the frontend styling/templating for the examples page https://ml5js.github.io/ml5-examples/public/ and the hosting can be handled in that repo (rather than having those pages and the deployment process live here. I'm not sure yet if this is actually an optimal approach, so I'll consider in a separate issue after we make a decision on this one. |
Hey @bomanimc and all, thank you so much for this comprehensive and thoughtful discussion! I think your plan of consolidation sounds like a good one and I am in full support! Before we had the examples all running in the web editor, the My knowledge and experience with git submodules may be out of date, but the last time I used them with a project (at least 2-3 years ago), it created a lot of roadblocks for contributions as the commands to run to properly maintain and update a submodule are tricky and not well known. So it might be simpler to just include the examples directly in An important priority from my point of view is ease of people finding the examples on the website and being able to run them in the web editor (and keeping the web editor up to date). So I would go with whatever solution makes building the library, website, and pushing examples to the web editor easiest! Hope this helps a bit! Yay! |
Put up a PR with the proposed changes: #831! While I was doing it, I recognized that I still have one major concern about the direction this change would take the library. My primary concern is the separation of the code for the examples and the website code. Assuming that the examples remain quite simple, this isn't a major problem. But in a future where the experience we want to provide through the examples becomes more complex, it might take more and more non-library-code to further development of the library, which could continue to bloat the repo size. Say, for example, we wanted to add some more complicated UI components to the examples pages, we might want to include React and some other libraries. I'm also thinking about cases where we might want to make the design of the examples site more consistent with the main website. I figure that it'd probably be good to think about this issue before landing #831 and archiving the examples repository. A solution to some of the issues here could be to create separate libraries that would include shared resources that we want to keep in sync across the main site and the examples site (for example, an NPM module for a ml5 design system and component library, etc). All that said, I'm not sure if/when we'll ever reach a point where the examples will be complex enough to make this a major concern. @yining1023 or @AndreasRef, maybe you two have thoughts on this! Please let me know what y'all think! |
Hey @bomanimc and all :-) For the work I am doing in my fellowship with creating more examples I don't think it will be a concern: The examples will be all pretty simple. I will use no external UI components or other libraries. Only exception will perhaps be one or two examples that include libraries listed on https://p5js.org/libraries/ |
Thanks @AndreasRef! Also listing some of the steps that we'd want to take should we decide to move forward with this plan: On the ml5-examples repository:
For step 1, I'd love to get feedback on if this is necessary and the best way to communicate with the community! Please let me know if there's anything I'm overlooking here! |
Done! The ml5-examples is now archived and the ml5-library now contains the examples folder. There are still more changes needed to get the development workflow here to be as smooth as possible, but hopefully this will be a step in the process. Thanks for all of your help so far! |
Dear ml5 community,
I'm submitting a new issue. Please see the details below.
β Step 1: Describe the issue π
Suggesting an idea. Please let me know your thoughts! Feel free to tag anyone that you'd like to make sure sees this.
β Step 2: Screenshots or Relevant Documentation πΌ
Context:
I'm in the process of thinking about ways to simplify the devops process for the ml5 library, working with @joeyklee! Part of the process of getting to a simpler devops process is simplifying the development workflow overall. I think that consolidating these two repos may be a step towards a simpler development workflow.
There are few challenges with the current separation of repos:
Proposed Approach:
examples/
. Inside of it, place the examples for each of the models inside, accounting for the pure JS and p5 versions of the examples (i.e.ml5-library/examples/p5js/FeatureExtractor/FeatureExtractor_Image_Classification/
).ml5-library/src/UNET/examples/p5js/
and we could update the build system to collate only these directories into an examples distribution folder.dist_examples/
folder.dist/
folder to reference the local development copy of the ml5-library to make it easier to do manual testing with the examples. See thread here for ideas.I'll be submitting a few PRs to switch our examples away from referencing a specific version of the ml5 library via UNPKG, but if we want to continue to support specific version numbers in imports we could:
dist_examples/
folder which contains the processed examples code. Edit the build process to use the version of the core ml5-library specified in the package.json file (e.g. 0.4.3) to replace the HTML template parameters in the template HTML files.Pros:
Cons:
The text was updated successfully, but these errors were encountered: