Skip to content

Minor changes to fix uv sync - #493

Draft
oerc0122 wants to merge 1 commit into
masterfrom
fix-uv-sync
Draft

Minor changes to fix uv sync#493
oerc0122 wants to merge 1 commit into
masterfrom
fix-uv-sync

Conversation

@oerc0122

Copy link
Copy Markdown
Collaborator

This seems to fix the uv sync issues and should be fully portable.

Issues:

  • Test on different setups
  • Whether to remove duplicate test group/dep.

@oerc0122
oerc0122 requested a review from ajjackson April 29, 2026 14:07
@oerc0122 oerc0122 self-assigned this Apr 29, 2026
@oerc0122 oerc0122 added the bug Something isn't working label Apr 29, 2026
@github-actions

github-actions Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4358 4279 98% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 134da71 by action🐍

@github-actions

github-actions Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Test Results

   22 files   -     25     22 suites   - 25   19m 58s ⏱️ - 28m 30s
1 118 tests ±     0  1 112 ✅ ±     0   6 💤 ± 0  0 ❌ ±0 
9 975 runs   - 16 609  9 918 ✅  - 16 519  57 💤  - 90  0 ❌ ±0 

Results for commit 134da71. ± Comparison against base commit 9a15150.

♻️ This comment has been updated with latest results.

@ajjackson

Copy link
Copy Markdown
Member

I'm still running into trouble here. Do you have suggested incantation to use this in a clean environment?

FROM python:3.14

RUN pip install uv

RUN git clone --branch fix-uv-sync --single-branch https://github.com/pace-neutrons/euphonic.git /opt/

WORKDIR /opt/euphonic

# This would be nice
# RUN uv sync
# RUN uv sync --upgrade

# But even this is failing
RUN bash -c 'uv venv && source .venv/bin/activate && uv sync --active --no-editable'
RUN bash -c  'source .venv/bin/activate && uv sync --active --no-editable --upgrade'

@ajjackson

Copy link
Copy Markdown
Member

Making a record from side chat: the problem seems to be the dynamic versioning which causes an editable install. If that is removed, things work:

FROM python:3.14

RUN pip install uv

RUN git clone --branch fix-uv-sync --single-branch https://github.com/pace-neutrons/euphonic.git /opt/euphonic

WORKDIR /opt/euphonic

RUN ls /opt && pwd && ls .
RUN sed -i 's/dynamic = \["version"\]//' pyproject.toml
RUN sed -i 's/name = "Euphonic"/name = "Euphonic"\nversion = "1.8.0"/' pyproject.toml
RUN cat pyproject.toml

RUN uv sync
RUN uv sync --upgrade

But we like the dynamic versioning because it means we can tell if a JSON dump came from a development build between full version tags.

@ajjackson

Copy link
Copy Markdown
Member

This uv issue was the hint we needed, to understand "why" editable builds were running even when under --no-editable astral-sh/uv#10996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants