Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit f9b2e93

Browse files
authored
Modified CONTRIBUTING.md with publishing guide (#243)
* Contributing and publishing guide additions * Spacing fixes * Relative link fixes * Anchor link fix * missing .md extension * Contributing and publishing guide additions * Suggestion from PR #243 (mandatory GitHub flow)
1 parent b828083 commit f9b2e93

File tree

2 files changed

+66
-22
lines changed

2 files changed

+66
-22
lines changed

CONTRIBUTING.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
1+
# Contributing to dash-core-components
2+
3+
## Getting Started
4+
5+
Refer to the [readme](README.md) for installation and development instructions.
6+
7+
## Contributions
8+
9+
[Dash Core Components][] consist of pluggable components for creating interactive user interfaces. For generic HTML5 elements, see [Dash HTML Components][]. Contributions are welcome! This repository's open [issues][] are a good place to start. Another way to contribute is to [write your own components][] using the [Dash Components Archetype][].
10+
11+
## Coding Style
12+
13+
Please lint any additions to react components with `npm run lint`. Rules defined in [.eslintrc](.eslintrc) are inherited from [`dash-components-archetype`](https://github.com/plotly/dash-components-archetype)'s [eslintrc-react.json][]
14+
15+
## Pull Request Guidelines
16+
17+
Use the [GitHub flow][] when proposing contributions to this repository (i.e. create a feature branch and submit a PR against the master branch).
18+
119
## Running the Tests
220

321
In order to run the tests, you first need to have built the JavaScript
422
`dash_core_components` library. You will need to build the library again if
523
you've pulled from upstream otherwise you may be running with an out of date
6-
`bundle.js`. See the instructions for building `bundle.js` in the "Testing
7-
Locally" section of README.md.
24+
`bundle.js`. See the instructions for building `bundle.js` in the [Testing
25+
Locally](README.md#testing-locally) section of README.md.
826

927
You also need to set the environment variable `TOX_PYTHON_27` and with the
1028
location of the Python 2 installations you want tox to use for creating the
@@ -30,3 +48,48 @@ If you encounter errors about Multi-server + Multi-processing when running under
3048
```
3149
DASH_TEST_CHROMEPATH=/bin/google-chrome-beta DASH_TEST_PROCESSES=1 python -m unittest -v test.test_integration.Tests.test_inputs
3250
```
51+
52+
## Publishing New Components/Features
53+
54+
For now, multiple steps are necessary for publishing to NPM and PyPi,
55+
respectively. TODO:
56+
[#5](https://github.com/plotly/dash-components-archetype/issues/5) will roll up publishing steps into one workflow.
57+
58+
1. Create a pull request and tag the Plotly team (`@plotly/dash`) as well as an appropriate reviewer (frequent [contributors][] are a safe bet).
59+
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:
60+
* Add `rc1` to `version.py` (`./dash_core_components/version.py`) e.g. `0.13.0rc1`
61+
* Add `-rc1` to `package.json` e.g. `0.13.0-rc1`
62+
* Update the `unpkg` link in `./dash_core_components/__init__.py`, replacing `__version__` with your release candidate (e.g. `"0.13.0-rc1"`)
63+
* Run `npm run publish-all`.
64+
- If needed, ask @chriddyp to get NPM / PyPi package publishing access.
65+
- If the `publish-all` script fails on the `twine` command, try running
66+
```sh
67+
twine upload dist/dash_core_components-X.X.X.tar.gz # where xx.x.x is the version number
68+
```
69+
3. Comment in the PR with the prerelease version
70+
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][].
71+
* 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
72+
* Keep this top-level comment updated with installation instructions (e.g. the `pip install` command)
73+
5. Make a post in the [Dash Community Forum][]
74+
* Title it `":mega: Announcement! New <Your Feature> - Feedback Welcome"`
75+
* In the description, link to the PR and any relevant issue(s)
76+
* Pin the topic so that it appears at the top of the forum for two weeks
77+
* For a good example, see the [Confirmation Modal announcement][]
78+
79+
## Financial Contributions
80+
81+
If your company wishes to sponsor development of open source dash components, please [get in touch][].
82+
83+
[Dash Core Components]: https://dash.plot.ly/dash-core-components
84+
[Dash HTML Components]: https://github.com/plotly/dash-html-components
85+
[write your own components]: https://dash.plot.ly/plugins
86+
[Dash Components Archetype]: https://github.com/plotly/dash-components-archetype
87+
[issues]: https://github.com/plotly/dash-core-components/issues
88+
[GitHub flow]: https://guides.github.com/introduction/flow/
89+
[eslintrc-react.json]: https://github.com/plotly/dash-components-archetype/blob/master/config/eslint/eslintrc-react.json
90+
[contributors]: https://github.com/plotly/dash-core-components/graphs/contributors
91+
[semantic versioning]: https://semver.org/
92+
[Dash Community Forum]: https://community.plot.ly/c/dash
93+
[Confirmation Modal component]: https://github.com/plotly/dash-core-components/pull/211#issue-195280462
94+
[Confirmation Modal announcement]: https://community.plot.ly/t/announcing-dash-confirmation-modal-feedback-welcome/11627
95+
[get in touch]: https://plot.ly/products/consulting-and-oem

README.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -111,26 +111,7 @@ $ npm run uninstall-local
111111

112112
## Publishing
113113

114-
For now, multiple steps are necessary for publishing to NPM and PyPi,
115-
respectively. TODO:
116-
[#5](https://github.com/plotly/dash-components-archetype/issues/5) will roll up
117-
publishing steps into one workflow.
118-
119-
Ask @chriddyp to get NPM / PyPi package publishing access.
120-
121-
1 - Update `version.py`, we're using [semantic versioning](https://semver.org/)!
122-
123-
2 - Update `package.json`
124-
125-
4 - Publish: `npm run publish-all` (Make sure you have access to NPM and PyPI)
126-
4b - If the `publish-all` script fails on the `twine` command, try running
127-
```sh
128-
twine upload dist/dash_core_components-X.X.X.tar.gz # where xx.x.x is the version number
129-
```
130-
131-
If you want to publish a prerelease package, change `version.py` to X.X.XrcX (0.23.1rc1 for example) and
132-
`package.json` to X.X.X-rcX (notice how the rc syntax is different between node and python. npm requires a - between the version number and the prerelease tag while python's pip just has 0.23.1rc1)
133-
114+
See the [Publishing New Components/Features](CONTRIBUTING.md#publishing-new-componentsfeatures) section of the Contributing guide for step-by-step instructions on publishing new components.
134115

135116
## Builder / Archetype
136117

0 commit comments

Comments
 (0)