Integrate openpmd-scipp into the main API#1716
Integrate openpmd-scipp into the main API#1716franzpoeschel wants to merge 24 commits intoopenPMD:devfrom
Conversation
8feaf18 to
0b39620
Compare
|
I just took a quick look. This looks quite nice and wouldn't change much of the interface. The other stuff in the repo is mostly just for creating the README and testing, formatting etc. so I guess the only thing you would need to take over are the requirements, but this is only |
Also the Readme; I will try to integrate that into the Readthedocs page.
I'd suggest that we add a test separately as part of APITest.py. The "target audience" for the examples are users who can use them as guidelines for their own code, so I would not clutter the example with testing code. |
2986b4f to
294f890
Compare
| @@ -0,0 +1,340 @@ | |||
| { | |||
There was a problem hiding this comment.
Is the notebook important to add or does the .py script + README have the same details?
There was a problem hiding this comment.
@ax3l the README from my repo is identical to the notebook since I was generating my README.md from it with:
rm -rf README_files
python -m nbconvert --to notebook --execute README.ipynb --output README.executed.ipynb
python -m nbconvert --to markdown README.executed.ipynb --output README.md - TagRemovePreprocessor.enabled=True --TagRemovePreprocessor.remove_cell_tags remove_cell
rm -f README.executed.ipynbso you don't need both
There was a problem hiding this comment.
I added both since having this documentation page alternatively as an executable and interactive Notebook would be a useful extra for learning how to use this. It's of course not ideal for maintenance..
|
|
||
| Ex_line.plot() | ||
|
|
||
| .. figure:: README_17_0.svg |
There was a problem hiding this comment.
Can you potentially upload the four .svg images to a public GH gist and use them by URL? That way, we do not add larger binary artifacts to our git repo here, which keeps it small on git clone for CMake superbuilds.
There was a problem hiding this comment.
SVG files are not binary, these are text files with each ~800 lines, less than many of our source files.
I tried putting them on a Gist, but it seems that Github does not hand out usable raw links.
| """openpmd_scipp: A Python package for loading openPMD datasets | ||
| into scipp DataArrays. | ||
|
|
||
| See README.md for documentation | ||
|
|
||
| Author: | ||
| Pawel Ordyna <p.ordyna@hzdr.de> | ||
|
|
||
| License: | ||
| GPL - 3.0 license. See LICENSE file for details. | ||
| """ |
There was a problem hiding this comment.
@pordyna for openPMD-api, we use the LGPL license. Please confirm we can change the license for files in this PR and then please update the headers accordingly @franzpoeschel .
294f890 to
12e9ad3
Compare
|
Btw. when it comes to handling particles, I have an idea on what would make sense there, but haven't implemented anything yet. Since with particle data people are mostly just creating histograms, I think reading a species as a |
|
And the particle part could be, probably, quite easily implemented with https://scipp.github.io/user-guide/reading-and-writing-files.html#Using-pandas. Just load to a data frame with |
| Record_Component.to_dask_array = record_component_to_daskarray # noqa | ||
| Series.to_df = iterations_to_dataframe # noqa | ||
| Series.to_cudf = iterations_to_cudf # noqa | ||
| Series.to_scipp = series_to_scipp # noqa |
There was a problem hiding this comment.
| Series.to_scipp = series_to_scipp # noqa | |
| Series.to_scipp = series_to_scipp # noqa |
|
@franzpoeschel I discovered some problems with the implementation. I already fixed them, but we need to bring the changes here. For that, I just want to update my docstrings first. What was wrong:
|
Hey @pordyna, can you implement those changes on a branch so I can pull them into this PR? |
Yes, I can branch from your branch and add the changes. |
7442e98 to
b0a55ea
Compare
b0a55ea to
1c4dd3b
Compare
This reverts commit 7d4aede.
converted with Pandoc
maybe report
License: LGPLv3+
1c4dd3b to
ddf8549
Compare
This merges the code from https://github.com/pordyna/openpmd_scipp into the main API such that it can be used by
series.to_scipp().TODO: