-
Notifications
You must be signed in to change notification settings - Fork 51
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
[WIP] Unify Random-Access API and Streaming API into Series::snapshots() #1592
Open
franzpoeschel
wants to merge
93
commits into
openPMD:dev
Choose a base branch
from
franzpoeschel:topic-iterator
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
93 commits
Select commit
Hold shift + click to select a range
e52155b
Introduce SharedAttributableData
franzpoeschel 9e31b09
Add AbstractSeriesIterator
franzpoeschel 16fe71c
Derive SeriesIterator from AbstractSeriesIterator
franzpoeschel 8ceec08
Little fix
franzpoeschel 8ba9820
Introduce Snapshots.hpp
franzpoeschel 37bd136
Make AbstractSeriesIterator non-virtual
franzpoeschel 8cbd84b
Working commit for Series::snapshots()
franzpoeschel 71065ad
No virtual operator[]
franzpoeschel 52d8d3e
Remove random-accessing from iterator
franzpoeschel 24ed6fa
Introduce AbstractSnapshotsContainer
franzpoeschel 6be640a
basic random-access iteration
franzpoeschel 118c47f
RandomAccessSnapshots.hpp -> snapshots/RandomAccessIterator.hpp
franzpoeschel cbe73e9
ReadIterations.hpp -> snapshots/StatefulIterator.hpp
franzpoeschel 0388466
SeriesIterator.hpp -> snapshots/IteratorTraits.hpp
franzpoeschel 9bf0a2e
Snapshots.hpp -> snapshots/Snapshots.hpp
franzpoeschel 033e9a7
Move AbstractSnapshotsContainer to ContainerTraits.hpp
franzpoeschel ed689f7
Move Container implementations to ContainerImpls.(h|c)pp
franzpoeschel bf32dfe
Fix: parsePreference is not set in file-based iteratione encoding
franzpoeschel c619545
Temporarily fix test
franzpoeschel 2b05425
Const iteration
franzpoeschel 2e26222
Extract stuff to .cpp
franzpoeschel 890dc89
Reverse iteration
franzpoeschel 4fc2083
Commit missing Snapshots.cpp file
franzpoeschel 8aefaff
empty()
franzpoeschel 0bbdb33
Revert wrong renaming ReadIterations/StatefulIterator
franzpoeschel ab631bc
Rename SeriesIterator -> StatefulIterator
franzpoeschel 80e8aa0
Add ::at, operator[]
franzpoeschel aef260e
beginStep(): always return relevant iteration indices
franzpoeschel ba05ee2
Basically working example for snapshots() in write access
franzpoeschel 0c7c04b
Extract some methods to .cpp
franzpoeschel 559658b
Fully replace WriteIterations class with the new one
franzpoeschel 0e8e994
Fix nullpointer issue
franzpoeschel b9b7187
Little fixes
franzpoeschel 05f9c27
Add some further API calls
franzpoeschel 465a2ae
Some postfix form transformations
franzpoeschel 894014f
Use snapshots() in read example 2
franzpoeschel 937a5d3
Simplify ReadIterations implementation
franzpoeschel 913c1cd
Further cleanup
franzpoeschel a7d75c8
Change representation of iterations in current step
franzpoeschel 43c3ab0
Initiate reading of group/variable-based encoding with nextStep()
franzpoeschel 26d87be
Prepare internal representation to be aware of steps
franzpoeschel 8ac9d38
Windows fixes
402cc5b
Adapt tests
franzpoeschel 1391534
Unify close status
franzpoeschel 304ae4b
Add basic test for opening after closing
franzpoeschel cf5b097
Add new end() iterator representations
franzpoeschel a5f30a8
Reopening logic in Iterator, not yet in Series itself
franzpoeschel 5202939
Reopening fundamentally working in READ_LINEAR
franzpoeschel 27ba327
Extend test
franzpoeschel bb0a776
For now, adapt the append_mode test
franzpoeschel 849fb91
fixes
franzpoeschel 5ebdab3
BUGFIX: modifiable attributes, maybe extract this to dev
franzpoeschel 01d065d
Ensure that iterations are never parsed twice
franzpoeschel 29ff452
Move currently_available_iterations to During_t
franzpoeschel 64027e7
Revert "For now, adapt the append_mode test"
franzpoeschel f0bb16c
Remember where we saw what iteration
franzpoeschel 0d3b96d
Bit of cleanup
franzpoeschel e78d5be
[wip] Groupbased writing: close and reopen
franzpoeschel 5bbb79d
Further test and implement reopening of Iterations
franzpoeschel b785148
Unused variable
franzpoeschel 95798b0
some fixes to groupbased reopen test
franzpoeschel 00f149f
Filebased reopen in ADIOS2 (no READ_WRITE support yet)
franzpoeschel c03ba19
Now supports READ_WRITE too in filebased mode
franzpoeschel 28c0516
Some exceptions for unimplemented stuff
franzpoeschel 0ed110f
Works in JSON and HDF5 now too
franzpoeschel 27e02bf
CI fixes
franzpoeschel 99d8146
Virtual destructors
franzpoeschel 49787c3
CI fixes continued
franzpoeschel 3584de6
Some fixes for noexcept specifications
franzpoeschel 3dc2ea3
Further CI Fixes
franzpoeschel aa2866f
CI FIXES
franzpoeschel 14267e5
Fixes for ADIOS2 v2.7
franzpoeschel 0139fa5
placate the intel compiler
franzpoeschel d815632
noexcept details for MSVC
franzpoeschel 8e9248a
Fix ulimit test
franzpoeschel 5fa0525
Fix after rebase: dirtyRecursive
franzpoeschel 0374f31
Fixes after rebase
franzpoeschel 32040ac
remove conflict markers...
franzpoeschel 7a58e28
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 684168f
Better defaults?
franzpoeschel 467b90b
Parameterize Series::snapshots()
franzpoeschel 86d6ed3
Use enum class for last commit
franzpoeschel 19e97f5
Add some missing minor function implementations
franzpoeschel ab81b91
Don't use globbing
franzpoeschel cc52cd1
Add missing include
franzpoeschel ffd802d
Better include structure, put Legacy stuff to Legacy headers
franzpoeschel 3dce4b6
Bugfix
franzpoeschel 2e77dd3
Documentation, cleanup
franzpoeschel 09c0a64
Add check_recursive_include script
franzpoeschel de4b662
Fixes after rebase
franzpoeschel 655c932
Fix bug that hindered files from being properly closed
franzpoeschel 0099010
Will this fix the Windows CI errors I dont think so
franzpoeschel bfc9897
Use macro instead of function
franzpoeschel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import re | ||
import subprocess | ||
import sys | ||
|
||
|
||
def track_includes(start_file): | ||
remove_start = re.compile("include/") | ||
|
||
def clean(file): | ||
return re.sub(remove_start, "", file) | ||
|
||
unseen_files = [start_file] | ||
res = {} | ||
# import ipdb | ||
# ipdb.set_trace(context=30) | ||
while unseen_files: | ||
current_file = unseen_files[0] | ||
del unseen_files[0] | ||
|
||
cmd = ["grep", "-Rl", clean(current_file), "include/"] | ||
try: | ||
next_files = subprocess.check_output(cmd) | ||
lines = [line for line in next_files.decode().splitlines() if line] | ||
except subprocess.CalledProcessError: | ||
lines = [] | ||
|
||
res[current_file] = lines | ||
for line in lines: | ||
if line not in res: | ||
unseen_files.append(line) | ||
return res | ||
|
||
|
||
if __name__ == "__main__": | ||
|
||
remove_start = re.compile("include/(openPMD/)?") | ||
remove_slash = re.compile("/|\\.") | ||
|
||
def clean(file): | ||
return re.sub(remove_slash, "_", re.sub(remove_start, "", file)) | ||
|
||
res = track_includes(sys.argv[1]) | ||
print("digraph {") | ||
for key, values in res.items(): | ||
key = clean(key) | ||
for target in values: | ||
print("\t{} -> {};".format(key, clean(target))) | ||
print("}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplification:
beginStep()
always returns the available Iterations