{"action":"created","comment":{"url":"https://api.github.com/repos/plotly/dash-core-components/pulls/comments/218498826","pull_request_review_id":156450584,"id":218498826,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODQ5ODgyNg==","diff_hunk":"@@ -34,17 +34,18 @@ jobs:\n           paths:\n               - \"venv\"\n               - \"node_modules\"\n+\n+      - run:\n+          name: npm run lint\n+          command: npm run lint\n+","path":".circleci/config.yml","position":8,"original_position":8,"commit_id":"8ef8c0b75d7fcd17c5ab42c9064d33f00a9096fc","original_commit_id":"8ef8c0b75d7fcd17c5ab42c9064d33f00a9096fc","user":{"login":"valentijnnieman","id":6509622,"node_id":"MDQ6VXNlcjY1MDk2MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6509622?v=4","gravatar_id":"","url":"https://api.github.com/users/valentijnnieman","html_url":"https://github.com/valentijnnieman","followers_url":"https://api.github.com/users/valentijnnieman/followers","following_url":"https://api.github.com/users/valentijnnieman/following{/other_user}","gists_url":"https://api.github.com/users/valentijnnieman/gists{/gist_id}","starred_url":"https://api.github.com/users/valentijnnieman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valentijnnieman/subscriptions","organizations_url":"https://api.github.com/users/valentijnnieman/orgs","repos_url":"https://api.github.com/users/valentijnnieman/repos","events_url":"https://api.github.com/users/valentijnnieman/events{/privacy}","received_events_url":"https://api.github.com/users/valentijnnieman/received_events","type":"User","site_admin":false},"body":"We could do that. That will mean that, if you haven't formatted properly, the build will fail, right? In that case, we're still running Prettier here and enforcing formatting - wouldn't it be better/nicer/friendlier to, instead of having the build fail (and forcing users to run formatting themselves), auto-format it in this step?","created_at":"2018-09-18T16:13:55Z","updated_at":"2018-09-18T16:13:55Z","html_url":"https://github.com/plotly/dash-core-components/pull/299#discussion_r218498826","pull_request_url":"https://api.github.com/repos/plotly/dash-core-components/pulls/299","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/plotly/dash-core-components/pulls/comments/218498826"},"html":{"href":"https://github.com/plotly/dash-core-components/pull/299#discussion_r218498826"},"pull_request":{"href":"https://api.github.com/repos/plotly/dash-core-components/pulls/299"}},"in_reply_to_id":218059691},"pull_request":{"url":"https://api.github.com/repos/plotly/dash-core-components/pulls/299","id":215028375,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MDI4Mzc1","html_url":"https://github.com/plotly/dash-core-components/pull/299","diff_url":"https://github.com/plotly/dash-core-components/pull/299.diff","patch_url":"https://github.com/plotly/dash-core-components/pull/299.patch","issue_url":"https://api.github.com/repos/plotly/dash-core-components/issues/299","number":299,"state":"open","locked":false,"title":"Update npm scripts used for building, testing, etc.","user":{"login":"valentijnnieman","id":6509622,"node_id":"MDQ6VXNlcjY1MDk2MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6509622?v=4","gravatar_id":"","url":"https://api.github.com/users/valentijnnieman","html_url":"https://github.com/valentijnnieman","followers_url":"https://api.github.com/users/valentijnnieman/followers","following_url":"https://api.github.com/users/valentijnnieman/following{/other_user}","gists_url":"https://api.github.com/users/valentijnnieman/gists{/gist_id}","starred_url":"https://api.github.com/users/valentijnnieman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valentijnnieman/subscriptions","organizations_url":"https://api.github.com/users/valentijnnieman/orgs","repos_url":"https://api.github.com/users/valentijnnieman/repos","events_url":"https://api.github.com/users/valentijnnieman/events{/privacy}","received_events_url":"https://api.github.com/users/valentijnnieman/received_events","type":"User","site_admin":false},"body":"Hi! This is an update for all the npm scripts we're using.\r\n\r\nTL;DR\r\nWe should automate linting and formatting. Formatting so that we don't have to ask contributors to use 4 spaces instead of 2 for indentation for example, and so that we ensure our code looks nice and clean. We should run linting locally before the build step, so we prevent linting errors happening in CircleCI (which takes more time). I personally want to automate these things, so I don't have to spend time thinking about it.\r\n\r\nMore detailed:\r\n- it removes the old `build-dev`, `build-dist` and `copy-lib` scripts that no longer work after updating our webpack config and adds the new `build:js` and `build:py` scripts.\r\n- it also adds some dev build options, as well as a new `build:watch` script. This I personally find very handy when making changes to the code, and wanting to test them in an actual Dash app. This watcher just runs `build:all` when files have changed.\r\n- it removes lingering webpack & babel config files that are no longer used, as well as \r\nthe Archetype dependency. \r\n- it changes the `test` script to run our python tests instead of linting (and changes the CircleCI command)\r\n- it adds a new `lint` command\r\n- it adds a new `format` command that runs Prettier\r\n- ~~It updates the `prepublish` hook with running formatting first, then linting, then building (formatting and linting might not be needed here / might be overkill, depending on where we would run it)~~\r\n- It runs formatting and linting when building JS, this is handy for catching linting errors automatically upon building, especially when using the new `build:watch`.\r\n- ~~it adds the `husky` dependency, which allows for git hooks. I've set up the `pre-push` hook, which fires before every `git push`.~~\r\n- it runs formatting and linting on CircleCI, before the build step.\r\n- it adds a new `scripts` folder with a `publish.js` script, that can be called using `npm run publish-all`, and it should get the name & version number from `package.json`, and publish to both NPM and PyPi\r\n- it fixes the Demo app and the `npm start` command\r\n- it updates the Readme with relevant scripts\r\n\r\nRight now the publish script does `npm publish`, which isn't enough if you've enabled 2FA. Should we make 2FA the default, i.e. update it to run `npm publish --otp`?\r\n\r\n~~What I would like to discuss most is the `pre-push` hook. I very much like automating stuff, because I know myself and know that I sometimes forget stuff. The tests take quite a while to finish however, so I would love to know if you think it is unnecessary to run tests before every `git push`. I know that some other big open source projects like `apollo` use this flow, and I know that it never hurts to run tests locally before pushing to Github. I also think it is a good idea to `format` and `lint` before pushing, so that the code is clean and readable in a PR.~~\r\n\r\n~~Another point of discussion are the publish scripts `publish-all` and `publish-pypi`. I've left those as-is but I know that they've never really worked for me - I always just run `prepublish` first, then `npm publish` and then `twine upload dist/***` what are your thoughts on this?~~\r\n\r\n@plotly/dash ","created_at":"2018-09-12T16:46:44Z","updated_at":"2018-09-18T16:13:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"deb024832fba6e7d24190da22e54dc2c0a97d9a9","assignee":null,"assignees":[],"requested_reviewers":[{"login":"bpostlethwaite","id":1176674,"node_id":"MDQ6VXNlcjExNzY2NzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1176674?v=4","gravatar_id":"","url":"https://api.github.com/users/bpostlethwaite","html_url":"https://github.com/bpostlethwaite","followers_url":"https://api.github.com/users/bpostlethwaite/followers","following_url":"https://api.github.com/users/bpostlethwaite/following{/other_user}","gists_url":"https://api.github.com/users/bpostlethwaite/gists{/gist_id}","starred_url":"https://api.github.com/users/bpostlethwaite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpostlethwaite/subscriptions","organizations_url":"https://api.github.com/users/bpostlethwaite/orgs","repos_url":"https://api.github.com/users/bpostlethwaite/repos","events_url":"https://api.github.com/users/bpostlethwaite/events{/privacy}","received_events_url":"https://api.github.com/users/bpostlethwaite/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":920638547,"node_id":"MDU6TGFiZWw5MjA2Mzg1NDc=","url":"https://api.github.com/repos/plotly/dash-core-components/labels/review%20needed","name":"review needed","color":"f7e011","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/plotly/dash-core-components/pulls/299/commits","review_comments_url":"https://api.github.com/repos/plotly/dash-core-components/pulls/299/comments","review_comment_url":"https://api.github.com/repos/plotly/dash-core-components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plotly/dash-core-components/issues/299/comments","statuses_url":"https://api.github.com/repos/plotly/dash-core-components/statuses/8ef8c0b75d7fcd17c5ab42c9064d33f00a9096fc","head":{"label":"plotly:update_scripts","ref":"update_scripts","sha":"8ef8c0b75d7fcd17c5ab42c9064d33f00a9096fc","user":{"login":"plotly","id":5997976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5OTc5NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/5997976?v=4","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"repo":{"id":61313020,"node_id":"MDEwOlJlcG9zaXRvcnk2MTMxMzAyMA==","name":"dash-core-components","full_name":"plotly/dash-core-components","private":false,"owner":{"login":"plotly","id":5997976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5OTc5NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/5997976?v=4","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/plotly/dash-core-components","description":"A dash component starter pack :stars:","fork":false,"url":"https://api.github.com/repos/plotly/dash-core-components","forks_url":"https://api.github.com/repos/plotly/dash-core-components/forks","keys_url":"https://api.github.com/repos/plotly/dash-core-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plotly/dash-core-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plotly/dash-core-components/teams","hooks_url":"https://api.github.com/repos/plotly/dash-core-components/hooks","issue_events_url":"https://api.github.com/repos/plotly/dash-core-components/issues/events{/number}","events_url":"https://api.github.com/repos/plotly/dash-core-components/events","assignees_url":"https://api.github.com/repos/plotly/dash-core-components/assignees{/user}","branches_url":"https://api.github.com/repos/plotly/dash-core-components/branches{/branch}","tags_url":"https://api.github.com/repos/plotly/dash-core-components/tags","blobs_url":"https://api.github.com/repos/plotly/dash-core-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plotly/dash-core-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plotly/dash-core-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/plotly/dash-core-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plotly/dash-core-components/statuses/{sha}","languages_url":"https://api.github.com/repos/plotly/dash-core-components/languages","stargazers_url":"https://api.github.com/repos/plotly/dash-core-components/stargazers","contributors_url":"https://api.github.com/repos/plotly/dash-core-components/contributors","subscribers_url":"https://api.github.com/repos/plotly/dash-core-components/subscribers","subscription_url":"https://api.github.com/repos/plotly/dash-core-components/subscription","commits_url":"https://api.github.com/repos/plotly/dash-core-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/plotly/dash-core-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/plotly/dash-core-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/plotly/dash-core-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/plotly/dash-core-components/contents/{+path}","compare_url":"https://api.github.com/repos/plotly/dash-core-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plotly/dash-core-components/merges","archive_url":"https://api.github.com/repos/plotly/dash-core-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plotly/dash-core-components/downloads","issues_url":"https://api.github.com/repos/plotly/dash-core-components/issues{/number}","pulls_url":"https://api.github.com/repos/plotly/dash-core-components/pulls{/number}","milestones_url":"https://api.github.com/repos/plotly/dash-core-components/milestones{/number}","notifications_url":"https://api.github.com/repos/plotly/dash-core-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plotly/dash-core-components/labels{/name}","releases_url":"https://api.github.com/repos/plotly/dash-core-components/releases{/id}","deployments_url":"https://api.github.com/repos/plotly/dash-core-components/deployments","created_at":"2016-06-16T17:28:51Z","updated_at":"2018-09-14T01:25:44Z","pushed_at":"2018-09-18T11:56:36Z","git_url":"git://github.com/plotly/dash-core-components.git","ssh_url":"git@github.com:plotly/dash-core-components.git","clone_url":"https://github.com/plotly/dash-core-components.git","svn_url":"https://github.com/plotly/dash-core-components","homepage":"https://plot.ly/dash/dash-core-components","size":37322,"stargazers_count":93,"watchers_count":93,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"archived":false,"open_issues_count":103,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":62,"open_issues":103,"watchers":93,"default_branch":"master"}},"base":{"label":"plotly:master","ref":"master","sha":"29d9f1d366b64a2759fbfc74d184a0561288284d","user":{"login":"plotly","id":5997976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5OTc5NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/5997976?v=4","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"repo":{"id":61313020,"node_id":"MDEwOlJlcG9zaXRvcnk2MTMxMzAyMA==","name":"dash-core-components","full_name":"plotly/dash-core-components","private":false,"owner":{"login":"plotly","id":5997976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5OTc5NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/5997976?v=4","gravatar_id":"","url":"https://api.github.com/users/plotly","html_url":"https://github.com/plotly","followers_url":"https://api.github.com/users/plotly/followers","following_url":"https://api.github.com/users/plotly/following{/other_user}","gists_url":"https://api.github.com/users/plotly/gists{/gist_id}","starred_url":"https://api.github.com/users/plotly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plotly/subscriptions","organizations_url":"https://api.github.com/users/plotly/orgs","repos_url":"https://api.github.com/users/plotly/repos","events_url":"https://api.github.com/users/plotly/events{/privacy}","received_events_url":"https://api.github.com/users/plotly/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/plotly/dash-core-components","description":"A dash component starter pack :stars:","fork":false,"url":"https://api.github.com/repos/plotly/dash-core-components","forks_url":"https://api.github.com/repos/plotly/dash-core-components/forks","keys_url":"https://api.github.com/repos/plotly/dash-core-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plotly/dash-core-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plotly/dash-core-components/teams","hooks_url":"https://api.github.com/repos/plotly/dash-core-components/hooks","issue_events_url":"https://api.github.com/repos/plotly/dash-core-components/issues/events{/number}","events_url":"https://api.github.com/repos/plotly/dash-core-components/events","assignees_url":"https://api.github.com/repos/plotly/dash-core-components/assignees{/user}","branches_url":"https://api.github.com/repos/plotly/dash-core-components/branches{/branch}","tags_url":"https://api.github.com/repos/plotly/dash-core-components/tags","blobs_url":"https://api.github.com/repos/plotly/dash-core-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plotly/dash-core-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plotly/dash-core-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/plotly/dash-core-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plotly/dash-core-components/statuses/{sha}","languages_url":"https://api.github.com/repos/plotly/dash-core-components/languages","stargazers_url":"https://api.github.com/repos/plotly/dash-core-components/stargazers","contributors_url":"https://api.github.com/repos/plotly/dash-core-components/contributors","subscribers_url":"https://api.github.com/repos/plotly/dash-core-components/subscribers","subscription_url":"https://api.github.com/repos/plotly/dash-core-components/subscription","commits_url":"https://api.github.com/repos/plotly/dash-core-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/plotly/dash-core-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/plotly/dash-core-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/plotly/dash-core-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/plotly/dash-core-components/contents/{+path}","compare_url":"https://api.github.com/repos/plotly/dash-core-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plotly/dash-core-components/merges","archive_url":"https://api.github.com/repos/plotly/dash-core-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plotly/dash-core-components/downloads","issues_url":"https://api.github.com/repos/plotly/dash-core-components/issues{/number}","pulls_url":"https://api.github.com/repos/plotly/dash-core-components/pulls{/number}","milestones_url":"https://api.github.com/repos/plotly/dash-core-components/milestones{/number}","notifications_url":"https://api.github.com/repos/plotly/dash-core-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plotly/dash-core-components/labels{/name}","releases_url":"https://api.github.com/repos/plotly/dash-core-components/releases{/id}","deployments_url":"https://api.github.com/repos/plotly/dash-core-components/deployments","created_at":"2016-06-16T17:28:51Z","updated_at":"2018-09-14T01:25:44Z","pushed_at":"2018-09-18T11:56:36Z","git_url":"git://github.com/plotly/dash-core-components.git","ssh_url":"git@github.com:plotly/dash-core-components.git","clone_url":"https://github.com/plotly/dash-core-components.git","svn_url":"https://github.com/plotly/dash-core-components","homepage":"https://plot.ly/dash/dash-core-components","size":37322,"stargazers_count":93,"watchers_count":93,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"archived":false,"open_issues_count":103,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":62,"open_issues":103,"watchers":93,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/plotly/dash-core-components/pulls/299"},"html":{"href":"https://github.com/plotly/dash-core-components/pull/299"},"issue":{"href":"https://api.github.com/repos/plotly/dash-core-components/issues/299"},"comments":{"href":"https://api.github.com/repos/plotly/dash-core-components/issues/299/comments"},"review_comments":{"href":"https://api.github.com/repos/plotly/dash-core-components/pulls/299/comments"},"review_comment":{"href":"https://api.github.com/repos/plotly/dash-core-components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plotly/dash-core-components/pulls/299/commits"},"statuses":{"href":"https://api.github.com/repos/plotly/dash-core-components/statuses/8ef8c0b75d7fcd17c5ab42c9064d33f00a9096fc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"valentijnnieman"}}