You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migration: ProjectSettings.multinomial missing on projects saved before stochastic transitions #554
Model.__init__() reads settings.multinomial. A ProjectSettings object pickled before this attribute existed has no such attribute, so loading an older project and calling run_sim() raises AttributeError: 'ProjectSettings' object has no attribute 'multinomial'. Verified by deleting the attribute from a fresh settings object.
The existing migration _add_end_year_to_project_settings only runs for projects below version 1.17.0.
Implementation plan
Bump the Atomica version and add a migration in atomica/migration.py for Project and Result that sets settings.multinomial = False when the attribute is missing. Follow the pattern of _add_end_year_to_project_settings.
As a belt-and-braces measure, make Model.__init__ use getattr(settings, "multinomial", False).
Add a test that loads a project saved under the previous version (there are existing version-pinned fixtures in tests/) and runs it.
Activity