You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,7 @@ When a change in renderer code doesn't reflect in your browser as expected, this
51
51
52
52
Writing Python 2/3 compatible code might be a challenging task for contributors used to working on one particular version, especially new learners who start directly with Python 3.
53
53
54
-
From the #892, we started to adopt `python-future` instead of `six` as our tool to better achieve the goal where we can mainly write Python 3 code and make it back-compatible in Python 2.7 (last Python 2 version Dash supports before it gets deprecated).
55
-
56
-
Please refer to [this list of idioms](https://python-future.org/compatible_idioms.html"https://python-future.org/compatible_idioms.html") for more details on working with `python-future`.
54
+
We use `python-future` as our tool to mainly write Python 3 code and make it back-compatible to Python 2.7 (the only Python 2 version Dash supports). Please refer to [this list of idioms](https://python-future.org/compatible_idioms.html"https://python-future.org/compatible_idioms.html") for more details on working with `python-future`.
57
55
58
56
## Git
59
57
@@ -101,13 +99,15 @@ Emojis make the commit messages :cherry_blossom:. If you have no idea about what
101
99
102
100
### Coding Style
103
101
104
-
We use both `flake8` and `pylint` for basic linting check, please refer to the relevant steps in `.circleci/config.yml`.
105
-
106
-
Note that we also start using [`black`](https://black.readthedocs.io/en/stable/) as formatter during the test code migration.
102
+
We use `flake8`, `pylint`, and [`black`](https://black.readthedocs.io/en/stable/) for linting. please refer to the relevant steps in `.circleci/config.yml`.
107
103
108
104
## Tests
109
105
110
-
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. To run the tests, see the commands in the `package.json` (such as `npm run test.integration`)
106
+
Our tests use Google Chrome via Selenium. You will need to install [ChromeDriver](http://chromedriver.chromium.org/getting-started) matching the version of Chrome installed on your system. Here are some helpful tips for [Mac](https://www.kenst.com/2015/03/installing-chromedriver-on-mac-osx/) and [Windows](http://jonathansoma.com/lede/foundations-2018/classes/selenium/selenium-windows-install/).
107
+
108
+
We use [pytest](https://docs.pytest.org/en/latest/) as our test automation framework, plus [jest](https://jestjs.io/) for a few renderer unit tests. You can `npm run test` to run them all, but this command simply runs `pytest` with no arguments, then `cd dash-renderer && npm run test` for the renderer unit tests.
109
+
110
+
Most of the time, however, you will want to just run a few relevant tests and let CI run the whole suite. `pytest` lets you specify a directory or file to run tests from (eg `pytest tests/unit`) or a part of the test case name using `-k` - for example `pytest -k cbcx004` will run a single test, or `pytest -k cbcx` will run that whole file. See the [testing tutorial](https://dash.plotly.com/testing) to learn about the test case ID convention we use.
111
111
112
112
### Unit Tests
113
113
@@ -119,8 +119,6 @@ Note: *You might find out that we have more integration tests than unit tests in
119
119
120
120
We introduced the `dash.testing` feature in [Dash 1.0](https://community.plotly.com/t/announcing-dash-testing/24868). It makes writing a Dash integration test much easier. Please read the [tutorial](http://dash.plotly.com/testing) and add relevant integration tests with any new features or bug fixes.
121
121
122
-
To run the integration tests, you may have to [install circleci](https://circleci.com/docs/2.0/local-cli/).
123
-
124
122
## Financial Contributions
125
123
126
124
Dash, and many of Plotly's open source products, have been funded through direct sponsorship by companies. [Get in touch] about funding feature additions, consulting, or custom app development.
0 commit comments