Add a context manager as an alternative to monkey patching#91
Conversation
Documentation build overview
81 files changed ·
|
|
|
||
|
|
||
| @contextmanager | ||
| def default_linalg_dims(func_or_dims): |
There was a problem hiding this comment.
I think the body can be kept mostly as is, the only change is I would define it inside the linalg.py file so it is also imported from xarray_einstats.linalg instead of being available at the top level. We might then want to remove the linalg from the name but I am also fine keeping it.
There was a problem hiding this comment.
done and removed the linalg part
| Yields | ||
| ------ | ||
| None |
There was a problem hiding this comment.
numpydoc doesn't say anything on documenting context managers but I would remove this section and instead add an examples section or a seealso pointing to the docs on using it. In general I would also update all the docs to remove any reference to monkeypatching and rely on the context manager only (I am more than happy to do this myself if you prefer).
There was a problem hiding this comment.
Made some changes and added missing sections
OriolAbril
left a comment
There was a problem hiding this comment.
Looks like the linting check is complaining, you should be able to fix it with tox -e reformat, after that it's good to merge. Thanks for the contributions and the patience ❤️
63d9042 to
5712455
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
==========================================
+ Coverage 91.46% 91.50% +0.03%
==========================================
Files 6 6
Lines 844 859 +15
==========================================
+ Hits 772 786 +14
- Misses 72 73 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
fixed :) |
Closes #29