From af23c5bb6b9a0372b470ec81f25105f709b12bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Fredrik=20Ki=C3=A6r?= <31612826+anders-kiaer@users.noreply.github.com> Date: Sat, 4 Sep 2021 13:18:31 +0200 Subject: [PATCH 1/6] Split dependencies --- .circleci/config.yml | 25 +++++++++++-------- dash/long_callback/managers/celery_manager.py | 16 +++++++++--- .../managers/diskcache_manager.py | 9 ++----- dash/testing/plugin.py | 16 +++++++++--- requires-celery-manager.txt | 2 ++ requires-ci.txt | 13 ++++++++++ requires-dev.txt | 16 +++--------- requires-diskcache-manager.txt | 3 +++ requires-testing.txt | 16 +++--------- setup.py | 2 ++ 10 files changed, 67 insertions(+), 51 deletions(-) create mode 100644 requires-celery-manager.txt create mode 100644 requires-ci.txt create mode 100644 requires-diskcache-manager.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d93deb313..e1941ef3d1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,9 @@ jobs: sudo pip install virtualenv --upgrade python -m venv venv && . venv/bin/activate set -eo pipefail - pip install -e .[testing,dev] --progress-bar off && pip list | grep dash + pip install -e .[testing,dev,celery-manager,diskcache-manager] --progress-bar off + pip install -r ./requires-ci.txt --progress-bar off + pip list | grep dash npm i npm run build python setup.py sdist @@ -70,15 +72,15 @@ jobs: - checkout - run: echo $PYVERSION > ver.txt - restore_cache: - key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} - run: name: ️️🏗️ pip dev requirements command: | sudo pip install --upgrade virtualenv --progress-bar off python -m venv venv || virtualenv venv && . venv/bin/activate - pip install -e . --no-cache-dir -r requires-install.txt -r requires-dev.txt -r requires-testing.txt --progress-bar off + pip install -e .[dev,testing] --no-cache-dir -r requires-ci.txt --progress-bar off - save_cache: - key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} paths: - venv - run: @@ -214,7 +216,7 @@ jobs: - checkout - run: echo $PYVERSION > ver.txt - restore_cache: - key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} - attach_workspace: at: ~/dash - run: @@ -223,7 +225,7 @@ jobs: . venv/bin/activate npm install --production pip install --no-cache-dir --upgrade --ignore-installed dash-package/dash-package.tar.gz --progress-bar off - pip install -r requires-install.txt -r requires-dev.txt -r requires-testing.txt --progress-bar off + pip install -r requires-install.txt -r requires-ci.txt -r requires-dev.txt -r requires-testing.txt -r requires-celery-manager.txt -r requires-diskcache-manager.txt --progress-bar off sed -i '/dash/d' requires-install.txt pip list | grep dash - run: @@ -265,7 +267,7 @@ jobs: path: ~/dash - run: echo $PYTHON_VERSION > ver.txt - restore_cache: - key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }} + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "../../requires-ci.txt" }} - attach_workspace: at: ~/dash/components/dash-core-components - run: @@ -274,9 +276,9 @@ jobs: sudo pip install virtualenv --upgrade python -m venv venv || virtualenv venv && . venv/bin/activate pip install dash-package/dash-package.tar.gz[dev,testing] - pip install --progress-bar off --no-cache-dir -r dev-requirements.txt + pip install --progress-bar off --no-cache-dir -r dev-requirements.txt -r ../../requires-ci.txt - save_cache: - key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }} + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "../../requires-ci.txt" }} paths: - venv - run: @@ -421,7 +423,7 @@ jobs: python -m venv venv || virtualenv venv . venv/bin/activate pip install dash-package/dash-package.tar.gz[dev,testing] - pip install -r dev-requirements.txt + pip install -r dev-requirements.txt -r ../../requires-ci.txt npm ci - run: @@ -493,6 +495,7 @@ jobs: . venv/bin/activate pip install -r dev-requirements.txt --quiet pip install -r python-requirements.txt --quiet + pip install -r ../../requires-ci.txt pip install dash-package/dash-package.tar.gz[dev,testing] - run: name: Build @@ -597,7 +600,7 @@ jobs: name: Install requirements command: | . venv/bin/activate - pip install -r dev-requirements.txt --quiet + pip install -r dev-requirements.txt -r ../../requires-ci.txt --quiet pip install dash-package/dash-package.tar.gz[dev,testing] - run: diff --git a/dash/long_callback/managers/celery_manager.py b/dash/long_callback/managers/celery_manager.py index 176bc2d646..d01e163228 100644 --- a/dash/long_callback/managers/celery_manager.py +++ b/dash/long_callback/managers/celery_manager.py @@ -25,10 +25,18 @@ def __init__(self, celery_app, cache_by=None, expire=None): for ``expire`` seconds. If not provided, the lifetime of cache entries is determined by the default behavior of the celery result backend. """ - import celery # pylint: disable=import-outside-toplevel,import-error - from celery.backends.base import ( # pylint: disable=import-outside-toplevel,import-error - DisabledBackend, - ) + try: + import celery # pylint: disable=import-outside-toplevel,import-error + from celery.backends.base import ( # pylint: disable=import-outside-toplevel,import-error + DisabledBackend, + ) + except ImportError as missing_imports: + raise ImportError( + """\ +CeleryLongCallbackManager requires extra dependencies which can be installed doing + + $ pip install "dash[celery-manager]"\n""" + ) from missing_imports if not isinstance(celery_app, celery.Celery): raise ValueError("First argument must be a celery.Celery object") diff --git a/dash/long_callback/managers/diskcache_manager.py b/dash/long_callback/managers/diskcache_manager.py index 9127fef447..2cc1d7b51c 100644 --- a/dash/long_callback/managers/diskcache_manager.py +++ b/dash/long_callback/managers/diskcache_manager.py @@ -28,14 +28,9 @@ def __init__(self, cache, cache_by=None, expire=None): except ImportError as missing_imports: raise ImportError( """\ -DiskcacheLongCallbackManager requires the multiprocess, diskcache, and psutil packages -which can be installed using pip... +DiskcacheLongCallbackManager requires extra dependencies which can be installed doing - $ pip install multiprocess diskcache psutil - -or conda. - - $ conda install -c conda-forge multiprocess diskcache psutil\n""" + $ pip install "dash[diskcache-manager]"\n""" ) from missing_imports if not isinstance(cache, (diskcache.Cache, diskcache.FanoutCache)): diff --git a/dash/testing/plugin.py b/dash/testing/plugin.py index ce61805b32..b9b02623ba 100644 --- a/dash/testing/plugin.py +++ b/dash/testing/plugin.py @@ -189,10 +189,18 @@ def dashjl(request, dashjl_server, tmpdir): @pytest.fixture def diskcache_manager(): - from dash.long_callback import ( # pylint: disable=import-outside-toplevel - DiskcacheLongCallbackManager, - ) - import diskcache # pylint: disable=import-outside-toplevel + try: + from dash.long_callback import ( # pylint: disable=import-outside-toplevel + DiskcacheLongCallbackManager, + ) + import diskcache # pylint: disable=import-outside-toplevel + except ImportError as missing_imports: + raise ImportError( + """\ +DiskcacheLongCallbackManager requires extra dependencies which can be installed doing + +$ pip install "dash[diskcache-manager]"\n""" + ) from missing_imports cache = diskcache.Cache() return DiskcacheLongCallbackManager(cache) diff --git a/requires-celery-manager.txt b/requires-celery-manager.txt new file mode 100644 index 0000000000..63851f1d52 --- /dev/null +++ b/requires-celery-manager.txt @@ -0,0 +1,2 @@ +redis>=3.5.3 +celery[redis]>=5.1.2 diff --git a/requires-ci.txt b/requires-ci.txt new file mode 100644 index 0000000000..c2a64c8700 --- /dev/null +++ b/requires-ci.txt @@ -0,0 +1,13 @@ +black==21.6b0 +dash-flow-example==0.0.5 +dash-dangerously-set-inner-html +flake8==3.9.2 +flaky==3.7.0 +flask-talisman==0.8.1 +isort==4.3.21;python_version<"3.7" +mock==4.0.3 +orjson==3.3.1;python_version<"3.7" +orjson==3.6.1;python_version>="3.7" +pylint==2.10.2 +pytest-mock==3.2.0 +pytest-sugar==0.9.4 \ No newline at end of file diff --git a/requires-dev.txt b/requires-dev.txt index 3773ced3c1..4cd2da5f25 100644 --- a/requires-dev.txt +++ b/requires-dev.txt @@ -1,13 +1,3 @@ -dash_flow_example==0.0.5 -dash-dangerously-set-inner-html -isort==4.3.21;python_version<"3.7" -mock==4.0.3 -flake8==3.9.2 -PyYAML==5.4.1 -pylint==2.10.2 -black==21.6b0 -fire==0.4.0 -coloredlogs==15.0.1 -flask-talisman==0.8.1 -orjson==3.3.1;python_version<"3.7" -orjson==3.6.1;python_version>="3.7" +coloredlogs>=15.0.1 +fire>=0.4.0 +PyYAML>=5.4.1 diff --git a/requires-diskcache-manager.txt b/requires-diskcache-manager.txt new file mode 100644 index 0000000000..457dd37270 --- /dev/null +++ b/requires-diskcache-manager.txt @@ -0,0 +1,3 @@ +diskcache>=5.2.1 +multiprocess>=0.70.12 +psutil>=5.8.0 diff --git a/requires-testing.txt b/requires-testing.txt index c347a404e9..65c7c5d6ad 100644 --- a/requires-testing.txt +++ b/requires-testing.txt @@ -1,16 +1,8 @@ -pytest>=6.0.2 -pytest-sugar>=0.9.4 -pytest-mock>=3.2.0 +beautifulsoup4>=4.8.2 +cryptography<3.4;python_version<"3.7" lxml>=4.6.2 -selenium>=3.141.0 percy>=2.0.2 -cryptography<3.4;python_version<"3.7" +pytest>=6.0.2 requests[security]>=2.21.0 -beautifulsoup4>=4.8.2 +selenium>=3.141.0 waitress>=1.4.4 -diskcache>=5.2.1 -multiprocess>=0.70.12 -redis>=3.5.3 -psutil>=5.8.0 -celery[redis]>=5.1.2 -flaky>=3.7.0 diff --git a/setup.py b/setup.py index 0757273c49..c824262a30 100644 --- a/setup.py +++ b/setup.py @@ -30,6 +30,8 @@ def read_req_file(req_type): extras_require={ "dev": read_req_file("dev"), "testing": read_req_file("testing"), + "celery-manager": read_req_file("celery-manager"), + "diskcache-manager": read_req_file("diskcache-manager"), }, entry_points={ "console_scripts": [ From bfc95ded0d2da89f29fcc81af43602ba2f4f5618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Fredrik=20Ki=C3=A6r?= <31612826+anders-kiaer@users.noreply.github.com> Date: Tue, 21 Sep 2021 17:46:09 +0200 Subject: [PATCH 2/6] Changes after review --- .circleci/config.yml | 27 +++++++++---------- dash/long_callback/managers/celery_manager.py | 2 +- .../managers/diskcache_manager.py | 20 +++++++++----- dash/testing/plugin.py | 20 ++++---------- requires-celery-manager.txt | 2 -- requires-celery.txt | 3 +++ requires-ci.txt | 1 + requires-dev.txt | 1 + requires-diskcache-manager.txt | 3 --- requires-diskcache.txt | 4 +++ requires-testing.txt | 1 + setup.py | 5 ++-- 12 files changed, 45 insertions(+), 44 deletions(-) delete mode 100644 requires-celery-manager.txt create mode 100644 requires-celery.txt delete mode 100644 requires-diskcache-manager.txt create mode 100644 requires-diskcache.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index e1941ef3d1..69c230e65d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,8 +43,7 @@ jobs: sudo pip install virtualenv --upgrade python -m venv venv && . venv/bin/activate set -eo pipefail - pip install -e .[testing,dev,celery-manager,diskcache-manager] --progress-bar off - pip install -r ./requires-ci.txt --progress-bar off + pip install -e .[ci,dev,testing,celery,diskcache] --progress-bar off pip list | grep dash npm i npm run build @@ -78,7 +77,7 @@ jobs: command: | sudo pip install --upgrade virtualenv --progress-bar off python -m venv venv || virtualenv venv && . venv/bin/activate - pip install -e .[dev,testing] --no-cache-dir -r requires-ci.txt --progress-bar off + pip install -e .[ci,dev,testing] --no-cache-dir --progress-bar off - save_cache: key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-dev.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }} paths: @@ -224,8 +223,7 @@ jobs: command: | . venv/bin/activate npm install --production - pip install --no-cache-dir --upgrade --ignore-installed dash-package/dash-package.tar.gz --progress-bar off - pip install -r requires-install.txt -r requires-ci.txt -r requires-dev.txt -r requires-testing.txt -r requires-celery-manager.txt -r requires-diskcache-manager.txt --progress-bar off + pip install --no-cache-dir --upgrade --ignore-installed dash-package/dash-package.tar.gz[ci,dev,testing,celery,diskcache] --progress-bar off sed -i '/dash/d' requires-install.txt pip list | grep dash - run: @@ -267,7 +265,7 @@ jobs: path: ~/dash - run: echo $PYTHON_VERSION > ver.txt - restore_cache: - key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "../../requires-ci.txt" }} + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }} - attach_workspace: at: ~/dash/components/dash-core-components - run: @@ -275,10 +273,10 @@ jobs: command: | sudo pip install virtualenv --upgrade python -m venv venv || virtualenv venv && . venv/bin/activate - pip install dash-package/dash-package.tar.gz[dev,testing] - pip install --progress-bar off --no-cache-dir -r dev-requirements.txt -r ../../requires-ci.txt + pip install dash-package/dash-package.tar.gz[ci,dev,testing] + pip install --progress-bar off --no-cache-dir -r dev-requirements.txt - save_cache: - key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "../../requires-ci.txt" }} + key: dep-{{ checksum ".circleci/config.yml" }}-{{ checksum "ver.txt" }}-{{ checksum "dev-requirements.txt" }} paths: - venv - run: @@ -422,8 +420,8 @@ jobs: sudo pip install virtualenv --upgrade python -m venv venv || virtualenv venv . venv/bin/activate - pip install dash-package/dash-package.tar.gz[dev,testing] - pip install -r dev-requirements.txt -r ../../requires-ci.txt + pip install dash-package/dash-package.tar.gz[ci,dev,testing] + pip install -r dev-requirements.txt npm ci - run: @@ -495,8 +493,7 @@ jobs: . venv/bin/activate pip install -r dev-requirements.txt --quiet pip install -r python-requirements.txt --quiet - pip install -r ../../requires-ci.txt - pip install dash-package/dash-package.tar.gz[dev,testing] + pip install dash-package/dash-package.tar.gz[ci,dev,testing] - run: name: Build command: | @@ -600,8 +597,8 @@ jobs: name: Install requirements command: | . venv/bin/activate - pip install -r dev-requirements.txt -r ../../requires-ci.txt --quiet - pip install dash-package/dash-package.tar.gz[dev,testing] + pip install -r dev-requirements.txt --quiet + pip install dash-package/dash-package.tar.gz[ci,dev,testing] - run: name: Run eslint diff --git a/dash/long_callback/managers/celery_manager.py b/dash/long_callback/managers/celery_manager.py index d01e163228..863daa6816 100644 --- a/dash/long_callback/managers/celery_manager.py +++ b/dash/long_callback/managers/celery_manager.py @@ -35,7 +35,7 @@ def __init__(self, celery_app, cache_by=None, expire=None): """\ CeleryLongCallbackManager requires extra dependencies which can be installed doing - $ pip install "dash[celery-manager]"\n""" + $ pip install "dash[celery]"\n""" ) from missing_imports if not isinstance(celery_app, celery.Celery): diff --git a/dash/long_callback/managers/diskcache_manager.py b/dash/long_callback/managers/diskcache_manager.py index 2cc1d7b51c..ec0c92f981 100644 --- a/dash/long_callback/managers/diskcache_manager.py +++ b/dash/long_callback/managers/diskcache_manager.py @@ -4,14 +4,15 @@ class DiskcacheLongCallbackManager(BaseLongCallbackManager): - def __init__(self, cache, cache_by=None, expire=None): + def __init__(self, cache=None, cache_by=None, expire=None): """ Long callback manager that runs callback logic in a subprocess and stores results on disk using diskcache :param cache: A diskcache.Cache or diskcache.FanoutCache instance. See the diskcache - documentation for information on configuration options. + documentation for information on configuration options. If not provided, + a diskcache.Cache instance will be created with default values. :param cache_by: A list of zero-argument functions. When provided, caching is enabled and the return values of these functions are combined with the callback @@ -30,13 +31,20 @@ def __init__(self, cache, cache_by=None, expire=None): """\ DiskcacheLongCallbackManager requires extra dependencies which can be installed doing - $ pip install "dash[diskcache-manager]"\n""" + $ pip install "dash[diskcache]"\n""" ) from missing_imports - if not isinstance(cache, (diskcache.Cache, diskcache.FanoutCache)): - raise ValueError("First argument must be a diskcache.Cache object") + if cache is None: + self.handle = diskcache.Cache() + else: + if not isinstance(cache, (diskcache.Cache, diskcache.FanoutCache)): + raise ValueError( + "First argument must be a diskcache.Cache " + "or diskcache.FanoutCache object" + ) + self.handle = cache + super().__init__(cache_by) - self.handle = cache self.expire = expire def terminate_job(self, job): diff --git a/dash/testing/plugin.py b/dash/testing/plugin.py index b9b02623ba..33cac6e292 100644 --- a/dash/testing/plugin.py +++ b/dash/testing/plugin.py @@ -189,18 +189,8 @@ def dashjl(request, dashjl_server, tmpdir): @pytest.fixture def diskcache_manager(): - try: - from dash.long_callback import ( # pylint: disable=import-outside-toplevel - DiskcacheLongCallbackManager, - ) - import diskcache # pylint: disable=import-outside-toplevel - except ImportError as missing_imports: - raise ImportError( - """\ -DiskcacheLongCallbackManager requires extra dependencies which can be installed doing - -$ pip install "dash[diskcache-manager]"\n""" - ) from missing_imports - - cache = diskcache.Cache() - return DiskcacheLongCallbackManager(cache) + from dash.long_callback import ( # pylint: disable=import-outside-toplevel + DiskcacheLongCallbackManager, + ) + + return DiskcacheLongCallbackManager() diff --git a/requires-celery-manager.txt b/requires-celery-manager.txt deleted file mode 100644 index 63851f1d52..0000000000 --- a/requires-celery-manager.txt +++ /dev/null @@ -1,2 +0,0 @@ -redis>=3.5.3 -celery[redis]>=5.1.2 diff --git a/requires-celery.txt b/requires-celery.txt new file mode 100644 index 0000000000..0696a73b3c --- /dev/null +++ b/requires-celery.txt @@ -0,0 +1,3 @@ +# Dependencies used by the CeleryLongCallbackManager +redis>=3.5.3 +celery[redis]>=5.1.2 diff --git a/requires-ci.txt b/requires-ci.txt index c2a64c8700..36b6ad67fc 100644 --- a/requires-ci.txt +++ b/requires-ci.txt @@ -1,3 +1,4 @@ +# Dependencies used by CI on github.com/plotly/dash black==21.6b0 dash-flow-example==0.0.5 dash-dangerously-set-inner-html diff --git a/requires-dev.txt b/requires-dev.txt index 4cd2da5f25..22a770dca3 100644 --- a/requires-dev.txt +++ b/requires-dev.txt @@ -1,3 +1,4 @@ +# Dependencies used for development new Dash components coloredlogs>=15.0.1 fire>=0.4.0 PyYAML>=5.4.1 diff --git a/requires-diskcache-manager.txt b/requires-diskcache-manager.txt deleted file mode 100644 index 457dd37270..0000000000 --- a/requires-diskcache-manager.txt +++ /dev/null @@ -1,3 +0,0 @@ -diskcache>=5.2.1 -multiprocess>=0.70.12 -psutil>=5.8.0 diff --git a/requires-diskcache.txt b/requires-diskcache.txt new file mode 100644 index 0000000000..59be4d2b79 --- /dev/null +++ b/requires-diskcache.txt @@ -0,0 +1,4 @@ +# Dependencies used by the DiskcacheLongCallbackManager +diskcache>=5.2.1 +multiprocess>=0.70.12 +psutil>=5.8.0 diff --git a/requires-testing.txt b/requires-testing.txt index 65c7c5d6ad..ee5aa609c4 100644 --- a/requires-testing.txt +++ b/requires-testing.txt @@ -1,3 +1,4 @@ +# Dependencies necessary for utilizing Dash provided testing utilities beautifulsoup4>=4.8.2 cryptography<3.4;python_version<"3.7" lxml>=4.6.2 diff --git a/setup.py b/setup.py index c824262a30..6c62c04f37 100644 --- a/setup.py +++ b/setup.py @@ -28,10 +28,11 @@ def read_req_file(req_type): install_requires=read_req_file("install"), python_requires=">=3.6", extras_require={ + "ci": read_req_file("ci"), "dev": read_req_file("dev"), "testing": read_req_file("testing"), - "celery-manager": read_req_file("celery-manager"), - "diskcache-manager": read_req_file("diskcache-manager"), + "celery": read_req_file("celery"), + "diskcache": read_req_file("diskcache"), }, entry_points={ "console_scripts": [ From ef6727cc4c1b5fcf0bbbae8fae4e074ae88e0eaa Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Sun, 26 Sep 2021 10:05:01 -0400 Subject: [PATCH 3/6] oops error in circleci config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 75dc5a3247..6bdf29e04d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -562,10 +562,10 @@ workflows: - build-windows-39 - - lint-unit-39 + - lint-unit-39: requires: - install-dependencies - - lint-unit-36 + - lint-unit-36: requires: - install-dependencies From 5d66cbe0c4d27fc3a1c1694553d48bb4f9d24b5b Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Mon, 27 Sep 2021 22:00:55 -0400 Subject: [PATCH 4/6] separate py36 install job --- .circleci/config.yml | 46 ++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6bdf29e04d..bf228843bd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,7 @@ jobs: path: ~/dash/dash-main destination: /tmp/dash-main - install-dependencies: + install-dependencies-39: &install-dependencies working_directory: ~/dash docker: - image: circleci/python:3.9.2-buster-node-browsers @@ -67,6 +67,18 @@ jobs: paths: - dash-package + install-dependencies-36: + <<: *install-dependencies + docker: + - image: circleci/python:3.6.13-stretch-node-browsers + auth: + username: dashautomation + password: $DASH_PAT_DOCKERHUB + environment: + PYLINTRC: .pylintrc + PYVERSION: python36 + PERCY_ENABLE: 0 + lint-unit-39: &lint-unit working_directory: ~/dash docker: @@ -558,63 +570,63 @@ workflows: version: 2 tests: jobs: - - install-dependencies + - install-dependencies-39 - build-windows-39 - lint-unit-39: requires: - - install-dependencies + - install-dependencies-39 - lint-unit-36: requires: - - install-dependencies + - install-dependencies-36 - test-39: requires: - - install-dependencies + - install-dependencies-39 - test-36: requires: - - install-dependencies + - install-dependencies-36 - dcc-lint-unit-39: requires: - - install-dependencies + - install-dependencies-39 - dcc-lint-unit-36: requires: - - install-dependencies + - install-dependencies-36 - dcc-build-dash-39: requires: - - install-dependencies + - install-dependencies-39 - dcc-test-39: requires: - - install-dependencies + - install-dependencies-39 - dcc-build-dash-39 - dcc-build-dash-36: requires: - - install-dependencies + - install-dependencies-36 - dcc-test-36: requires: - - install-dependencies + - install-dependencies-36 - dcc-build-dash-36 - html-python-39: requires: - - install-dependencies + - install-dependencies-39 - html-python-36: requires: - - install-dependencies + - install-dependencies-36 - table-node: requires: - - install-dependencies + - install-dependencies-39 - table-unit-test: requires: - - install-dependencies + - install-dependencies-39 - table-visual-test - table-server-test: requires: - - install-dependencies + - install-dependencies-39 - percy/finalize_all: requires: From 0378642fc33ca6fedf6359acfa11c26e3cfaf9b4 Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Mon, 27 Sep 2021 22:09:02 -0400 Subject: [PATCH 5/6] actually RUN the py36 install job --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index bf228843bd..cfc6904b9e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -571,6 +571,7 @@ workflows: tests: jobs: - install-dependencies-39 + - install-dependencies-36 - build-windows-39 From 0f2f92e7a799e0da8497fb6b1261add8e19028b1 Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Tue, 28 Sep 2021 09:50:32 -0400 Subject: [PATCH 6/6] changelog for #1745 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3633959675..2f9482d827 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] +- [#1745](https://github.com/plotly/dash/pull/1745): + Improve our `extras_require`: there are now five options here, each with a well-defined role: + - `dash[dev]`: for developing and building dash components. + - `dash[testing]`: for using the `pytest` plugins in the `dash.testing` module + - `dash[diskcache]`: required if you use `DiskcacheLongCallbackManager` + - `dash[celery]`: required if you use `CeleryLongCallbackManager` + - `dash[ci]`: mainly for internal use, these are additional requirements for the Dash CI tests, exposed for other component libraries to use a matching configuration. + - [#1779](https://github.com/plotly/dash/pull/1779): - Clean up our handling of serialization problems, including fixing `orjson` for Python 3.6 - Added the ability for `dash.testing` `percy_snapshot` methods to choose widths to generate.