Skip to content

docs: add PySR v1 to v2 migration guide - #1302

Merged
MilesCranmer merged 3 commits into
astroautomata:masterfrom
MilesCranmerBot:pysr-v2-migration-guide
Aug 22, 2026
Merged

docs: add PySR v1 to v2 migration guide#1302
MilesCranmer merged 3 commits into
astroautomata:masterfrom
MilesCranmerBot:pysr-v2-migration-guide

Conversation

@MilesCranmerBot

@MilesCranmerBot MilesCranmerBot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a "Migrating from v1" page covering the PySR v2 upgrade: changed search defaults (adaptive parsimony, batching, annealing, crossover probability, turbo defaults), renamed kwargs with deprecation shims, removed APIs (ParametricExpressionSpec and friends) with their replacements, and the new TypeSpec/template expression workflow.

The guide is linked at the end of the docs sidebar under Advanced.

This PR is documentation-only; no runtime code changes.

Closes #638

Document changed search defaults, removed expression APIs, checkpoint recovery, compatibility shims, and new v2 interfaces. Add regression coverage for the retained v1 keyword mappings.

Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

MilesCranmerBot and others added 2 commits August 21, 2026 21:47
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@MilesCranmer
MilesCranmer enabled auto-merge (squash) August 22, 2026 00:14
@MilesCranmer
MilesCranmer merged commit b0bb321 into astroautomata:master Aug 22, 2026
23 checks passed
@MilesCranmerBot

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b0bb321451

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/src/migration.md

## Environment changes

- The minimum versions remain Python 3.9 and Julia 1.10.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Correct the Python minimum-version change

PySR v1.5.9 declared requires-python = ">=3.8", while the current v2 package declares >=3.9, so the Python minimum did not remain unchanged. This tells Python 3.8 users that their environment is still supported even though installing v2 there will be rejected; document the increase from 3.8 to 3.9 instead.

Useful? React with 👍 / 👎.

Comment thread docs/src/migration.md
with `plugins=`. See the [API reference](api.md#mutations).
- **Custom value types:** `TypeSpec` supports expressions over strings, vectors,
tensors, structs, and other Julia value types. See
[Custom value types](examples.md#custom-value-types).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Point the custom-value link at the numbered heading

The target heading in examples.md is ## 14. Custom value types, so VitePress generates an anchor containing the 14 prefix rather than #custom-value-types. Consequently this migration-guide link opens the examples page without jumping to the promised section; use the generated numbered anchor or add an explicit stable anchor to that heading.

Useful? React with 👍 / 👎.

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