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

Update library import checks #76

Merged
merged 6 commits into from
Oct 4, 2022
Merged

Conversation

eirikurj
Copy link
Contributor

@eirikurj eirikurj commented Oct 3, 2022

Purpose

Currently, the library import check suppresses useful information why the library could not be imported. This PR updates the import check to print out the full error message.

Expected time until merged

No rush.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

Compile the module with and without the fix, with a broken library (e.g., by commenting out CGNS_LINKER_FLAGS in the config).

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

ewu63
ewu63 previously approved these changes Oct 3, 2022
Copy link
Collaborator

@ewu63 ewu63 left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Oct 3, 2022

Codecov Report

Merging #76 (18f4528) into main (d696522) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #76   +/-   ##
=======================================
  Coverage   73.43%   73.43%           
=======================================
  Files           6        6           
  Lines         753      753           
=======================================
  Hits          553      553           
  Misses        200      200           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@sseraj sseraj left a comment

Choose a reason for hiding this comment

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

The complex build is failing. It looks like a path issue with the import test.

@eirikurj
Copy link
Contributor Author

eirikurj commented Oct 4, 2022

Ugh, right, the PATH is probably missing the directory where the lib is. Will fix.

parser.add_argument(
"name",
type=str,
help="Library name (example: libpackage.so). Note: This script must be run in the same dir as the library.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

The note is not true anymore, right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, I think I misinterpreted this. It makes sense now.

sseraj
sseraj previously approved these changes Oct 4, 2022
@sseraj sseraj merged commit 1609dca into mdolab:main Oct 4, 2022
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.

3 participants