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

Reduce number of warnings from tests #1573

Merged
merged 6 commits into from
Mar 14, 2024
Merged

Conversation

sk1p
Copy link
Member

@sk1p sk1p commented Jan 23, 2024

Part of #1414

  • Fixes usage of pkg_resourcesimportlib_metadata
  • Fixes some deprecation warnings added in numpy 1.25
  • Fixes wrong usage of bqplot
  • Ignore expected warnings thrown by our own code (plotting related mostly)

Contributor Checklist:

Reviewer Checklist:

  • /azp run libertem.libertem-data passed
  • No import of GPL code from MIT code

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.59%. Comparing base (a33376b) to head (78632c7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1573      +/-   ##
==========================================
+ Coverage   70.57%   70.59%   +0.01%     
==========================================
  Files         325      325              
  Lines       27061    27066       +5     
  Branches     3086     3087       +1     
==========================================
+ Hits        19098    19106       +8     
+ Misses       7380     7377       -3     
  Partials      583      583              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sk1p
Copy link
Member Author

sk1p commented Jan 23, 2024

/azp run libertem.libertem-data

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sk1p sk1p added the QA label Jan 23, 2024
@sk1p sk1p added this to the 0.14 milestone Jan 23, 2024
@sk1p sk1p force-pushed the filter-warnings branch 2 times, most recently from e8df7ef to 956fadb Compare February 22, 2024 18:03
@sk1p
Copy link
Member Author

sk1p commented Feb 22, 2024

/azp run libertem.libertem-data

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sk1p sk1p changed the title WIP: Filter out some expected warnings in test cases Reduce number of warnings from tests Feb 22, 2024
@sk1p
Copy link
Member Author

sk1p commented Feb 22, 2024

@matbryan52 there are some deprecation warnings emitted from test_random_set_with_array which I couldn't figure out - feel free to have a look if you find some time (or want to procrastinate)

Other than that, this should be ready to go, and especially for the data tests reduce the number of warnings significantly.

@sk1p sk1p mentioned this pull request Feb 22, 2024
14 tasks
@matbryan52 matbryan52 self-requested a review February 22, 2024 20:41
@matbryan52
Copy link
Member

@matbryan52 there are some deprecation warnings emitted from test_random_set_with_array which I couldn't figure out - feel free to have a look if you find some time (or want to procrastinate)

Other than that, this should be ready to go, and especially for the data tests reduce the number of warnings significantly.

Fixed in the code itself as well as the testcase. Relates to numpy/numpy#10615

@sk1p
Copy link
Member Author

sk1p commented Feb 23, 2024

Fixed in the code itself as well as the testcase. Relates to numpy/numpy#10615

👍 yeah - I fixed a few instances of this in the I/O code (and also in rosettasciio), but wasn't entirely sure how to apply that in the dask wrapper stuff. Thanks for taking care of it!

sk1p and others added 5 commits March 14, 2024 16:07
* `bqplot.Figure` doesn't take a `scales` parameter
* Expect and catch `UserWarning`s in `test_empty` for gms/bqp
Can't convert a single-element array directly to a Python `Number`, need
to be explicit.
Needs the backport while we still support old-Python.
... so we don't need `importlib_metadata` anymore
@sk1p
Copy link
Member Author

sk1p commented Mar 14, 2024

/azp run libertem.libertem-data

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sk1p sk1p merged commit dd7ace3 into LiberTEM:master Mar 14, 2024
32 checks passed
@sk1p sk1p deleted the filter-warnings branch March 14, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants