Skip to content

Conversation

@pmrv
Copy link
Contributor

@pmrv pmrv commented Sep 16, 2025

Sometimes there is nothing useful to be done on a missing (optional) dependency, but the current behavior forces users to handle this case in the decorated function itself. With this change, this case can simply raise an exception in case e.g. a function is called that is only part of a package API if the depedency is met.

Sometimes there is nothing useful to be done on a missing (optional)
dependency, but the current behavior forces users to handle this case
in the decorated function itself.  With this change, this case can
simply raise an exception in case e.g. a function is called that is
only part of a package API if the depedency is met.
@pmrv pmrv requested a review from liamhuber September 16, 2025 19:28
@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch pyiron/pyiron_snippets/fail

@codecov
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.15%. Comparing base (ee314f9) to head (38775f2).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #61   +/-   ##
=======================================
  Coverage   95.15%   95.15%           
=======================================
  Files          13       13           
  Lines         537      537           
=======================================
  Hits          511      511           
  Misses         26       26           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pmrv pmrv added the format_black Trigger the black formatting bot label Sep 16, 2025
Copy link
Member

@liamhuber liamhuber left a comment

Choose a reason for hiding this comment

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

The change itself looks good to me.

I'm not sure how I feel about cross-referencing deprecate. It is harmless here, but it violates the principle that the snippets are independent. I'm not sure we should bother maintaining that principle though.

@pmrv
Copy link
Contributor Author

pmrv commented Sep 16, 2025

Mh, I had understood 'no-deps' as in no outside dependencies, but I agree no interdependencies would still be nice to break things out in the future. Either way, the flag was actually private before, I could also just drop it.

It was a private flag anyway.
@liamhuber
Copy link
Member

Yeah, since it's private let's just delay the decision.

@pmrv pmrv merged commit 0a9712f into main Sep 16, 2025
21 checks passed
@pmrv pmrv deleted the fail branch September 16, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

format_black Trigger the black formatting bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants