Skip to content

Move configuration definitions to dynestyx.configs - #444

Open
mattlevine22 wants to merge 3 commits into
mainfrom
codex/configs-package
Open

mattlevine22 wants to merge 3 commits into
mainfrom
codex/configs-package

Conversation

@mattlevine22

Copy link
Copy Markdown
Collaborator

Closes #438. This is the package refactor alternative to #443.

Changes

  • Move the filter, smoother, MCMC, discretizer, simulator, and observation-scoring definitions into dynestyx.configs. Expose the user-facing options through dsx.configs and the individual config modules.
  • Preserve the old module paths and the four top-level config names through deprecation shims. The shims warn with the replacement path and return the same config objects.
  • Update internal imports, add a Configurations page under Public API, and migrate the documentation and notebook examples.
import dynestyx as dsx

filter_handler = dsx.Filter(filter_config=dsx.configs.EnKFConfig(n_particles=64))

Verification

Ruff lint and formatting passed. Checked canonical imports, legacy object identity, and warning messages directly. MkDocs built with warnings.

@DanWaxman

Copy link
Copy Markdown
Collaborator

Can we not use a filter.py? filter is a keyword in Python. I would be okay with dynestyx.configs.filters, for example?

@mattlevine22

Copy link
Copy Markdown
Collaborator Author

Can we not use a filter.py? filter is a keyword in Python. I would be okay with dynestyx.configs.filters, for example?

Not sure I understand the concern---we previously had dynestyx.inference.configs.filter.py...are you saying we should use this as an opportunity to also rename to filters.py?

@mattlevine22

Copy link
Copy Markdown
Collaborator Author

@DanWaxman I had codex move dsx.configs.filter -> dsx.configs.filters with an s. Looks right to me.

@DanWaxman DanWaxman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A few leftover changes. Also, the tests need to be updated.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This still uses a from dsx import ODESimulatorConfig

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Doesn't this have to move?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

(Along with several others)

This branch has not been deployed

No deployments
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.

Make Configs easier to get to from dsx.

2 participants