Skip to content

Commit 96e547f

Browse files
committed
add optional ci flag
1 parent 3f61e29 commit 96e547f

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
pip install -e .[ci,dev,testing,celery,diskcache] --progress-bar off
5555
pip list | grep dash
5656
npm ci
57-
npm run build
57+
npm run cibuild
5858
python setup.py sdist
5959
mkdir dash-package && cp dist/*.tar.gz dash-package/dash-package.tar.gz
6060
ls -la dash-package
@@ -112,7 +112,7 @@ jobs:
112112
set -eo pipefail
113113
pip install -e . --progress-bar off && pip list | grep dash
114114
npm ci npm run initialize
115-
npm run build
115+
npm run cibuild
116116
npm run lint
117117
- run:
118118
name: 🐍 Python Unit Tests & ☕ JS Unit Tests

dash/development/update_components.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class _CombinedFormatter(
2020
)
2121

2222

23-
def booststrap_components(components_source):
23+
def booststrap_components(components_source, install_type):
2424

2525
is_windows = sys.platform == "win32"
2626

@@ -31,7 +31,7 @@ def booststrap_components(components_source):
3131
)
3232

3333
cmd = shlex.split(
34-
"npx lerna exec --scope *@({})* -- npm ci".format(source_glob),
34+
"npx lerna exec --scope *@({})* -- npm {}".format(source_glob, install_type),
3535
posix=not is_windows,
3636
)
3737

@@ -146,10 +146,15 @@ def cli():
146146
help="A glob string that matches the Dash component libraries to be updated (eg.'dash-table' // 'dash-core-components|dash-html-components' // 'all'). The default argument is 'all'.",
147147
default="all",
148148
)
149+
parser.add_argument(
150+
"--ci",
151+
help="For clean-install use '--ci True'",
152+
default="False",
153+
)
149154

150155
args = parser.parse_args()
151156

152-
booststrap_components(args.components_source)
157+
booststrap_components(args.components_source, "ci" if args.ci == "True" else "i")
153158
build_components(args.components_source)
154159

155160

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"private::format.black": "black dash tests --exclude metadata_test.py",
66
"private::format.renderer": "cd dash/dash-renderer && npm run format",
77
"private::initialize.renderer": "cd dash/dash-renderer && npm ci",
8+
"private::cibuild.components": "python dash/development/update_components.py 'all' --ci True",
89
"private::build.components": "python dash/development/update_components.py 'all'",
10+
"private::cibuild.renderer": "cd dash/dash-renderer && renderer build",
911
"private::build.renderer": "cd dash/dash-renderer && renderer build",
1012
"private::lint.black": "black dash tests --exclude metadata_test.py --check",
1113
"private::lint.flake8": "flake8 --exclude=metadata_test.py dash tests",
@@ -25,6 +27,7 @@
2527
"private::test.unit-renderer": "cd dash/dash-renderer && npm run test",
2628
"private::test.integration-dash": "TESTFILES=$(circleci tests glob \"tests/integration/**/test_*.py\" | circleci tests split --split-by=timings) && pytest --headless --nopercyfinalize --junitxml=test-reports/junit_intg.xml ${TESTFILES}",
2729
"private::test.integration-dash-import": "cd tests/integration/dash && python dash_import_test.py",
30+
"cibuild": "run-s private::cibuild.*",
2831
"build": "run-s private::build.*",
2932
"format": "run-s private::format.*",
3033
"initialize": "run-s private::initialize.*",

0 commit comments

Comments
 (0)