Skip to content

Conversation

@liamhuber
Copy link
Member

Per @pmrv's suggestion, adding from pyiron_base:

  • ImportAlarm
  • Deprecator
  • retry

@pmrv, catching warnings in the tests can be janky -- e.g. because some dependency introduces some deprecation error of its own or whatever -- so I made a private flag to convert the deprecator warnings into hard errors and then test explicitly for that. User facing stuff remains totally unchanged.

jan-janssen and others added 30 commits September 9, 2020 08:06
* Add a util class for import warnings

* Add docstring

* Add test

* Add context manager

Co-authored-by: Marvin Poul <ponder@creshal.de>
Decorating a function with the Deprecator can change its instance
attributes (if you pass arguments when decorating).  That means that
when decorating different functions the warning shown used only the
arguments from the last call to the deprecator instance.

This is fixed now by copying the deprecator instance before wrapping the
given function.
Copy deprecator instance on decorating
We had a pattern for this in multiple places (talking to the database or
hdf5 file).
Add numpy equality check for unit tests
@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch pyiron/snippets/base_stuff

@codacy-production
Copy link

codacy-production bot commented May 27, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+2.24% (target: -1.00%) 99.05%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (111cf76) 343 307 89.50%
Head commit (172eaa3) 448 (+105) 411 (+104) 91.74% (+2.24%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6) 105 104 99.05%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more

@coveralls
Copy link

coveralls commented May 27, 2024

Pull Request Test Coverage Report for Build 9272728772

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.2%) to 91.741%

Totals Coverage Status
Change from base Build 9259710107: 2.2%
Covered Lines: 411
Relevant Lines: 448

💛 - Coveralls

@liamhuber liamhuber requested review from pmrv and samwaseda May 27, 2024 22:22
Copy link
Member

@samwaseda samwaseda left a comment

Choose a reason for hiding this comment

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

I really appreciate deprecation warning to be here, because I always had a hard time finding out where it was stored, and I ended up not using it because I was too lazy, even though I find it super useful.

liamhuber and others added 5 commits May 28, 2024 09:05
Co-authored-by: Marvin Poul <ponder@creshal.de>
Co-authored-by: Marvin Poul <ponder@creshal.de>
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
@liamhuber liamhuber merged commit f7ebb91 into main May 28, 2024
@liamhuber liamhuber deleted the base_stuff branch May 28, 2024 16:12
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.

8 participants