Skip to content

Auto-provision FastTree so macOS doesn't need conda at all - #12

Merged
AlexWindels merged 1 commit into
mainfrom
feat/auto-provision-fasttree
Aug 11, 2026
Merged

Auto-provision FastTree so macOS doesn't need conda at all#12
AlexWindels merged 1 commit into
mainfrom
feat/auto-provision-fasttree

Conversation

@AlexWindels

Copy link
Copy Markdown
Collaborator

Closes the gap the user hit right after #10/#11: CANDy now correctly selects fasttree by default on Macs without a working veryfasttree, but fasttree itself still required conda -- and they don't have conda installed.

Summary

New candy.phylogenetics.fasttree_download module, mirroring the existing MMseqs2 auto-download pattern, pinned to a specific commit of github.com/morgannprice/fasttree for reproducibility:

  • Linux/Windows: download the precompiled binary published directly in that repository.
  • macOS: no precompiled binary is published upstream at all (confirmed), but FastTree.c is a single, dependency-free C file -- download it and compile locally with whatever C compiler is already present (Xcode Command Line Tools' clang, on essentially every real Mac), using the upstream-documented flags that deliberately avoid the OpenMP requirement that broke veryfasttree's own build (-fopenmp-simd, not -fopenmp -- no libomp runtime needed).

Resolution order: PATH, then local cache, then auto-provision (disable via CANDY_NO_AUTO_DOWNLOAD, same env var as MMseqs2). FastTreeBuilder now delegates to this instead of requiring PATH with a hard failure pointing at conda.

Test plan

  • pytest -- 142 passed (10 new tests in test_fasttree_download.py: PATH/cache preference, disabled-download error, download-failure handling, precompiled download on Linux/Windows, compile-from-source on macOS, missing-compiler error, compile-failure error; 1 marked @pytest.mark.integration)
  • Verified for real, not just mocked: ran the actual resolution against the live pinned commit on this Windows machine -- downloaded the real FastTree.exe, ran -help, got FastTree 2.2.0 Double precision, exit code 0
  • python -m build + confirmed fasttree_download.py is included in the built wheel
  • Reviewer: confirm CI passes on this PR (can't verify the macOS compile path myself -- no macOS runner/machine available to me)

A real user upgraded past the previous fixes (#10, #11) and hit the
next wall: CANDy correctly defaults to --tree-tool fasttree on their
Mac now, but fasttree itself still required conda -- which they don't
have installed. Close that gap the same way MMseqs2 already avoids
needing conda: auto-provision the binary on first use.

New candy.phylogenetics.fasttree_download module, pinned to a specific
commit of github.com/morgannprice/fasttree for reproducibility:
- Linux/Windows: download the precompiled binary published directly in
  that repository.
- macOS: no precompiled binary is published upstream at all, but
  FastTree.c is a single, dependency-free C file -- download it and
  compile it locally with whatever C compiler is already present
  (Xcode Command Line Tools' clang on essentially every real Mac),
  deliberately using the upstream-documented flags that avoid the
  OpenMP requirement that broke veryfasttree's own build (no -fopenmp,
  only -fopenmp-simd, which doesn't need the libomp runtime).

Resolution order matches MMseqs2's established pattern: PATH, then the
local cache, then auto-download/compile (disable via
CANDY_NO_AUTO_DOWNLOAD, same as before). FastTreeBuilder now delegates
to this instead of requiring PATH + a hard failure pointing at conda.

Verified for real: the Windows download path was exercised live (not
just mocked) against the actual pinned commit -- downloaded FastTree.exe
and ran it successfully (FastTree 2.2.0, exit code 0, real --help
output).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@AlexWindels
AlexWindels merged commit ada2ee2 into main Aug 11, 2026
6 checks passed
@AlexWindels
AlexWindels deleted the feat/auto-provision-fasttree branch August 11, 2026 08:38
AlexWindels pushed a commit that referenced this pull request Aug 11, 2026
Patch release: auto-provision FastTree (download on Linux/Windows,
compile-from-source on macOS) so it no longer requires conda (#12).

Co-Authored-By: Claude Sonnet 5 <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.

1 participant