Skip to content

Commit 72f8551

Browse files
authored
Release v0.2.2 πŸŽ‰ (#331)
* Updated issues template and added PR template (#315) * added github issue template * updated issue template * updated ISSUE_TEMPLATE with friendlier wording and structure * added pr template * added branch notes * Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318) * Updated issues template and added PR template (#315) * added github issue template * updated issue template * updated ISSUE_TEMPLATE with friendlier wording and structure * added pr template * added branch notes * Updated CONTRIBUTING.md with npm run manual-test * Hi! I noticed that the changes made here: #295 have not made their way into the documentation! (#318) (#319) * Updated issues template and added PR template (#315) * added github issue template * updated issue template * updated ISSUE_TEMPLATE with friendlier wording and structure * added pr template * added branch notes * Updated CONTRIBUTING.md with npm run manual-test * Add tests to CharRNN (#307) (#320) * add tests to CharRNN * test(CharRNN): add tests to CharRNN added descriptive tests to ensure CharRNN behaves like its example * remove dist * Updated CONTRIBUTING docs and README (#322) * updated readme specifying versions for lib * added documentation to contributing.md * added updates * added label and confidence as output for yolo results (#316) * added label and confidence as output * updates yolo test to use label instead of className * Increase test timeout (#321) * added label and confidence as output * updates yolo test to use label instead of className * set jasmine.DEFAULT_TIMEOUT_INTERVAL to 60000ms * Merges in #313 via master using deprecating-master branch (#323) * Add tests to CharRNN (#307) * add tests to CharRNN * test(CharRNN): add tests to CharRNN added descriptive tests to ensure CharRNN behaves like its example * remove dist * check preload support for other nets and classifiers (#313) Adds specified nets to support preload // TODO: add examples showing appropriate use of preload * added v0.2.2 to package.json in anticipation of new release * Fixing an issue with prettier and eslint (#324) * Fixing an issue with prettier and eslint There is a conflict between arrow syntax rules in airbnb eslint configuration and the way default prettier works in VSCode. These additional setting should help anyone using VSCode with autoformat + prettier to not run into problems building the library. I am open to better ways of handling this of course! (Note the changes in ImageClassifier are trivial and just testing). * adding eslint-config-prettier as dev dependency * trivial change to run tests again * Adjust charrnn test option length (#326) * changed 500 to 100 to shorted test time * fixed .tobe() to match option * changed vocab size to 64 * changed timeout to 12000 * Adjust charrnn length - comment 2nd test for now (#329) * changed 500 to 100 to shorted test time * fixed .tobe() to match option * changed vocab size to 64 * changed timeout to 12000 * comment out second charRNN test for now to allow merging PRs * Forcing magenta dependency to 0.1.2 (#328) The SketchRNN example doesn't work with more recent magenta (0.1.4) probably due to us lagging behind in versions of tf.js? * SketchRNN creation function should be lowercase (#325) This is related to the discussion in #297. * added v0.2.2 to package.json in anticipation of new release (#330) hooray adding release v0.2.2 * added latest v0.2.2
1 parent b08c3ad commit 72f8551

19 files changed

+311
-98
lines changed

β€Ž.eslintrc.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "airbnb-base",
2+
"extends": ["airbnb-base", "prettier"],
33
"globals": {
44
"fetch": false,
55
"document": true

β€Ž.github/ISSUE_TEMPLATE.mdβ€Ž

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
## Nature of issue?
1+
## β†’ Description πŸ“
22

3-
- [ ] Found a bug
4-
- [ ] Existing feature enhancement
5-
- [ ] New feature request
6-
- [ ] Other
3+
A clear and concise description of what the issue is about. Let us know if you:
74

5+
- found a bug πŸ›
6+
- want to suggest an update πŸ’‘
7+
- have an idea for a new feature πŸ†•
88

9-
***
10-
## Details about the Bug:
11-
> Please describe the bug you've encountered. Make sure to include the following information below.
129

13-
### Web browser and version: (e.g. Firefox version 65, Chrome version 71.0)
1410

15-
### Operating System: (e.g. MacOS, Windows, Ubuntu)
11+
## β†’ Screenshots πŸ–Ό
12+
(Any relevant screenshots, sketches, or helpful concept diagrams)
1613

17-
### Steps to reproduce this bug:
1814

19-
***
20-
## Existing Feature Enhancement details:
21-
> Please describe the feature enhancement you're hoping to see.
15+
## β†’ Helpful Information πŸ¦„
2216

17+
A list of relevant information for this issue. This will help people navigate the project and offer some clues of where to start. Depending on the nature of this issue, important and helpful information might include:
2318

24-
***
25-
26-
## New feature details:
27-
> Please describe the new feature you're hoping to see.
19+
- **Web browser and version** (e.g. Firefox version 65, Chrome version 71.0)
20+
- **Operating System** (e.g. MacOS, Windows, Ubuntu)
21+
- Steps to reproduce the issue
22+
- ml5 version you're using
23+
- Links to example code in the [p5 web editor](https://editor.p5js.org) or other online shareable code editor
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!-- MANY MANY THANKS FOR YOUR CONTRIBUTION. ML5 ❀️S YOU! -->
2+
## β†’ Submit changes to the relevant branch 🌲
3+
4+
We have 2 branches you can submit to, **development** or **release**. You'd make us so happy 😊 if you submitted your pull request to the branch that is most relevant for your submission.
5+
6+
- for pull requests related to **new features** πŸ†• make sure to use the **development** branch
7+
- for pull requests related to bug πŸ›fixes of the existing stable release, make sure your pull request goes to the **release** branch.
8+
9+
10+
## β†’ Description πŸ“
11+
12+
A clear and concise description of what the pull request is about. Let us know if you are:
13+
14+
- fixing a bug πŸ›
15+
- adding an update πŸ› 
16+
- submitting a new feature πŸ†•
17+
18+
## β†’ Screenshots πŸ–Ό
19+
(Any relevant screenshots, sketches, or helpful concept diagrams - these are helpful for our release notes and for getting people excited about your super cool feature and/or fix!)
20+
21+
22+
## β†’ Relevant Example or Paired Pull Request to [ml5-examples](https://github.com/ml5js/ml5-examples) πŸ¦„
23+
24+
In order to help the ml5 team understand your pull request, we ask that you please submit an example to [ml5-examples](https://github.com/ml5js/ml5-examples) showcasing how your integrated feature works. You're also welcome to show how this works by providing code that can be easily run by others.
25+
26+
## β†’ Relevant documentation 🌴
27+
28+
Write a few notes about your pull request. Document any functionality that might be helpful for others who want to run and test your changes. If we don't know how to make use of your contribution, we won't be able t integrate it! πŸ™
29+
30+
31+

β€Ž.gitignoreβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ examples/es6/node_modules
33
experiments/node_modules
44
node_modules
55
**/npm-debug.log
6-
.vscode
76
*.DS_STORE
87
experiments
98
manual-test

β€Ž.vscode/settings.jsonβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"prettier.trailingComma": "all",
3+
"prettier.printWidth": 100,
4+
"prettier.arrowParens": "avoid"
5+
}

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 120 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,122 @@
11
# How to Contribute
2-
3-
This project is still a work in progress, but we encourage everyone to join, propose ideas and help in the development!
2+
> Welcome to the ml5 project! Developing ml5 is not just about developing machine learning software, it is about making machine learning approachable for a broad audience of artists, creative coders, and students. The library provides access to machine learning algorithms and models in the browser, building on top of TensorFlow.js with no other external dependencies. The library is supported by code examples, tutorials, and sample datasets with an emphasis on ethical computing. Bias in data, stereotypical harms, and responsible crowdsourcing are part of the documentation around data collection and usage. We're building **friendly** machine learning for the web - we're glad you're here!
3+
4+
![friendly machine learning for the web](assets/header.png)
5+
6+
## The ml5 ecosystem (last updated: 22, March 2019)
7+
8+
ml5.js is comprised a number of sister repositories which you can find at the [ml5 github organization - github.com/ml5js](https://github.com/ml5js). As a contributor of ml5 you should be aware of the other parallel repositories of the ml5 project.
9+
10+
- **The 3 main repositories you'll likely be working with**:
11+
+ [ml5-library]([https://github.com/ml5js](https://github.com/ml5js/ml5-library))
12+
* this is the main ml5js library. When building the library, all of the files in the `/src` directory get bundled into the `ml5.js` library. Releases to the ml5 library get sent to `npm` and are hosted at https://unpkg.com/ (e.g. `https://unpkg.com/[email protected]/dist/ml5.min.js`)
13+
+ [ml5-examples](https://github.com/ml5js/ml5-examples)
14+
* the ml5-examples repo showcases the functionality of the ml5-library. When submitting new features or updates to the ml5 library, you should also make a pull request to the ml5-examples repo to showcase how your new feature works. Usually examples are submitted in a simple p5.js sketch, but they can also be in vanilla javascript.
15+
+ [ml5-website](https://github.com/ml5js/ml5-website)
16+
* the ml5-website is what you see here: https://ml5js.org/. As we make changes to the ml5 API and examples, the website also needs to be updated. For now, we're working with a manual process to updating changes, but we're working on development processes to help sync all these efforts. For now, make sure to update the ml5-examples and ml5-website when making changes to ml5-library and vice-versa.
17+
- **Data and models**:
18+
+ [ml5-data-and-models](https://github.com/ml5js/ml5-data-and-models)
19+
* This repository stores data sets and pre-trained models you can use in ml5.js.
20+
+ [pix2pix_models](https://github.com/ml5js/pix2pix_models):
21+
* A collection of pix2pix models
22+
+ **Training your own models**:
23+
+ [training-lstm](https://github.com/ml5js/training-lstm)
24+
* Multi-layer Recurrent Neural Networks (LSTM, RNN) for character-level language models in Python using Tensorflow and modified to work with tensorflow.js and ml5js
25+
+ [training-word2vec](https://github.com/ml5js/training-word2vec)
26+
* How to train your own word2vec model for use with ml5.js
27+
+ [training-styletransfer](https://github.com/ml5js/training-styletransfer)
28+
* This repository contains a slightly modified version of Fast Style Transfer in TensorFlow. It trains a neural network on the style of any image you provide it and outputs a model you can use in ml5.js with the ml5.styleTransfer() method.
29+
+ [training-pix2pix](https://github.com/ml5js/training-pix2pix)
30+
* documentation coming soon
31+
32+
## Contributing Workflow
33+
34+
Preamble: If you're interested in to contribute to the ml5 project, just know you can always open an issue to ask questions or flag things that may seem confusing, unclear or intimidating. Our goal is to make ml5 as open and supportive as possible for those who want to be involved. Ok, now that's out of the way, here's how a general workflow for what contributions might look like to ml5.
35+
36+
### For bug fixes
37+
1. you read the CONTRIBUTING.md docs ❀️
38+
2. you take a peek at the [issues](https://github.com/ml5js/ml5-library/issues) and identify one you'd like to address OR you file an issue about a bug you discovered. πŸ›
39+
3. you make a comment on an existing issue or post your issue and indicate that you're curious to do your best to solve it πŸ”¬
40+
4. you create a new branch on your `forked` copy of the ml5-library and call it something meaningful like `fix-detection-results`
41+
5. you jam on fixing the bug, commit your changes with meaningful commit messages, and push your changes to your bug fix branch (e.g. `fix-detection-results`)
42+
6. when ready, make a pull request to the `release` branch or `development` branch of ml5-library. Submit to the `release` branch if the bug you found was in the current ml5 release - the version of ml5 which is on npm. Submit to the `development` branch if the bug you found was in `developmpent` branch of ml5-library.
43+
7. the ml5 dev team will review your changes and quite likely correspond with you on your changes. When all looks good, your changes will be merged in. πŸŽ‰
44+
8. hi-fives πŸ‘ and hugs πŸ€—
45+
46+
### For new features or feature additions/updates
47+
1. you read the CONTRIBUTING.md docs ❀️
48+
2. you take a peek at the [issues](https://github.com/ml5js/ml5-library/issues) and identify one you'd like to address OR you file an issue about the feature you're looking to add or update. πŸ›
49+
3. you make a comment on an existing issue or post your issue and indicate that you're curious to do your best to add this to ml5-library πŸ”¬
50+
4. you create a new branch on your `forked` copy of the ml5-library and call it something meaningful like `new-generative-model-x`
51+
5. you jam on your new feature, commit your changes with meaningful commit messages, and push your changes to your new feature branch (e.g. `new-generative-model-x`)
52+
6. when ready, make a pull request to the `development` branch of ml5-library. Submit to the `development` since your feature is part of the new frontier of the ml5-library. Important is step 7 below.
53+
7. you should also submit a pull request to ml5-examples with an example of your new feature so the ml5 dev team can run your proposed feature and provide feedback.
54+
8. the ml5 dev team will review your changes and quite likely correspond with you on your changes. When all looks good, your changes will be merged in. πŸŽ‰
55+
9. hi-fives πŸ‘ and hugs πŸ€—
56+
57+
**Now that you have a general impression for what this process might look like, you can get started!**
458

559
## Getting Started
660

761
If you want to help develop this library, here are the steps to get started:
862

63+
64+
### Setup
65+
66+
We use node.js as our development environment for bundling code, running tests, and more. If you've never used node.js before, here's the steps to get node up and running on your machine. Installation requirements differ according to your computer's operating system. Please refer to the correct setup section for your specific environment
67+
68+
- [windows]()
69+
- [macOS]()
70+
71+
#### For Windows Users
72+
* Install node.js Version 10: https://nodejs.org/en/download/
73+
74+
#### For macOS Users
75+
76+
For mac users, we recommend installing nodejs through homebrew which is a package manager. Even further, we recommend installing nodejs using nvm which is a node version manager so that you can install different versions of nodejs and switch between them. You can skip all that and use install nodejs - https://nodejs.org/en/download/ - but we do recommend using homebrew, etc.
77+
78+
This is how you can do this:
79+
80+
**Install [homebrew](https://brew.sh/)**
81+
82+
Open up your terminal and paste + enter:
83+
```sh
84+
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
85+
```
86+
87+
Next use homebrew to **install nvm and node** using the `brew` command (ref: https://www.wdiaz.org/how-to-install-nvm-with-homebrew/):
88+
89+
```sh
90+
brew install nvm
91+
mkdir ~/.nvm
92+
nvm install node
93+
nvm install 10.15
94+
nvm use 10
95+
96+
nvm run node --version
97+
```
98+
99+
NOTE: you may need to add the reference to nvm and node into your `bash_profile` in which case you can paste the following into the `~/.bash_profile` or `~/.zshenv` file if you are using ZSH, or in `~/.bashrc` for BASH or `~/.zshrc` for ZSH ref: https://www.wdiaz.org/how-to-install-nvm-with-homebrew/):
100+
101+
```sh
102+
export NVM_DIR="$HOME/.nvm"
103+
NVM_HOMEBREW="/usr/local/opt/nvm/nvm.sh"
104+
[ -s "$NVM_HOMEBREW" ] && \. "$NVM_HOMEBREW"
105+
```
106+
107+
### Developing ml5
108+
9109
1. Fork the repository to your account, and then clone it your computer:
10-
```bash
11-
git clone https://github.com/YOURGITHUBHANDLE/ml5-library.git
12-
```
110+
```bash
111+
git clone https://github.com/YOURGITHUBHANDLE/ml5-library.git
112+
```
13113

14114
2. Install dependencies:
15115

16-
```bash
17-
cd ml5-library
18-
npm install
19-
```
116+
```bash
117+
cd ml5-library
118+
npm install
119+
```
20120

21121
3. This project is developed using [Webpack](https://webpack.js.org/). Webpack is a module bundler that "bundles" different files into one file. This file is usually called a library.
22122

@@ -57,12 +157,20 @@ If you want to help develop this library, here are the steps to get started:
57157
+ 501 hidden modules
58158
webpack: Compiled successfully.
59159
```
60-
160+
![image of terminal window with webpack message](/assets/ml5-webpack-build.png)
161+
![localhost:8080/ml5.js shows compiled library](/assets/ml5-localhost.png)
162+
61163
If you see this message, it means the project is actively being built by Webpack's `webpack-dev-server`. Any changes you make to any file in the `/src` folder will automatically rebuild the `ml5.js` and `ml5.min.js` libraries as long as the server continues to run.
62164
63165
4. Develop!
64166
65-
Create a new folder called `/experiments` in the project's root folder. Create an `index.html` file inside `/experiments` and add the following:
167+
Run this command from the root of the project:
168+
169+
```bash
170+
npm run manual-test
171+
```
172+
173+
This creates a new folder called `/manual-test` in the project's root folder. Create an `index.html` file inside `/manual-test` and add the following:
66174

67175
```html
68176
<!DOCTYPE html>
@@ -127,7 +235,7 @@ If you want to help develop this library, here are the steps to get started:
127235

128236
Just be sure to add files before running commitizen!
129237

130-
7. (OPTIONAL) Push your code and submit a Pull Request!
238+
7. (OPTIONAL) Push your code and submit a Pull Request! Remember if you make a pull request on a new features or feature update you should make a parallel pull request to the ml5-examples repo so that others can use your new feature and test it out.
131239

132240
## Running Unit Tests
133241

β€ŽREADME.mdβ€Ž

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,18 @@ You can find a collection of standalone examples in this repository: [github.com
5656

5757
These examples are meant to serve as an introduction to the library and machine learning concepts.
5858

59+
## Code of Conduct
60+
We believe in a friendly internet and community as much as we do in building friendly machine learning for the web. Please refer to our [CODE OF CONDUCT](CODE_OF_CONDUCT.md) for our rules for interacting with ml5 as a developer, contributor, or user.
61+
5962
## Contributing
63+
Want to be a **contributor πŸ— to the ml5.js library**? If yes and you're interested to submit new features, fix bugs, or help develop the ml5.js ecosystem, please go to our [CONTRIBUTING](CONTRIBUTING.md) documentation to get started.
64+
65+
See [CONTRIBUTING](CONTRIBUTING.md) πŸ› 
66+
67+
## Acknowledgements
68+
69+
ml5.js is supported by the time and dedication of open source developers from all over the world. Funding and support is generously provided by a [Google Education grant](https://edu.google.com/giving/?modal_active=none) via [Dan Shiffman](https://shiffman.net/) at NYU's ITP/IMA program.
70+
71+
Many thanks [BrowserStack](https://www.browserstack.com/) for providing testing support.
6072

61-
See [CONTRIBUTING](CONTRIBUTING.md)
6273

63-
Thanks [BrowserStack](https://www.browserstack.com/) for providing testing support.

β€Žassets/header.pngβ€Ž

296 KB
Loading

β€Žassets/ml5-localhost.pngβ€Ž

668 KB
Loading

β€Žassets/ml5-webpack-build.pngβ€Ž

383 KB
Loading

0 commit comments

Comments
Β (0)