Skip to content

Conversation

@jan-janssen
Copy link
Member

@github-actions
Copy link

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

@codecov
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.43%. Comparing base (01ef150) to head (9f5eab1).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
+ Coverage   95.34%   95.43%   +0.08%     
==========================================
  Files          15       16       +1     
  Lines         602      613      +11     
==========================================
+ Hits          574      585      +11     
  Misses         28       28              

☔ 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.

@jan-janssen jan-janssen requested a review from liamhuber October 13, 2025 15:09
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.

Code looks good.

I would prefer but do not insist on a more specific module name, e.g. with_directory/directory_context/cwdcontext/whatever. The spirit of the project is that different pieces are independent of each other, but this will lead to multiple context managers in the same file. In particular this may cause confusion since the exception context manager is already in a separate file.

Please add documentation. IMO the one-sentence header in the docstring is perfect, but please add a code example, e.g. by taking the unit test and adding two print statements (inside and after the context). The header and code example from the docstring should then be added to the readme (which is sorted alphabetically by module name)

@liamhuber liamhuber self-requested a review October 15, 2025 00:08
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.

I directly copy-pasted the example into the README in #72; IMO the existing doc works perfectly there, but feel free to modify it further if you'd like. Once it's mentioned in the readme I'm 100% happy, so I'm going to pre-approve here.

@jan-janssen jan-janssen merged commit 0d6262b into main Oct 15, 2025
22 checks passed
@jan-janssen jan-janssen deleted the directory_context branch October 15, 2025 05:09
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.

2 participants