Skip to content

Use setuptools_scm while building docs in conda env#684

Merged
MridulS merged 3 commits intomainfrom
doc_version
Mar 6, 2026
Merged

Use setuptools_scm while building docs in conda env#684
MridulS merged 3 commits intomainfrom
doc_version

Conversation

@MridulS
Copy link
Member

@MridulS MridulS commented Mar 6, 2026

This should fix #681

From the doc building logs:

Run pip install --no-build-isolation --no-deps -e .
Obtaining file:///home/runner/work/scippneutron/scippneutron
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: scippneutron
  Building editable for scippneutron (pyproject.toml): started
  Building editable for scippneutron (pyproject.toml): finished with status 'done'
  Created wheel for scippneutron: filename=scippneutron-0.0.0-0.editable-py3-none-any.whl size=3129 sha256=67ffb72fef301d74a797caad8f45ff3c9885e0f6ebc49fed41307ef1256ec454
  Stored in directory: /tmp/pip-ephem-wheel-cache-nzh6pk50/wheels/46/f1/29/9b243e50188e62de92e5ae7272f91a4df2ee9865c4eef827e6
Successfully built scippneutron
Installing collected packages: scippneutron
Successfully installed scippneutron-0.0.0

This is happening as there is no setuptools_scm in the conda env.

@MridulS
Copy link
Member Author

MridulS commented Mar 6, 2026

Docs CI builds with the correct version number:

Run pip install --no-build-isolation --no-deps -e .
Obtaining file:///home/runner/work/scippneutron/scippneutron
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: scippneutron
  Building editable for scippneutron (pyproject.toml): started
  Building editable for scippneutron (pyproject.toml): finished with status 'done'
  Created wheel for scippneutron: filename=scippneutron-26.2.1.dev20+gbb2381cd4-0.editable-py3-none-any.whl size=3376 sha256=6b1007f5395fe4cd489c8a391fc0c9926dc61c7e1998a08e283e1cab1b52a41a
  Stored in directory: /tmp/pip-ephem-wheel-cache-gla7pmdu/wheels/46/f1/29/9b243e50188e62de92e5ae7272f91a4df2ee9865c4eef827e6
Successfully built scippneutron
Installing collected packages: scippneutron
Successfully installed scippneutron-26.2.1.dev20+gbb2381cd4

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised this is required because we list setuptools_scm in the build requirements. So when we call pip install --no-deps, does that not even install build requirements?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check a release build? We have some logic in CI that installs scippneutron from conda in some cases. Does it get the correct version then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we even have that logic? The release action also triggers the same pip install --no-build-isolation --no-deps -e . step, there is no version passed in manually. setuptools_scm picks it from the tag.

I tried to manually trigger the logic for fetching scippneutron from conda-forge https://github.com/scipp/scippneutron/actions/runs/22759040133/job/66010787060, and the docs look okay too https://remote-unzip.deno.dev/scipp/scippneutron/artifacts/5795735768/

But I'm not sure where we are using this unless explicitly trigged by a workflow_dispatch.

Maybe it got lost in the many translations?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a left over from when we rebuilt the docs for the previous version on release to insert a banner linking to the latest version. My guess is that we no longer need it.

@MridulS MridulS merged commit 403fcea into main Mar 6, 2026
8 of 10 checks passed
@MridulS MridulS deleted the doc_version branch March 6, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version in docs is wrong

2 participants