Skip to content
Merged
Show file tree
Hide file tree
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
106 changes: 0 additions & 106 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,110 +228,6 @@ jobs:
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
docker:
- image: plotly/dashr:ci
auth:
username: dashautomation
password: $DASH_PAT_DOCKERHUB
environment:
PERCY_PARALLEL_TOTAL: -1
PYVERSION: python39
_R_CHECK_FORCE_SUGGESTS_: FALSE

steps:
- checkout
- run:
name: 🏭 clone and npm build core for R
command: |
python -m venv venv
. venv/bin/activate
npm ci
pip install --no-cache-dir --upgrade -e .[dev,testing] --progress-bar off
git clone --depth 1 https://github.com/plotly/dashR.git -b dev dashR
git clone --depth 1 https://github.com/plotly/dash-html-components.git
git clone --depth 1 https://github.com/plotly/dash-core-components.git
git clone --depth 1 https://github.com/plotly/dash-table.git
shopt -s extglob
cd dash-html-components; npm ci && npm run build; rm -rf !(.|..|DESCRIPTION|LICENSE.txt|LICENSE|NAMESPACE|.Rbuildignore|R|man|inst|vignettes|build)
cd ../dash-core-components; npm ci && npm run build; rm -rf !(.|..|DESCRIPTION|LICENSE.txt|LICENSE|NAMESPACE|.Rbuildignore|R|man|inst|vignettes|build)
cd ../dash-table; npm ci && npm run build; rm -rf !(.|..|DESCRIPTION|LICENSE.txt|LICENSE|NAMESPACE|.Rbuildignore|R|man|inst|vignettes|build); cd ..

- run:
name: 🎛 set environment variables
command: |
Rscript --vanilla \
-e 'dash_dsc <- read.dcf("dashR/DESCRIPTION")' \
-e 'cat(sprintf("export DASH_TARBALL=%s_%s.tar.gz\n", dash_dsc[,"Package"], dash_dsc[,"Version"]))' \
-e 'cat(sprintf("export DASH_CHECK_DIR=%s.Rcheck\n", dash_dsc[,"Package"]))' \
-e 'dhc_dsc <- read.dcf("dash-html-components/DESCRIPTION")' \
-e 'cat(sprintf("export DHC_TARBALL=%s_%s.tar.gz\n", dhc_dsc[,"Package"], dhc_dsc[,"Version"]))' \
-e 'cat(sprintf("export DHC_CHECK_DIR=%s.Rcheck\n", dhc_dsc[,"Package"]))' \
-e 'dcc_dsc <- read.dcf("dash-core-components/DESCRIPTION")' \
-e 'cat(sprintf("export DCC_TARBALL=%s_%s.tar.gz\n", dcc_dsc[,"Package"], dcc_dsc[,"Version"]))' \
-e 'cat(sprintf("export DCC_CHECK_DIR=%s.Rcheck\n", dcc_dsc[,"Package"]))' \
-e 'dt_dsc <- read.dcf("dash-table/DESCRIPTION")' \
-e 'cat(sprintf("export DT_TARBALL=%s_%s.tar.gz\n", dt_dsc[,"Package"], dt_dsc[,"Version"]))' \
-e 'cat(sprintf("export DT_CHECK_DIR=%s.Rcheck\n", dt_dsc[,"Package"]))' \
>> ${BASH_ENV}

- run:
name: ️📋 run CRAN package checks
command: |
R CMD build dash-core-components
R CMD build dash-html-components
R CMD build dash-table
R CMD build dashR
sudo R CMD INSTALL dash-core-components
sudo R CMD INSTALL dash-html-components
sudo R CMD INSTALL dash-table
sudo R CMD INSTALL dashR
R CMD check "${DHC_TARBALL}" --as-cran --no-manual
R CMD check "${DCC_TARBALL}" --as-cran --no-manual
R CMD check "${DT_TARBALL}" --as-cran --no-manual
R CMD check "${DASH_TARBALL}" --as-cran --no-manual

- run:
name: 🕵 detect failures
command: |
Rscript -e "message(devtools::check_failures(path = '${DHC_CHECK_DIR}'))"
Rscript -e "message(devtools::check_failures(path = '${DCC_CHECK_DIR}'))"
Rscript -e "message(devtools::check_failures(path = '${DT_CHECK_DIR}'))"
Rscript -e "message(devtools::check_failures(path = '${DASH_CHECK_DIR}'))"
# warnings are errors; enabled for stricter CRAN checks, disable if noisy
# if grep -q -R "WARNING" "${DHC_CHECK_DIR}/00check.log"; then exit 1; fi
# if grep -q -R "WARNING" "${DCC_CHECK_DIR}/00check.log"; then exit 1; fi
# if grep -q -R "WARNING" "${DT_CHECK_DIR}/00check.log"; then exit 1; fi
# if grep -q -R "WARNING" "${DASH_CHECK_DIR}/00check.log"; then exit 1; fi

- run:
name: 🔎 run unit tests
command: |
# 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)}'

- run:
name: ⚙️ Integration tests
command: |
python -m venv venv
. venv/bin/activate
npm run setup-tests.R
export PATH=$PATH:/home/circleci/.local/bin/
pytest --nopercyfinalize --junitxml=test-reports/dashr.xml dashR/tests/integration/dopsa/
- store_artifacts:
path: test-reports
- store_test_results:
path: test-reports
- store_artifacts:
path: /tmp/dash_artifacts
- run:
name: 🦔 percy finalize
command: npx percy finalize --all
when: on_fail


test-39: &test
working_directory: ~/dash
docker:
Expand Down Expand Up @@ -407,14 +303,12 @@ workflows:
- build-core-39
- build-windows-39
- build-misc-39
- build-dashr
- test-39:
requires:
- build-core-39
- build-misc-39
- percy-finalize:
requires:
- build-dashr
- test-39
- artifacts:
requires:
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint
5 changes: 0 additions & 5 deletions .huskyrc

This file was deleted.

1 change: 1 addition & 0 deletions .pylintrc39
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ disable=invalid-name,
buffer-builtin,
cmp-builtin,
coerce-builtin,
consider-using-with,
execfile-builtin,
file-builtin,
long-builtin,
Expand Down
Loading