fix(linkedin): conservative settings merge, mkdir guard, split dockerfile playwright layer
This commit is contained in:
parent
a2778cc25d
commit
098115b4cc
2 changed files with 10 additions and 5 deletions
|
|
@ -10,9 +10,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt && \
|
# Install Python dependencies
|
||||||
playwright install chromium && \
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
playwright install-deps chromium
|
|
||||||
|
# Install Playwright browser (cached separately from Python deps so requirements
|
||||||
|
# changes don't bust the ~600–900 MB Chromium layer and vice versa)
|
||||||
|
RUN playwright install chromium && playwright install-deps chromium
|
||||||
|
|
||||||
# Bundle companyScraper (company research web scraper)
|
# Bundle companyScraper (company research web scraper)
|
||||||
COPY scrapers/ /app/scrapers/
|
COPY scrapers/ /app/scrapers/
|
||||||
|
|
|
||||||
|
|
@ -592,9 +592,11 @@ with tab_resume:
|
||||||
# ── LinkedIn import ───────────────────────────────────────────────────────
|
# ── LinkedIn import ───────────────────────────────────────────────────────
|
||||||
_li_data = st.session_state.pop("_linkedin_extracted", None)
|
_li_data = st.session_state.pop("_linkedin_extracted", None)
|
||||||
if _li_data:
|
if _li_data:
|
||||||
# Merge imported data into resume YAML
|
# Merge imported data into resume YAML — only bootstrap empty fields,
|
||||||
|
# never overwrite existing detail with sparse LinkedIn data
|
||||||
existing = load_yaml(RESUME_PATH)
|
existing = load_yaml(RESUME_PATH)
|
||||||
existing.update({k: v for k, v in _li_data.items() if v})
|
existing.update({k: v for k, v in _li_data.items() if v and not existing.get(k)})
|
||||||
|
RESUME_PATH.parent.mkdir(parents=True, exist_ok=True)
|
||||||
save_yaml(RESUME_PATH, existing)
|
save_yaml(RESUME_PATH, existing)
|
||||||
st.success("LinkedIn data applied to resume profile.")
|
st.success("LinkedIn data applied to resume profile.")
|
||||||
st.rerun()
|
st.rerun()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue