-
Notifications
You must be signed in to change notification settings - Fork 14
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
[minor] Update pack and unpack methods #1440
Conversation
I am going to take over @srmnitc's work, so I copied the PR from his forked branch |
for more information, see https://pre-commit.ci
Update pack and unpack methods
ok I just realized that I had a different PR open and I opened this one on top. Let me correct this first XD |
Thanks @samwaseda for picking this up. There are a couple of fixes also included in #1401 so maybe it makes sense to merge those as well. |
@pmrv @jan-janssen @srmnitc I guess it's now feature complete and this is probably going to be the last PR of the series of pack/unpack. After this one a minor release can be made and it's hopefully settled. |
As far as I understand the csv file is now included in the tar archive, correct? How do you handle the backwards compatibility for old archives which do not include the csv file? Maybe it makes sense to have a short example either in the Docstring or the jupyter notebook to handle this backwards compatibility. Finally, I liked the option to take a look at the csv file to see which jobs are included in the archive before importing the corresponding jobs. Previously, I did this by loading the csv file with pandas. I can still load the csv file manually from the tar archive, but for other users it would be great to take a look at the archive and get the job table of the contained project from the python side. |
Co-authored-by: Jan Janssen <jan-janssen@users.noreply.github.com>
Co-authored-by: Jan Janssen <jan-janssen@users.noreply.github.com>
That's a good point that I should mention in the code. I guess it helps the future generation to understand the origin of some of the code.
That sounds good but I guess it's a different PR. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Can I merge this one or should I still wait for a review? |
Update of the
pack
andunpack
methods. #775pack
includes the csv file inside the archivepack
filename is optional, uses ".tar.gz"pack
with same name as project should not delete the projectpack
selected jobs by idpack
all files in a jobpack
from a different directory than where project is locatedunpack
method can be called aspr = Project(filename.tar.gz, unpack=True)
orpr = Project(filename, unpack=True)
unpack
should not nest project automaticallyunpack
jobs into existing ProjectPotentially backward-incompatible changes:
compress
fromunpack
. You have to put the full file name so that pyiron knows whether it has to decompress or not.export.csv
is inside the compressed folder. The algorithm could fail if there is anotherexport.csv
in the project.