Skip to content
/ Dash.jl Public
  • Sponsor plotly/Dash.jl

  • Notifications You must be signed in to change notification settings
  • Fork 42

Update docker image [final] #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
version: 2
version: 2.1

orbs:
percy: percy/agent@0.1.3
browser-tools: circleci/browser-tools@1.2.4

jobs:

test:
working_directory: ~/dashjl
docker:
- image: plotly/julia:ci
- image: etpinard/dashjl-tests:0.3.0
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
@@ -15,6 +19,8 @@ jobs:
steps:
- checkout

- browser-tools/install-browser-tools

- run:
name: ℹ️ CI Context
command: |
@@ -37,8 +43,9 @@ jobs:
command: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip wheel
git clone --depth 1 https://github.com/plotly/dash.git -b dev dash-main
cd dash-main && pip install -e .[dev,testing] --progress-bar off && cd ~/dashjl
cd dash-main && pip install -e .[ci,dev,testing] --progress-bar off && cd ..
export PATH=$PATH:/home/circleci/.local/bin/
pytest --headless --nopercyfinalize --junitxml=test-reports/dashjl.xml --percy-assets=test/assets/ test/integration/
- store_artifacts:
@@ -48,13 +55,11 @@ jobs:
- store_artifacts:
path: /tmp/dash_artifacts

- run:
name: 🦔 percy finalize
command: npx percy finalize --all

workflows:
version: 2
build:
jobs:
- "test"
when: false # disable this workflow until Percy tests are functional again
- test
- percy/finalize_all:
requires:
- test
8 changes: 4 additions & 4 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM circleci/python:3.7-stretch-node-browsers
MAINTAINER Ryan Patrick Kyle "ryan@plotly.com"
FROM cimg/python:3.9.9-browsers
MAINTAINER Etienne Tétreault-Pinard "code@etpinard.xyz"

RUN sudo apt-get update \
&& sudo apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false

RUN cd /usr/local/src \
&& sudo mkdir /usr/local/src/julia \
&& sudo curl -o julia.tar.gz --location --show-error \
https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.1-linux-x86_64.tar.gz \
https://julialang-s3.julialang.org/bin/linux/x64/1.9/julia-1.9.1-linux-x86_64.tar.gz \
&& sudo tar --extract --gzip --strip 1 --directory=/usr/local/src/julia --file=julia.tar.gz \
&& sudo ln -s /usr/local/src/julia/bin/julia /usr/local/bin/julia
&& sudo ln -s /usr/local/src/julia/bin/julia /usr/local/bin/julia
Original file line number Diff line number Diff line change
@@ -13,10 +13,11 @@ callback!(app,
) do value
cookie = HTTP.Cookie("dash_cookie", value * " - cookie")

println(String(cookie, false))
cookie_str = HTTP.Cookies.stringify(cookie)
println(cookie_str)
http_response = callback_context().response
push!(http_response.headers, "Set-Cookie"=>String(cookie, false))
push!(http_response.headers, "Set-Cookie"=>cookie_str)
return value * " - output"
end

run_server(app)
run_server(app)
4 changes: 2 additions & 2 deletions test/integration/callbacks/test_callback_context.py
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ def test_jlcbcx001_modified_response(dashjl):
dashjl.wait_for_text_to_equal("#output", "abcd - output")
cookie = dashjl.driver.get_cookie("dash_cookie")
# cookie gets json encoded
assert cookie["value"] == 'abcd - cookie'
assert cookie["value"] == '"abcd - cookie"'

assert not dashjl.get_logs()

@@ -34,4 +34,4 @@ def test_jlcbcx002_triggered(dashjl):
dashjl.find_element("#" + btn).click()
dashjl.wait_for_text_to_equal(
"#output", "Just clicked {} for the {} time!".format(btn, i)
)
)