Skip to content

Commit

Permalink
Release v0.2.2 πŸŽ‰ (#331)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
joeyklee authored Mar 22, 2019
1 parent 7a51432 commit c2d48f0
Show file tree
Hide file tree
Showing 21 changed files with 319 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "airbnb-base",
"extends": ["airbnb-base", "prettier"],
"globals": {
"fetch": false,
"document": true
Expand Down
32 changes: 14 additions & 18 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
## Nature of issue?
## β†’ Description πŸ“

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

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

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

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

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

### Steps to reproduce this bug:

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

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:

***

## New feature details:
> Please describe the new feature you're hoping to see.
- **Web browser and version** (e.g. Firefox version 65, Chrome version 71.0)
- **Operating System** (e.g. MacOS, Windows, Ubuntu)
- Steps to reproduce the issue
- ml5 version you're using
- Links to example code in the [p5 web editor](https://editor.p5js.org) or other online shareable code editor
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- MANY MANY THANKS FOR YOUR CONTRIBUTION. ML5 ❀️S YOU! -->
## β†’ Submit changes to the relevant branch 🌲

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.

- for pull requests related to **new features** πŸ†• make sure to use the **development** branch
- for pull requests related to bug πŸ›fixes of the existing stable release, make sure your pull request goes to the **release** branch.


## β†’ Description πŸ“

A clear and concise description of what the pull request is about. Let us know if you are:

- fixing a bug πŸ›
- adding an update πŸ› 
- submitting a new feature πŸ†•

## β†’ Screenshots πŸ–Ό
(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!)


## β†’ Relevant Example or Paired Pull Request to [ml5-examples](https://github.com/ml5js/ml5-examples) πŸ¦„

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.

## β†’ Relevant documentation 🌴

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! πŸ™



1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ examples/es6/node_modules
experiments/node_modules
node_modules
**/npm-debug.log
.vscode
*.DS_STORE
experiments
manual-test
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"prettier.trailingComma": "all",
"prettier.printWidth": 100,
"prettier.arrowParens": "avoid"
}
132 changes: 120 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,122 @@
# How to Contribute

This project is still a work in progress, but we encourage everyone to join, propose ideas and help in the development!
> 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!
![friendly machine learning for the web](assets/header.png)

## The ml5 ecosystem (last updated: 22, March 2019)

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.

- **The 3 main repositories you'll likely be working with**:
+ [ml5-library]([https://github.com/ml5js](https://github.com/ml5js/ml5-library))
* 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`)
+ [ml5-examples](https://github.com/ml5js/ml5-examples)
* 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.
+ [ml5-website](https://github.com/ml5js/ml5-website)
* 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.
- **Data and models**:
+ [ml5-data-and-models](https://github.com/ml5js/ml5-data-and-models)
* This repository stores data sets and pre-trained models you can use in ml5.js.
+ [pix2pix_models](https://github.com/ml5js/pix2pix_models):
* A collection of pix2pix models
+ **Training your own models**:
+ [training-lstm](https://github.com/ml5js/training-lstm)
* 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
+ [training-word2vec](https://github.com/ml5js/training-word2vec)
* How to train your own word2vec model for use with ml5.js
+ [training-styletransfer](https://github.com/ml5js/training-styletransfer)
* 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.
+ [training-pix2pix](https://github.com/ml5js/training-pix2pix)
* documentation coming soon

## Contributing Workflow

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.

### For bug fixes
1. you read the CONTRIBUTING.md docs ❀️
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. πŸ›
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 πŸ”¬
4. you create a new branch on your `forked` copy of the ml5-library and call it something meaningful like `fix-detection-results`
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`)
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.
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. πŸŽ‰
8. hi-fives πŸ‘ and hugs πŸ€—

### For new features or feature additions/updates
1. you read the CONTRIBUTING.md docs ❀️
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. πŸ›
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 πŸ”¬
4. you create a new branch on your `forked` copy of the ml5-library and call it something meaningful like `new-generative-model-x`
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`)
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.
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.
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. πŸŽ‰
9. hi-fives πŸ‘ and hugs πŸ€—

**Now that you have a general impression for what this process might look like, you can get started!**

## Getting Started

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


### Setup

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

- [windows]()
- [macOS]()

#### For Windows Users
* Install node.js Version 10: https://nodejs.org/en/download/

#### For macOS Users

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.

This is how you can do this:

**Install [homebrew](https://brew.sh/)**

Open up your terminal and paste + enter:
```sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```

Next use homebrew to **install nvm and node** using the `brew` command (ref: https://www.wdiaz.org/how-to-install-nvm-with-homebrew/):

```sh
brew install nvm
mkdir ~/.nvm
nvm install node
nvm install 10.15
nvm use 10

nvm run node --version
```

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/):

```sh
export NVM_DIR="$HOME/.nvm"
NVM_HOMEBREW="/usr/local/opt/nvm/nvm.sh"
[ -s "$NVM_HOMEBREW" ] && \. "$NVM_HOMEBREW"
```

### Developing ml5

1. Fork the repository to your account, and then clone it your computer:
```bash
git clone https://github.com/YOURGITHUBHANDLE/ml5-library.git
```
```bash
git clone https://github.com/YOURGITHUBHANDLE/ml5-library.git
```

2. Install dependencies:

```bash
cd ml5-library
npm install
```
```bash
cd ml5-library
npm install
```

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.

Expand Down Expand Up @@ -57,12 +157,20 @@ If you want to help develop this library, here are the steps to get started:
+ 501 hidden modules
webpack: Compiled successfully.
```

![image of terminal window with webpack message](/assets/ml5-webpack-build.png)
![localhost:8080/ml5.js shows compiled library](/assets/ml5-localhost.png)

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.
4. Develop!
Create a new folder called `/experiments` in the project's root folder. Create an `index.html` file inside `/experiments` and add the following:
Run this command from the root of the project:
```bash
npm run manual-test
```
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:

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

Just be sure to add files before running commitizen!

7. (OPTIONAL) Push your code and submit a Pull Request!
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.

## Running Unit Tests

Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,18 @@ You can find a collection of standalone examples in this repository: [github.com

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

## Code of Conduct
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.

## Contributing
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.

See [CONTRIBUTING](CONTRIBUTING.md) πŸ› 

## Acknowledgements

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.

Many thanks [BrowserStack](https://www.browserstack.com/) for providing testing support.

See [CONTRIBUTING](CONTRIBUTING.md)

Thanks [BrowserStack](https://www.browserstack.com/) for providing testing support.
Binary file added assets/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ml5-localhost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/ml5-webpack-build.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c2d48f0

Please sign in to comment.