Skip to content

Commit cfa120e

Browse files
authored
Merge pull request #772 from plotly/byronz-patch-contribute
Update CONTRIBUTING.md
2 parents 1ba23cf + 1f86565 commit cfa120e

File tree

1 file changed

+4
-37
lines changed

1 file changed

+4
-37
lines changed

CONTRIBUTING.md

+4-37
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ For pull request with notable file changes or a big feature developmennt, we hig
3030

3131
#### Git Desktop
3232

33-
Git command veterans might argue that a simple terminal and cherry switch powered keyboard is the most elegant solution. But in general, a desktop tool makes the task easier.
33+
Git command veterans might argue that a simple terminal and a cherry switch keyboard is the most elegant solution. But in general, a desktop tool makes the task easier.
3434

3535
1. https://www.gitkraken.com/git-client
3636
2. https://desktop.github.com/
@@ -59,23 +59,12 @@ Emojis make the commit messages :cherry_blossom:. If you have no idea about what
5959
- :space_invader: `:space_invader:` - Too much space or too little.
6060
- :spaghetti: `:spaghetti:` - copy-pasta, used to signal code that was copy-pasted without being updated
6161

62-
## Testing before your first push
63-
64-
You can use [circleci local cli](https://circleci.com/docs/2.0/local-cli/) to **locally** test your branch before pushing it to origin `plotly/dash`, doing so leaves no chance of making an embarrasing public exposé.
65-
66-
```bash
67-
# install the cli (first time only)
68-
$ curl -fLSs https://circle.ci/cli | bash && circleci version
69-
70-
# trigger a local circleci container session
71-
# you should run at least one python version locally
72-
# note: the current config requires all tests pass on python 2.7, 3.6 and 3.7.
73-
$ circleci local execute --job python-3.6
74-
```
7562
### Coding Style
7663

7764
We use both `flake8` and `pylint` for basic linting check, please refer to the relevant steps in `.circleci/config.yml`.
7865

66+
Note that we also start using [`black`](https://black.readthedocs.io/en/stable/) as formatter during the test code migration.
67+
7968
## Tests
8069

8170
We started migrating to [pytest](https://docs.pytest.org/en/latest/) from `unittest` as our test automation framework. You will see more testing enhancements in the near future.
@@ -88,30 +77,8 @@ Note: *You might find out that we have more integration tests than unit tests in
8877

8978
### Integration Tests
9079

91-
We create various miminal dash apps to cover feature scenario. A server is launched in mutli-thread or multi-process flavor and the test steps are executed in browsers driving by selenium webdrivers.
92-
93-
Any reasonable test scenario is encouraged to be added along with the same PR.
94-
95-
### Visual regression with Percy
80+
We introduced the `dash.testing` feature in [Dash 1.0](https://community.plot.ly/t/announcing-dash-testing/24868). It makes writing a Dash integration test much easier. Please read the [tutorial](http://dash.plot.ly/testing) and add relevant integration tests with any new features or bug fixes.
9681

97-
Testing graph-intensive-application is a challenging job. We use [percy](https://percy.io/) to mitigate the pain, please pay attention if percy reports visual differences. If you are not sure whether the change is expected, leave a comment, and don't blind-approve it.
98-
99-
100-
## Test variable tips
101-
You can configure the test server with the following variables:
102-
103-
### DASH_TEST_CHROMEPATH
104-
If you run a special chrome, set the path to your chrome binary with this environment variable.
105-
106-
### DASH_TEST_PROCESSES
107-
If you encounter errors about Multi-server + Multi-processing when running under Python 3, try running the tests with the number of server processes set to 1.
108-
109-
### Example: single test run with configuration
110-
111-
```bash
112-
DASH_TEST_CHROMEPATH=/bin/google-chrome-beta DASH_TEST_PROCESSES=1
113-
pytest -k test_no_callback_context
114-
```
11582

11683
## Financial Contributions
11784

0 commit comments

Comments
 (0)