Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relaxed passmethod coherence tests when loading files #600

Merged
merged 2 commits into from
May 23, 2023
Merged

Conversation

lfarv
Copy link
Contributor

@lfarv lfarv commented May 20, 2023

When loading .mat files, a series of tests check the coherence between the element class and the pass method, and by default raise an exception. This created several problems in the past (like here). The changes here are:

  1. the number of tests is reduced to a minimum, to avoid problems when new pass methods are implemented:
    • IdentityPass with a non-null length,
    • missing C integrator,
    • a few remaining class checks.
  2. More important: a warning is emitted instead of an error. So the lattice is created and the user has the possibility of correcting the doubtful elements if needed. Up to now, the only workaround was to create a new .mat file.

As before, the quiet=True keyword shortcuts the tests (no more warnings emitted).

@lfarv lfarv added the Python For python AT code label May 20, 2023
@lfarv lfarv mentioned this pull request May 20, 2023
@lfarv lfarv merged commit 747fbfa into master May 23, 2023
31 checks passed
@lfarv lfarv deleted the load_mat_files branch May 23, 2023 08:31
@lfarv lfarv mentioned this pull request Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python For python AT code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants