From 2e7cded25cf12ed82c316dc14e836171dff6279e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Tue, 27 Aug 2019 19:02:33 -0400 Subject: [PATCH 1/6] remove publish scripts --- package.json | 1 - scripts/publish.js | 33 --------------------------------- 2 files changed, 34 deletions(-) delete mode 100644 scripts/publish.js diff --git a/package.json b/package.json index a6008b925..9ea1e5298 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "main": "dash_core_components/dash_core_components.min.js", "scripts": { "prepare": "npm run build", - "publish-all": "node scripts/publish.js", "start": "webpack-serve ./webpack.serve.config.js --open", "lint": "eslint src tests", "lint:py": "flake8 --ignore=E501,F401,F841,F811,W503 tests", diff --git a/scripts/publish.js b/scripts/publish.js deleted file mode 100644 index aa225331d..000000000 --- a/scripts/publish.js +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env node - -const execSh = require('exec-sh'); -let version = require('../package.json').version; -let name = require('../package.json').name.replace(/-/g, '_'); - -if(version.includes("rc")) { - version = version.replace('-', ''); - console.log("Adjusted version to", version, "for PyPi"); -} - -console.log(`Publishing version ${version} of ${name} to NPM & PyPi\n`); - -console.log('>', 'python setup.py sdist'); - -execSh('git diff-index --quiet HEAD --', err => { - if(err) { - throw new Error('\nIt looks like there are uncommitted changes! Aborting until these changes have been resolved.\n'); - } else { - execSh([ - 'npm publish --otp', - `python setup.py sdist`, - `twine upload dist/${name}-${version}.tar.gz`, - `git tag -a 'v${version}' -m 'v${version}'`, - `git push origin v${version}` - ] - , err => { - if(err) { - throw new Error(err); - } - }); - } -}) From f1e8024369419eb1f97f01f49e24e23cf82f39e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Tue, 27 Aug 2019 19:10:10 -0400 Subject: [PATCH 2/6] remove "prepare" --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 9ea1e5298..74d50e1b1 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "homepage": "https://github.com/plotly/dash-core-components", "main": "dash_core_components/dash_core_components.min.js", "scripts": { - "prepare": "npm run build", "start": "webpack-serve ./webpack.serve.config.js --open", "lint": "eslint src tests", "lint:py": "flake8 --ignore=E501,F401,F841,F811,W503 tests", From ac4c5807f028132f6925a8dbda618d1862d4f77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Tue, 27 Aug 2019 19:42:50 -0400 Subject: [PATCH 3/6] update contributing --- CONTRIBUTING.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 489b4e1d3..1410f5d03 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,12 +35,10 @@ respectively. TODO: * Add `rc1` to `version.py` (`./dash_core_components/version.py`) e.g. `0.13.0rc1` * Add `-rc1` to `package.json` e.g. `0.13.0-rc1` * Update the `unpkg` link in `./dash_core_components/__init__.py`, replacing `__version__` with your release candidate (e.g. `"0.13.0-rc1"`) - * Run `npm run publish-all`. + * Run `npm publish` to publish on NPM. + * Run `python setup.py sdist` to build the PyPi package. + * Upload your release to pypi with: `twine upload dist/dash_core_components-X.X.X.tar.gz` - If needed, ask @chriddyp to get NPM / PyPi package publishing access. - - If the `publish-all` script fails on the `twine` command, try running - ```sh - twine upload dist/dash_core_components-X.X.X.tar.gz # where xx.x.x is the version number - ``` 3. Comment in the PR with the prerelease version 4. Update the top-level comment to include info about how to install, a summary of the changes, and a simple example. For a good example, see the [Confirmation Modal component][]. * This makes it easier for a community member to come in and try it out. As more folks review, it's harder to find the installation instructions deep in the PR From f3a042ae6c144932126593dc7bbdb704a27823f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 28 Aug 2019 10:35:44 -0400 Subject: [PATCH 4/6] making a contribution --- CONTRIBUTING.md | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1410f5d03..d237f3bdb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,6 +16,12 @@ Please lint any additions to react components with `npm run lint`. Rules defined Use the [GitHub flow][] when proposing contributions to this repository (i.e. create a feature branch and submit a PR against the master branch). +## Making a Contribution +_For larger features, your contribution will have a higher likelihood of getting merged if you create an issue to discuss the changes that you'd like to make before you create a pull request._ + +1. Create a pull request and tag the Plotly team (`@plotly/dash`) and tag / request review from [@Marc-Andre-Rivet](https://github.com/Marc-Andre-Rivet) and [@alexcjohnson ](https://github.com/alexcjohnson). +2. After a review has been done and your changes have been approved, they will be merged and included in a future release of Dash. + ## Running the Tests In order to run the tests, you first need to have built the JavaScript @@ -24,31 +30,6 @@ you've pulled from upstream otherwise you may be running with an out of date `bundle.js`. See the instructions for building `bundle.js` in the [Testing Locally](README.md#testing-locally) section of README.md. -## Publishing New Components/Features - -For now, multiple steps are necessary for publishing to NPM and PyPi, -respectively. TODO: -[#5](https://github.com/plotly/dash-components-archetype/issues/5) will roll up publishing steps into one workflow. - -1. Create a pull request and tag the Plotly team (`@plotly/dash`) as well as an appropriate reviewer (frequent [contributors][] are a safe bet). -2. After a review has been done and your changes have been approved, create a prerelease and comment in the PR. Version numbers should follow [semantic versioning][]. To create a prerelease: - * Add `rc1` to `version.py` (`./dash_core_components/version.py`) e.g. `0.13.0rc1` - * Add `-rc1` to `package.json` e.g. `0.13.0-rc1` - * Update the `unpkg` link in `./dash_core_components/__init__.py`, replacing `__version__` with your release candidate (e.g. `"0.13.0-rc1"`) - * Run `npm publish` to publish on NPM. - * Run `python setup.py sdist` to build the PyPi package. - * Upload your release to pypi with: `twine upload dist/dash_core_components-X.X.X.tar.gz` - - If needed, ask @chriddyp to get NPM / PyPi package publishing access. -3. Comment in the PR with the prerelease version -4. Update the top-level comment to include info about how to install, a summary of the changes, and a simple example. For a good example, see the [Confirmation Modal component][]. - * This makes it easier for a community member to come in and try it out. As more folks review, it's harder to find the installation instructions deep in the PR - * Keep this top-level comment updated with installation instructions (e.g. the `pip install` command) -5. Make a post in the [Dash Community Forum][] - * Title it `":mega: Announcement! New - Feedback Welcome"` - * In the description, link to the PR and any relevant issue(s) - * Pin the topic so that it appears at the top of the forum for two weeks - * For a good example, see the [Confirmation Modal announcement][] - ## Updating Plotly.js 1. Download the latest plotly.js from the cdn: `$ wget https://github.com/plotly/plotly.js/releases/tag/v1.49.4` From 181dda0b9a0cc831e5767f5a6940d9c9f33f7fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 28 Aug 2019 10:59:07 -0400 Subject: [PATCH 5/6] contributing + codeowners --- .github/CODEOWNERS | 3 +++ CONTRIBUTING.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..2da24d26b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,3 @@ +# These owners will be the default owners for everything in +# the repo. Unless a later match takes precedence +* @alexcjohnson @byronz @Marc-Andre-Rivet \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d237f3bdb..1dbd385a5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ Use the [GitHub flow][] when proposing contributions to this repository (i.e. cr ## Making a Contribution _For larger features, your contribution will have a higher likelihood of getting merged if you create an issue to discuss the changes that you'd like to make before you create a pull request._ -1. Create a pull request and tag the Plotly team (`@plotly/dash`) and tag / request review from [@Marc-Andre-Rivet](https://github.com/Marc-Andre-Rivet) and [@alexcjohnson ](https://github.com/alexcjohnson). +1. Create a pull request. 2. After a review has been done and your changes have been approved, they will be merged and included in a future release of Dash. ## Running the Tests From 37a0efbc9254137a6b6f88ec24642affe7a6e603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andre=CC=81=20Rivet?= Date: Wed, 28 Aug 2019 12:09:25 -0400 Subject: [PATCH 6/6] dash-docs --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1dbd385a5..1e18933a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,7 @@ _For larger features, your contribution will have a higher likelihood of getting 1. Create a pull request. 2. After a review has been done and your changes have been approved, they will be merged and included in a future release of Dash. +3. If significant enough, you have created an issue about documenting the new feature or change and you have added it to the [dash-docs](https://github.com/plotly/dash-docs) project. ## Running the Tests