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

Incorporated pathlib.Path compatibility #99

Merged
merged 3 commits into from
Jan 28, 2022

Commits on Jan 19, 2022

  1. Incorporated pathlib.Path compatibility

    In this commit I have added input (and explicit output) compatibility
    between pymapdl-reader and the pathlib.Path class. All file path-input
    arguments should now be accepted as either strings or pathlib.Path
    objects. Additionally there is no breaing change regarding the filename
    properties. These will continue to return strings. Wherever possible I
    have made it so that internally we store paths as pathlib.Path objects
    and they are returned as strings through properties. Setters
    additionally will accept strings or pathlib.Path objects.
    
    Unfortunately i have not been able to get the test suite working on my
    local machine and so have not been able to write tests to go with these
    changes. I would appreciate input from others regarding how to get the
    tests running and if my changes do break any existing tests. I do not
    believe so but I am very limited in how I can check.
    jgd10 committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    78969b7 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2022

  1. changed suffix comparison to include the .

    Changed the suffix comparison to include the leading '.' because
    pathlib.Path.suffix does include it. Made sure that AnsysFile converts
    any potential paths to string before they are passed as arguments.
    
    Additionally split thermal test up until multiple tests within a class
    to make it easier to read.
    
    All existing tests pass with pathlib changes.
    jgd10 committed Jan 26, 2022
    Configuration menu
    Copy the full SHA
    0ad8342 View commit details
    Browse the repository at this point in the history
  2. Added tests for each altered class

    Added additional tests to check the input and output is correct for the
    4 classes that use pathlib.Path now.
    jgd10 committed Jan 26, 2022
    Configuration menu
    Copy the full SHA
    02f73c7 View commit details
    Browse the repository at this point in the history