separate node and python build steps in dash-generate-components
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
Links for building custom components for reference:
https://dash.plotly.com/plugins
https://github.com/plotly/dash-component-boilerplate
Is your feature request related to a problem? Please describe.
Building custom dash components requires nodejs + python at the same time. It complicates CI pipeline, since it's not possible to use docker's node and python images separately, but you have to make a custom docker image with both
my Dockerfile for reference
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install nodejs npm python3 python3-pip -y && \
node --version && \
python3 --version && \
python3 -m pip install "dash[dev]>=1.3.1"
COPY ./custom_dash_components/package.json /src/custom_dash_components/
COPY ./custom_dash_components/package-lock.json /src/custom_dash_components/
WORKDIR /src/custom_dash_components/
RUN npm i
COPY ./custom_dash_components/ /src/custom_dash_components/
RUN npm run build:js && npm run build:py
build:py is dash-generate-components ./src/lib/components custom_dash_components -p package-info.json
Describe the solution you'd like
I think it's possible to separate nodejs and python build steps, so
- nodejs step would build js code and generate metadata file
- python step would take metadata file as a cmd arg and generate python code
Describe alternatives you've considered
Another option is to generate python code in nodejs, so python is not required, but I'd guess that's harder to implement
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with dash/development/component_generator.py around lines 55-90 and the dash-generate-components command shown in the issue. Trace how the current build consumes JavaScript output and produces Python code, then define the metadata handoff between the Node.js and Python steps. Done means the two steps can run in separate environments while generating the same custom component artifacts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, python
- Domain
- build-system, cli, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100