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

fix logging #1769

Merged
merged 5 commits into from
Apr 4, 2024
Merged

fix logging #1769

merged 5 commits into from
Apr 4, 2024

Conversation

casperdcl
Copy link
Member

@casperdcl casperdcl commented Apr 2, 2024

Changes

Testing you performed

TESTS_FORCE_GPU=1 python -m unittest discover ./Wrappers/Python/test

Related issues/links

Checklist

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the developer guide
  • I have updated the relevant documentation
  • I have implemented unit tests that cover any new or modified functionality
  • CHANGELOG.md has been updated with any functionality change
  • Request review from all relevant developers
  • Change pull request label to 'Waiting for review'

Contribution Notes

Please read and adhere to the developer guide and local patterns and conventions.

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CIL (the Work) under the terms and conditions of the Apache-2.0 License
  • I confirm that the contribution does not violate any intellectual property rights of third parties

@casperdcl casperdcl self-assigned this Apr 2, 2024
@casperdcl casperdcl added bug Something isn't working enhancement New feature or request Waiting for review labels Apr 2, 2024
@casperdcl casperdcl marked this pull request as ready for review April 2, 2024 16:35
Copy link
Member

@gfardell gfardell left a comment

Choose a reason for hiding this comment

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

I'm not sure I understand the use case of logging in the unittests. But as this is just updating what was currently implemented it looks good to me.

@casperdcl casperdcl enabled auto-merge (squash) April 3, 2024 18:56
@lauramurgatroyd
Copy link
Member

So we use 'warnings' instead of logging for deprecated code - is this because it means the deprecation message will always be displayed no matter what the logging level is?

@casperdcl casperdcl merged commit 390df70 into master Apr 4, 2024
7 checks passed
@casperdcl casperdcl deleted the fix-logging branch April 4, 2024 08:58
@casperdcl
Copy link
Member Author

So we use 'warnings' instead of logging for deprecated code - is this because it means the deprecation message will always be displayed no matter what the logging level is?

Yes and also it will only be displayed once per interpeter session rather than once per function call.

casperdcl added a commit to manchester-jhellier/CIL that referenced this pull request Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request Waiting for review
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Inconsistency in how logging works across CIL
3 participants