From eb9c367417662a5e0a805728d536bc1600d3e034 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Fri, 5 Mar 2021 10:09:22 +1000 Subject: [PATCH 1/2] chore: fix spelling, grammar and fix whitespace --- .circleci/config.yml | 186 +++++++++--------- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/pull_request_template.md | 2 +- CHANGELOG.md | 6 +- CONTRIBUTING.md | 2 +- .../CallbackGraph/CallbackGraphEffects.js | 2 +- dash/renovate.json | 6 +- .../callbacks/test_prevent_update.py | 2 +- .../unit/development/test_component_loader.py | 6 +- 9 files changed, 106 insertions(+), 108 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f34041e1da..0fc946f042 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,7 +55,7 @@ jobs: - save_cache: key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} paths: - - venv + - venv - run: name: 🌸 Python & JS Lint command: | @@ -71,26 +71,26 @@ jobs: npm run citest.unit lint-unit-36: - <<: *lint-unit - docker: - - image: circleci/python:3.6.12-stretch-node-browsers - auth: - username: dashautomation - password: $DASH_PAT_DOCKERHUB - environment: - PYLINTRC: .pylintrc - PYVERSION: python36 + <<: *lint-unit + docker: + - image: circleci/python:3.6.12-stretch-node-browsers + auth: + username: dashautomation + password: $DASH_PAT_DOCKERHUB + environment: + PYLINTRC: .pylintrc + PYVERSION: python36 lint-unit-27: - <<: *lint-unit - docker: - - image: circleci/python:2.7.18-stretch-node-browsers - auth: - username: dashautomation - password: $DASH_PAT_DOCKERHUB - environment: - PYLINTRC: .pylintrc - PYVERSION: python27 + <<: *lint-unit + docker: + - image: circleci/python:2.7.18-stretch-node-browsers + auth: + username: dashautomation + password: $DASH_PAT_DOCKERHUB + environment: + PYLINTRC: .pylintrc + PYVERSION: python27 build-core-37: &build-core working_directory: ~/dash @@ -107,7 +107,7 @@ jobs: - restore_cache: key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} - run: - name: ️️🏗️ pip dev requirements + name: ️🏗️ pip dev requirements command: | sudo pip install --upgrade virtualenv python -m venv venv || virtualenv venv && . venv/bin/activate @@ -116,39 +116,39 @@ jobs: - save_cache: key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} paths: - - venv + - venv - run: name: ️️🏗️ build core command: | - . venv/bin/activate && pip install --no-cache-dir --upgrade -e . --progress-bar off && mkdir packages - cd dash-renderer && renderer build && python setup.py sdist && mv dist/* ../packages/ && cd .. - git clone --depth 1 https://github.com/plotly/dash-core-components.git - cd dash-core-components && npm ci && npm run build && python setup.py sdist && mv dist/* ../packages/ && cd .. - ls -la packages + . venv/bin/activate && pip install --no-cache-dir --upgrade -e . --progress-bar off && mkdir packages + cd dash-renderer && renderer build && python setup.py sdist && mv dist/* ../packages/ && cd .. + git clone --depth 1 https://github.com/plotly/dash-core-components.git + cd dash-core-components && npm ci && npm run build && python setup.py sdist && mv dist/* ../packages/ && cd .. + ls -la packages - persist_to_workspace: root: ~/dash paths: - packages/*.tar.gz build-core-36: - <<: *build-core - docker: - - image: circleci/python:3.6.12-stretch-node-browsers - auth: - username: dashautomation - password: $DASH_PAT_DOCKERHUB - environment: - PYVERSION: python36 + <<: *build-core + docker: + - image: circleci/python:3.6.12-stretch-node-browsers + auth: + username: dashautomation + password: $DASH_PAT_DOCKERHUB + environment: + PYVERSION: python36 build-core-27: - <<: *build-core - docker: - - image: circleci/python:2.7.18-stretch-node-browsers - auth: - username: dashautomation - password: $DASH_PAT_DOCKERHUB - environment: - PYVERSION: python27 + <<: *build-core + docker: + - image: circleci/python:2.7.18-stretch-node-browsers + auth: + username: dashautomation + password: $DASH_PAT_DOCKERHUB + environment: + PYVERSION: python27 build-misc-37: &build-misc working_directory: ~/dash @@ -174,40 +174,40 @@ jobs: - save_cache: key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} paths: - - venv + - venv - run: name: ️️🏗️ build misc command: | - . venv/bin/activate && pip install --no-cache-dir --upgrade -e . --progress-bar off && mkdir packages - git clone --depth 1 https://github.com/plotly/dash-table.git - cd dash-table && npm ci && npm run build && python setup.py sdist && mv dist/* ../packages/ && cd .. - git clone --depth 1 https://github.com/plotly/dash-html-components.git - cd dash-html-components && npm ci && npm run build && python setup.py sdist && mv dist/* ../packages/ && cd .. - ls -la packages + . venv/bin/activate && pip install --no-cache-dir --upgrade -e . --progress-bar off && mkdir packages + git clone --depth 1 https://github.com/plotly/dash-table.git + cd dash-table && npm ci && npm run build && python setup.py sdist && mv dist/* ../packages/ && cd .. + git clone --depth 1 https://github.com/plotly/dash-html-components.git + cd dash-html-components && npm ci && npm run build && python setup.py sdist && mv dist/* ../packages/ && cd .. + ls -la packages - persist_to_workspace: root: ~/dash paths: - packages/*.tar.gz build-misc-36: - <<: *build-misc - docker: - - image: circleci/python:3.6.12-stretch-node-browsers - auth: - username: dashautomation - password: $DASH_PAT_DOCKERHUB - environment: - PYVERSION: python36 + <<: *build-misc + docker: + - image: circleci/python:3.6.12-stretch-node-browsers + auth: + username: dashautomation + password: $DASH_PAT_DOCKERHUB + environment: + PYVERSION: python36 build-misc-27: - <<: *build-misc - docker: - - image: circleci/python:2.7.18-stretch-node-browsers - auth: - username: dashautomation - password: $DASH_PAT_DOCKERHUB - environment: - PYVERSION: python27 + <<: *build-misc + docker: + - image: circleci/python:2.7.18-stretch-node-browsers + auth: + username: dashautomation + password: $DASH_PAT_DOCKERHUB + environment: + PYVERSION: python27 build-windows-37: working_directory: ~/dash @@ -222,10 +222,10 @@ jobs: - run: name: ️️🏗️ build core command: | - pip install --no-cache-dir --upgrade -e .[dev,testing] --progress-bar off - cd dash-renderer && renderer build && python setup.py sdist && mv dist/* ../packages/ && cd .. - git clone --depth 1 https://github.com/plotly/dash-core-components.git - cd dash-core-components && npm ci && npm run build && python setup.py sdist && cd .. + pip install --no-cache-dir --upgrade -e .[dev,testing] --progress-bar off + cd dash-renderer && renderer build && python setup.py sdist && mv dist/* ../packages/ && cd .. + git clone --depth 1 https://github.com/plotly/dash-core-components.git + cd dash-core-components && npm ci && npm run build && python setup.py sdist && cd .. build-dashr: working_directory: ~/dashr @@ -241,9 +241,8 @@ jobs: steps: - checkout - - run: - name: ️️🏭 clone and npm build core for R + name: 🏭 clone and npm build core for R command: | python -m venv venv . venv/bin/activate @@ -259,7 +258,7 @@ jobs: cd ../dash-table; npm ci && npm run build; rm -rf !(.|..|DESCRIPTION|LICENSE.txt|LICENSE|NAMESPACE|.Rbuildignore|R|man|inst|vignettes|build); cd .. - run: - name: 🔧fix up dash metadata + name: 🔧 fix up dash metadata command: | sudo Rscript dashR/tests/circleci/fixup_metadata.R @@ -282,7 +281,7 @@ jobs: >> ${BASH_ENV} - run: - name: ️️📋 run CRAN package checks + name: ️📋 run CRAN package checks command: | R CMD build dash-core-components R CMD build dash-html-components @@ -313,7 +312,7 @@ jobs: - run: name: 🔎 run unit tests command: | - # unfortunately testthat does not and will not support returning a status + # unfortunately test that does not and will not support returning a status # code other than success, even when tests fail -- this is a workaround sudo Rscript -e 'res=devtools::test("dashR/tests/", reporter=default_reporter());df=as.data.frame(res);if(sum(df$failed) > 0 || any(df$error)) {q(status=1)}' @@ -331,7 +330,6 @@ jobs: path: test-reports - store_artifacts: path: /tmp/dash_artifacts - - run: name: 🦔 percy finalize command: npx percy finalize --all @@ -358,7 +356,7 @@ jobs: - attach_workspace: at: ~/dash - run: - name: ️️🏗️ Install packages + name: ️️🏗️ Install packages command: | . venv/bin/activate npm install --production @@ -384,26 +382,26 @@ jobs: when: on_fail test-36: - <<: *test - docker: - - image: circleci/python:3.6.12-stretch-node-browsers - auth: - username: dashautomation - password: $DASH_PAT_DOCKERHUB - environment: - PERCY_ENABLE: 0 - PYVERSION: python36 + <<: *test + docker: + - image: circleci/python:3.6.12-stretch-node-browsers + auth: + username: dashautomation + password: $DASH_PAT_DOCKERHUB + environment: + PERCY_ENABLE: 0 + PYVERSION: python36 test-27: - <<: *test - docker: - - image: circleci/python:2.7.18-stretch-node-browsers - auth: - username: dashautomation - password: $DASH_PAT_DOCKERHUB - environment: - PERCY_ENABLE: 0 - PYVERSION: python27 + <<: *test + docker: + - image: circleci/python:2.7.18-stretch-node-browsers + auth: + username: dashautomation + password: $DASH_PAT_DOCKERHUB + environment: + PERCY_ENABLE: 0 + PYVERSION: python27 workflows: version: 2 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 31b8ff29d0..8145fb95f9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -13,7 +13,7 @@ We do our best to catch bugs during the release process, but we rely on your hel **Describe your context** -Please provide us your environment so we can easily reproduce the issue. +Please provide us your environment, so we can easily reproduce the issue. - replace the result of `pip list | grep dash` below ``` diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c685706a69..47887292fa 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -13,4 +13,4 @@ - [ ] I have added entry in the `CHANGELOG.md` - [ ] If this PR needs a follow-up in **dash docs**, **community thread**, I have mentioned the relevant URLS as follows - [ ] this GitHub [#PR number]() updates the dash docs - - [ ] here is the show and tell thread in Plotly Dash community + - [ ] here is the show and tell thread in Plotly Dash community diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cd436d9d3..ec2f14e6bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## UNRELEASED ### Changed -- [#1531](https://github.com/plotly/dash/pull/1531) Update the format of the docstrings to make them easier to read in the reference pages of Dash Docs and in the console. This also addresses [#1205](https://github.com/plotly/dash/issues/1205) +- [#1531](https://github.com/plotly/dash/pull/1531) Update the format of the docstrings to make them easier to read in the reference pages of Dash Docs and in the console. This also addresses [#1205](https://github.com/plotly/dash/issues/1205) - [#1553](https://github.com/plotly/dash/pull/1553) Increase the z-index of the Dash error menu from 1001 to 1100 in order to make sure it appears above Bootstrap components. ### Fixed @@ -24,7 +24,7 @@ to close the error messages box. ### Fixed - [#1530](https://github.com/plotly/dash/pull/1530) Dedent error messages more carefully. -- [#1527](https://github.com/plotly/dash/issues/1527)🐛 `get_asset_url` now pulls from an external source if `assets_external_path` is set. +- [#1527](https://github.com/plotly/dash/issues/1527) 🐛 `get_asset_url` now pulls from an external source if `assets_external_path` is set. - updated `_add_assets_resource` to build asset urls the same way as `get_asset_url`. - updated doc string for `assets_external_path` Dash argument to be more clear that it will allways be joined with the `assets_url_path` argument when determining the url to an external asset. - [#1493](https://github.com/plotly/dash/pull/1493) Fix [#1143](https://github.com/plotly/dash/issues/1143), a bug where having a file with one of several common names (test.py, code.py, org.py, etc) that imports a dash component package would make `import dash` fail with a cryptic error message asking whether you have a file named "dash.py" @@ -359,7 +359,7 @@ clientside JavaScript callbacks via inline strings. - [#724](https://github.com/plotly/dash/pull/724), [renderer#175](https://github.com/plotly/dash-renderer/pull/175) Undo/redo toolbar is removed by default, you can enable it with `app=Dash(show_undo_redo=true)`. The CSS hack `._dash-undo-redo:{display:none;}` is no longer needed -- 💥[#709](https://github.com/plotly/dash/pull/709) Merge the `dash-renderer` project into the main dash repo to simplify feature dev workflow. We will keep the [deprecated one](https://github.com/plotly/dash-renderer) for archive purpose. +- 💥 [#709](https://github.com/plotly/dash/pull/709) Merge the `dash-renderer` project into the main dash repo to simplify feature dev workflow. We will keep the [deprecated one](https://github.com/plotly/dash-renderer) for archive purpose. ## [0.43.0] - 2019-05-15 ### Changed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 66166e84c5..497fbf55cf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ $ pip list | grep dash ### Dash-Renderer Beginner Guide -`Dash Renderer` began as a separate repository. It was merged into the main `Dash` repository as part of the 1.0 release. It is the common frontend for all Dash backends (**R** and **Python**), and manages React Component layout and backend event handling. +`Dash Renderer` began as a separate repository. It was merged into the main `Dash` repository as part of the 1.0 release. It is the common frontend for all Dash backends (**R** and **Python**), and manages React Component layout and backend event handling. If you want to contribute or simply dig deeper into Dash, we encourage you to play and taste it. This is the most efficient way to learn and understand everything under the hood. diff --git a/dash-renderer/src/components/error/CallbackGraph/CallbackGraphEffects.js b/dash-renderer/src/components/error/CallbackGraph/CallbackGraphEffects.js index 3f42f51405..1e067bf24b 100644 --- a/dash-renderer/src/components/error/CallbackGraph/CallbackGraphEffects.js +++ b/dash-renderer/src/components/error/CallbackGraph/CallbackGraphEffects.js @@ -35,7 +35,7 @@ export function updateSelectedNode(cy, id) { node.addClass('selected-node'); // Find the subtree that the node belongs to. A subtree contains - // all all ancestors and descendents that are connected via Inputs + // all all ancestors and descendants that are connected via Inputs // or Outputs (but not State). // WARNING: No cycle detection! diff --git a/dash/renovate.json b/dash/renovate.json index c1f20f8e9f..7c31c26082 100644 --- a/dash/renovate.json +++ b/dash/renovate.json @@ -7,17 +7,17 @@ "enabled": true }, "pip_requirements": { - "fileMatch": ["requirements.txt", "dev-requirements.txt", "dev-requirements-py37.txt"] + "fileMatch": ["requirements.txt", "dev-requirements.txt", "dev-requirements-py37.txt"] }, "pip_setup": { - "enabled": true + "enabled": true }, "packageRules": [{ "packageNames": [ "pylint" ], "paths": [ - "dev-requirements.txt" + "dev-requirements.txt" ], "allowedVersions": "<2.0.0" }] diff --git a/tests/integration/callbacks/test_prevent_update.py b/tests/integration/callbacks/test_prevent_update.py index e5f122f602..6b4183efbb 100644 --- a/tests/integration/callbacks/test_prevent_update.py +++ b/tests/integration/callbacks/test_prevent_update.py @@ -87,7 +87,7 @@ def test_cbpu002_multi_output_no_update(dash_duo): [Input("btn", "n_clicks")], ) def show_clicks(n): - # partial or complete cancelation of updates via no_update + # partial or complete cancellation of updates via no_update return [ no_update if n and n > 4 else n, no_update if n and n > 2 else n, diff --git a/tests/unit/development/test_component_loader.py b/tests/unit/development/test_component_loader.py index 4c525fdf6d..aa30ed1c3d 100644 --- a/tests/unit/development/test_component_loader.py +++ b/tests/unit/development/test_component_loader.py @@ -103,7 +103,7 @@ @pytest.fixture -def write_metada_file(): +def write_metadata_file(): with open(METADATA_PATH, "w") as f: f.write(METADATA_STRING) yield @@ -120,7 +120,7 @@ def make_namespace(): shutil.rmtree("default_namespace") -def test_loadcomponents(write_metada_file): +def test_loadcomponents(write_metadata_file): my_component = generate_class( "MyComponent", METADATA["MyComponent.react.js"]["props"], @@ -156,7 +156,7 @@ def test_loadcomponents(write_metada_file): assert repr(a_component(**a_kwargs)) == repr(c[1](**a_kwargs)) -def test_loadcomponents_from_generated_class(write_metada_file, make_namespace): +def test_loadcomponents_from_generated_class(write_metadata_file, make_namespace): my_component_runtime = generate_class( "MyComponent", METADATA["MyComponent.react.js"]["props"], From caa5f93762ffad3dd6ae3d55b9b508d5673cdf2f Mon Sep 17 00:00:00 2001 From: Alex Johnson Date: Mon, 8 Mar 2021 08:43:25 -0500 Subject: [PATCH 2/2] Update .circleci/config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0fc946f042..48b3fa4495 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -312,7 +312,7 @@ jobs: - run: name: 🔎 run unit tests command: | - # unfortunately test that does not and will not support returning a status + # unfortunately testthat does not and will not support returning a status # code other than success, even when tests fail -- this is a workaround sudo Rscript -e 'res=devtools::test("dashR/tests/", reporter=default_reporter());df=as.data.frame(res);if(sum(df$failed) > 0 || any(df$error)) {q(status=1)}'