Skip to content

Remove UltraNest and PySwarms, clean up search tests#1191

Merged
Jammy2211 merged 1 commit intomain_buildfrom
feature/search-remove-ultranest-pyswarms
Apr 9, 2026
Merged

Remove UltraNest and PySwarms, clean up search tests#1191
Jammy2211 merged 1 commit intomain_buildfrom
feature/search-remove-ultranest-pyswarms

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

Remove UltraNest and PySwarms search implementations from PyAutoFit to simplify the codebase and reduce dependencies. Both are archived in the new autofit_workspace_developer repo with runnable examples. Also adds Nautilus test coverage, expands abstract search tests, and fixes Nautilus copy-paste docstring bugs.

Closes #1190

API Changes

Three public symbols removed from the autofit namespace:

  • af.UltraNest — use autofit_workspace_developer/searches/ultranest/ if needed
  • af.PySwarmsGlobal — use autofit_workspace_developer/searches/pyswarms/ if needed
  • af.PySwarmsLocal — use autofit_workspace_developer/searches/pyswarms/ if needed

One hard dependency removed: pyswarms==1.3.0 no longer required at install time.
One optional dependency removed: ultranest==4.3.2.

See full details below.

Test Plan

  • All 1205 unit tests pass (pytest test_autofit/)
  • python -c "import autofit as af" succeeds
  • af.UltraNest, af.PySwarmsGlobal, af.PySwarmsLocal raise AttributeError
  • grep -ri "ultranest\|pyswarms" autofit/ test_autofit/ returns zero matches
  • Downstream workspace cleanup (separate follow-up)
Full API Changes (for automation & release notes)

Removed

  • autofit.UltraNest — UltraNest nested sampling search class
  • autofit.PySwarmsGlobal — PySwarms global-best particle swarm optimizer
  • autofit.PySwarmsLocal — PySwarms local-best particle swarm optimizer
  • pyswarms==1.3.0 from [project.dependencies]
  • ultranest==4.3.2 from [project.optional-dependencies]
  • Config blocks: UltraNest from nest.yaml, PySwarmsGlobal/PySwarmsLocal from mle.yaml

Added

  • test_autofit/non_linear/search/nest/test_nautilus.py — 3 new Nautilus config tests
  • 5 new tests in test_abstract_search.py — config dict access, unique_tag, path_prefix, identifier fields

Changed Behaviour

  • autofit/non_linear/search/nest/nautilus/search.py — fixed docstrings that incorrectly referenced "ultranest"
  • docs/features/interpolate.rst — fixed URL that pointed to UltraNest docs instead of Dynesty

Migration

  • Before: search = af.UltraNest(min_num_live_points=400)
  • After: Use Dynesty or Nautilus instead: search = af.DynestyStatic(nlive=400) or search = af.Nautilus(n_live=400)
  • For advanced users who need UltraNest/PySwarms: install from autofit_workspace_developer repo

🤖 Generated with Claude Code

Remove UltraNest and PySwarms from the non-linear search package to
simplify the codebase. Both implementations are preserved in the new
autofit_workspace_developer repo with runnable examples.

- Delete ultranest/ and pyswarms/ source directories
- Remove imports, dependencies, configs, docs, and citations
- Fix Nautilus docstrings that incorrectly referenced UltraNest
- Add Nautilus config loading tests (previously untested)
- Expand abstract search test coverage

Closes #1190

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main_build@655b629). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             main_build    #1191   +/-   ##
=============================================
  Coverage              ?   80.23%           
=============================================
  Files                 ?      202           
  Lines                 ?    15787           
  Branches              ?        0           
=============================================
  Hits                  ?    12666           
  Misses                ?     3121           
  Partials              ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Jammy2211 Jammy2211 merged commit 258fa88 into main_build Apr 9, 2026
3 checks passed
@Jammy2211 Jammy2211 deleted the feature/search-remove-ultranest-pyswarms branch April 9, 2026 09:35
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