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

MAINT: refactor read_eam #43

Merged
merged 2 commits into from
Jun 15, 2020
Merged

MAINT: refactor read_eam #43

merged 2 commits into from
Jun 15, 2020

Commits on Jun 11, 2020

  1. Refactored read_eam

    The number of strings and numbers in each EAM table is well-defined
    and can be calculated after reading the header info (ignoring comments
    in the header and after '#'). The new version of read_eam calculates
    the expected number of values and checks if the table is correct. We
    raise a ValueError if this is not so. The motivation for this change
    is that read_eam failed in some cases where the table contained extra
    values, but it was not clear that these extra values were to blame.
    
    eam/alloy and eam/fs file styles are very similar. The previous
    version of read_eam had some repeated code. The present
    version makes use of the similarities to reduce code size.
    
    Renamed a few variables for clarity.
    Wolfram Georg Nöhring committed Jun 11, 2020
    Configuration menu
    Copy the full SHA
    ce5c5c0 View commit details
    Browse the repository at this point in the history
  2. Replaced old-style format strings by f-strings in write_eam

    Changed formatting / restructuredtext in docstring.
    Wolfram Georg Nöhring committed Jun 11, 2020
    Configuration menu
    Copy the full SHA
    f208d7e View commit details
    Browse the repository at this point in the history