-
Notifications
You must be signed in to change notification settings - Fork 125
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
[ITensors] HDF5.jl
package extension
#1382
Conversation
I'm seeing some warnings in the tests about loading the various package extensions, e.g.
I found this open |
(Also sneaking in a small orthogonal update: added |
I see, thanks for investigating. That issue seems to be related to having a system image for a package already built which triggers strange behaviors when loading package extensions relying on those pre-built packages, if I'm following the discussions in those links. That makes me think it is somewhat related to the issue in #1381, i.e. that the tests aren't being run from a clean slate but rather reusing something from a previous CI run (in this case pre-built system images, in #1381 a badly-configured Manifest.toml). For both this issue and the issue in #1381, I wonder if running the CI using a temporary environment with |
We should bump the minor version of |
Interesting about how that warning might be related. That's definitely on my list of things to work on next (probably on the other Observers PR) i.e. try what Karl is doing in #1365 to see if that helps the Observers extension go through, and fix that warning. |
I am trying to think of clean-ish ways to fix the issue with The "best" idea I had was just to temporarily define An alternative is simply to duplicate the code in The only other idea would be to somehow rewrite the macro to more explicitly list the different cases. So like
or something along those lines. The tricky part is how the macro cleverly rewrites the symbols to append One could just replace the macros by two, one for the non-modifying and the other for modifying. That option would duplicate the shared docstrings, but other than that it might not be too bad. It would not duplicate much actual code, plus if we are going to deprecate the modifying versions we can later delete the second macro in that plan. |
Can't the duplicated docstring just be refactored into a function that generates the docstring that can be used by both versions? |
I do not think we should define |
Another suggestion would be to rewrite the for loop like this: for (fname, fname!) in (
(:(ITensors.dag), :(dag!)),
(:(ITensors.prime), :(ITensors.prime!)),
...
) |
The docstring funciton is a good idea – I had not thought of that. So then with that improvement, a pretty simple fix would just be to duplicate the code in |
I think I prefer this suggestion better:
|
Yes that's definitely the best idea. Very clean. I'm going to modify it to have a third entry for the docstring and otherwise will use that pattern. |
I believe to get tests passing we will need to append |
Ah thanks, was just wondering the best course of action. By the way, I wasn't able to reproduce the |
HDF5.jl
package extension
This one should be ready to go, unless there are possibly other tests I didn't think to run? |
Could you also bump the patch versions of |
Sure thing, done. I put [no ci] at the end of the commit for that, but I can also rerun the tests if that's best. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1382 +/- ##
==========================================
- Coverage 79.59% 79.32% -0.28%
==========================================
Files 114 114
Lines 9032 8875 -157
==========================================
- Hits 7189 7040 -149
+ Misses 1843 1835 -8 ☔ View full report in Codecov by Sentry. |
Could you also add a NEWS item to the README about the 0.4 release? |
Sure thing, I added the NEWS entry |
Sorry, I meant add an entry about it here: https://github.com/ITensor/ITensors.jl/blob/main/docs/src/index.md#news which will show up on both the I haven't been updating the |
I updated the docs index file – please take a look. We could add other major changes since 0.3 such as e.g. replacing the original OpSum with Ops.OpSum and other big changes like that. I went ahead and removed NEWS.md. Let me know if you want me to put it back. |
Co-authored-by: Matt Fishman <[email protected]>
Moved HDF5 support into a package extension. Updated docs accordingly.
Also fixed a couple of unrelated build issues in the docs and an ITensorMPS module import/overload issue.