Skip to content

Add Python 3.13 to devcontainer to support latest nf-core tools - #683

Merged
pinin4fjords merged 2 commits into
masterfrom
fix/python-3.13-for-nf-core
Oct 21, 2025
Merged

pinin4fjords merged 2 commits into
masterfrom
fix/python-3.13-for-nf-core

Conversation

@pinin4fjords

Copy link
Copy Markdown
Collaborator

Problem

The devcontainer configuration was unable to install the latest version of nf-core tools. When uv tool install nf-core ran, it was using Ubuntu 22.04's system Python 3.10 to create the isolated environment, which limited it to installing only versions of nf-core compatible with Python 3.10. If the latest nf-core requires Python 3.13, an older version would be installed instead.

Solution

This PR adds the official ghcr.io/devcontainers/features/python:1 feature with version 3.13 to both the codespaces-dev and local-dev devcontainer configurations. By installing Python 3.13 early in the feature installation order (before uv), we ensure that when uv tool install nf-core runs, it will:

  1. Find Python 3.13 as the system Python
  2. Create the isolated environment with Python 3.13
  3. Install the latest version of nf-core that requires Python 3.13

Changes

Design Rationale

This approach aligns with the native installation philosophy introduced in #609:

  • Uses native Python installation (via devcontainer feature) rather than conda
  • Keeps conda available exclusively for pipeline execution within training materials
  • Avoids hardcoding paths or pinning specific tool versions
  • Ensures uv automatically gets the latest compatible nf-core version

Testing

The changes should be tested by:

  1. Rebuilding the devcontainer
  2. Verifying Python version: python --version (should show 3.13.x)
  3. Checking nf-core installation: nf-core --version (should show latest version)
  4. Confirming uv is using Python 3.13: /root/.local/share/uv/tools/nf-core/bin/python --version

Related to #609

Adds the official Python devcontainer feature (version 3.13) to both
codespaces-dev and local-dev configurations. This ensures that when
uv installs nf-core tools, it uses Python 3.13 and can install the
latest version of nf-core that requires this Python version.

Previously, uv was falling back to Ubuntu 22.04's system Python 3.10,
which meant it could only install older versions of nf-core that were
compatible with Python 3.10.

Also updates the uv-tools feature to declare it installs after the
Python feature, ensuring proper installation order.

This change aligns with the native installation philosophy introduced
in PR #609, using native Python installation rather than conda for
dev container tooling, while keeping conda available for pipeline
execution within training materials.

Related to #609

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 21, 2025

Copy link
Copy Markdown

Deploy Preview for nextflow-training ready!

Name Link
🔨 Latest commit 5ad9ece
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-training/deploys/68f75d4d5542a60008f6a7f2
😎 Deploy Preview https://deploy-preview-683--nextflow-training.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pinin4fjords

Copy link
Copy Markdown
Collaborator Author

Note: build logs now show correct version of nf-core tools, so I'm pretty sure this has worked

@kenibrewer kenibrewer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@pinin4fjords
pinin4fjords merged commit 718ff42 into master Oct 21, 2025
8 checks passed
@pinin4fjords
pinin4fjords deleted the fix/python-3.13-for-nf-core branch October 21, 2025 12:51
@pinin4fjords

Copy link
Copy Markdown
Collaborator Author

Thanks @kenibrewer !

pinin4fjords added a commit that referenced this pull request Nov 25, 2025
PR #683 enabled automatic installation of the latest nf-core version
by adding Python 3.13 support. While this approach ensures access to
new features, pinning to a specific version provides consistency
for training environments where reproducible behavior is important.

Related to #683

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
pinin4fjords added a commit that referenced this pull request Nov 25, 2025
* Pin nf-core to 3.4.1 for training stability

PR #683 enabled automatic installation of the latest nf-core version
by adding Python 3.13 support. While this approach ensures access to
new features, pinning to a specific version provides consistency
for training environments where reproducible behavior is important.

Related to #683

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix check-headings workflow to run on all PRs

The workflow was only triggered when markdown files changed, causing
it to be skipped entirely for non-markdown PRs. Since check-headings
is a required status check, this blocked PRs that didn't touch markdown.

Now the workflow runs on all PRs but conditionally skips the actual
check when no markdown files have changed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants