Skip to content
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

Update pack and unpack methods #886

Merged
merged 14 commits into from
May 23, 2024
Merged

Update pack and unpack methods #886

merged 14 commits into from
May 23, 2024

Conversation

srmnitc
Copy link
Member

@srmnitc srmnitc commented Nov 7, 2022

Update of the pack and unpack methods. #775

  • pack includes the csv file inside the archive
  • pack filename is optional, uses ".tar.gz"
  • pack with same name as project should not delete the project
  • pack selected jobs by id
  • pack all files in a job
  • pack from a different directory than where project is located
  • unpack method can be called as pr = Project(filename.tar.gz, unpack=True) or pr = Project(filename, unpack=True)
  • unpack should not nest project automatically
  • unpack jobs into existing Project
  • Update tests
  • Update docstrings
  • Update workflow template

@srmnitc srmnitc marked this pull request as draft November 7, 2022 07:11
@srmnitc
Copy link
Member Author

srmnitc commented Nov 7, 2022

@samwaseda here is the development on pack and unpack

@stale
Copy link

stale bot commented Nov 23, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 23, 2022
@jan-janssen
Copy link
Member

@srmnitc Can you merge with the new main branch?

@stale stale bot removed the stale label Dec 5, 2022
@jan-janssen
Copy link
Member

======================================================================
[266](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:267)
ERROR: test_content (archiving.test_export.TestPack)
[267](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:268)
----------------------------------------------------------------------
[268](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:269)
Traceback (most recent call last):
[269](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:270)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_export.py", line 64, in test_content
[270](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:271)
    self.assertEqual(len(compare_obj.diff_files), 0)
[271](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:272)
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/filecmp.py", line 249, in __getattr__
[272](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:273)
    self.methodmap[attr](self)
[273](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:274)
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/filecmp.py", line 185, in phase3
[274](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:275)
    xx = cmpfiles(self.left, self.right, self.common_files)
[275](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:276)
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/filecmp.py", line 249, in __getattr__
[276](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:277)
    self.methodmap[attr](self)
[277](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:278)
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/filecmp.py", line 154, in phase2
[278](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:279)
    for x in self.common:
[279](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:280)
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/filecmp.py", line 249, in __getattr__
[280](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:281)
    self.methodmap[attr](self)
[281](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:282)
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/filecmp.py", line 143, in phase1
[282](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:283)
    a = dict(zip(map(os.path.normcase, self.left_list), self.left_list))
[283](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:284)
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/filecmp.py", line 249, in __getattr__
[284](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:285)
    self.methodmap[attr](self)
[285](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:286)
  File "/usr/share/miniconda3/envs/my-env/lib/python3.9/filecmp.py", line 135, in phase0
[286](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:287)
    self.left_list = _filter(os.listdir(self.left),
[287](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:288)
FileNotFoundError: [Errno 2] No such file or directory: 'archive_folder/test'
[288](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:289)

[289](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:290)
======================================================================
[290](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:291)
ERROR: test_exportedCSV (archiving.test_export.TestPack)
[291](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:292)
----------------------------------------------------------------------
[292](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:293)
Traceback (most recent call last):
[293](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:294)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_export.py", line 33, in test_exportedCSV
[294](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:295)
    self.pr.pack(destination_path=self.arch_dir, compress=False)
[295](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:296)
  File "/home/runner/work/pyiron_base/pyiron_base/pyiron_base/project/generic.py", line 1628, in pack
[296](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:297)
    export_archive.copy_files_to_archive(
[297](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:298)
  File "/home/runner/work/pyiron_base/pyiron_base/pyiron_base/project/archiving/export_archive.py", line 76, in copy_files_to_archive
[298](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:299)
    raise ValueError("Folder exists, give different name or allow compression")
[299](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:300)
ValueError: Folder exists, give different name or allow compression
[300](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:301)

[301](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:302)
======================================================================
[302](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:303)
ERROR: test_check_job_parameters (archiving.test_import.TestUnpacking)
[303](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:304)
Imported jobs should be equal to their originals in all their parameters.
[304](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:305)
----------------------------------------------------------------------
[305](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:306)
Traceback (most recent call last):
[306](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:307)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_import.py", line 30, in setUp
[307](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:308)
    self.imp_pr.unpack(origin_path=self.arch_dir_comp, compress=True)
[308](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:309)
AttributeError: 'Project' object has no attribute 'unpack'
[309](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:310)

[310](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:311)
======================================================================
[311](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:312)
ERROR: test_docstrings (archiving.test_import.TestUnpacking)
[312](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:313)
Fails with output if docstrings in the given module fails.
[313](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:314)
----------------------------------------------------------------------
[314](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:315)
Traceback (most recent call last):
[315](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:316)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_import.py", line 30, in setUp
[316](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:317)
    self.imp_pr.unpack(origin_path=self.arch_dir_comp, compress=True)
[317](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:318)
AttributeError: 'Project' object has no attribute 'unpack'
[318](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:319)

[319](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:320)
======================================================================
[320](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:321)
ERROR: test_import_compressed (archiving.test_import.TestUnpacking)
[321](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:322)
----------------------------------------------------------------------
[322](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:323)
Traceback (most recent call last):
[323](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:324)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_import.py", line 30, in setUp
[324](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:325)
    self.imp_pr.unpack(origin_path=self.arch_dir_comp, compress=True)
[325](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:326)
AttributeError: 'Project' object has no attribute 'unpack'
[326](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:327)

[327](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:328)
======================================================================
[328](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:329)
ERROR: test_import_csv (archiving.test_import.TestUnpacking)
[329](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:330)
----------------------------------------------------------------------
[330](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:331)
Traceback (most recent call last):
[331](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:332)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_import.py", line 30, in setUp
[332](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:333)
    self.imp_pr.unpack(origin_path=self.arch_dir_comp, compress=True)
[333](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:334)
AttributeError: 'Project' object has no attribute 'unpack'
[334](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:335)

[335](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:336)
======================================================================
[336](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:337)
ERROR: test_import_from_proj (archiving.test_import.TestUnpacking)
[337](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:338)
----------------------------------------------------------------------
[338](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:339)
Traceback (most recent call last):
[339](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:340)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_import.py", line 30, in setUp
[340](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:341)
    self.imp_pr.unpack(origin_path=self.arch_dir_comp, compress=True)
[341](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:342)
AttributeError: 'Project' object has no attribute 'unpack'
[342](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:343)

[343](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:344)
======================================================================
[344](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:345)
ERROR: test_import_uncompress (archiving.test_import.TestUnpacking)
[345](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:346)
----------------------------------------------------------------------
[346](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:347)
Traceback (most recent call last):
[347](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:348)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_import.py", line 30, in setUp
[348](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:349)
    self.imp_pr.unpack(origin_path=self.arch_dir_comp, compress=True)
[349](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:350)
AttributeError: 'Project' object has no attribute 'unpack'
[350](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:351)

[351](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:352)
======================================================================
[352](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:353)
ERROR: test_import_with_targz_extension (archiving.test_import.TestUnpacking)
[353](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:354)
----------------------------------------------------------------------
[354](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:355)
Traceback (most recent call last):
[355](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:356)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_import.py", line 30, in setUp
[356](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:357)
    self.imp_pr.unpack(origin_path=self.arch_dir_comp, compress=True)
[357](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:358)
AttributeError: 'Project' object has no attribute 'unpack'
[358](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:359)

[359](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:360)
======================================================================
[360](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:361)
ERROR: test_load_job (archiving.test_import.TestUnpacking)
[361](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:362)
Jobs should be able to load from the imported project.
[362](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:363)
----------------------------------------------------------------------
[363](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:364)
Traceback (most recent call last):
[364](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:365)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_import.py", line 30, in setUp
[365](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:366)
    self.imp_pr.unpack(origin_path=self.arch_dir_comp, compress=True)
[366](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:367)
AttributeError: 'Project' object has no attribute 'unpack'
[367](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:368)

[368](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:369)
======================================================================
[369](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:370)
ERROR: test_unpack_from_other_dir_uncompress (archiving.test_import.TestUnpacking)
[370](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:371)
----------------------------------------------------------------------
[371](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:372)
Traceback (most recent call last):
[372](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:373)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_import.py", line 30, in setUp
[373](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:374)
    self.imp_pr.unpack(origin_path=self.arch_dir_comp, compress=True)
[374](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:375)
AttributeError: 'Project' object has no attribute 'unpack'
[375](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:376)

[376](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:377)
======================================================================
[377](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:378)
ERROR: test_unpack_to_nested_project (archiving.test_import.TestUnpacking)
[378](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:379)
----------------------------------------------------------------------
[379](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:380)
Traceback (most recent call last):
[380](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:381)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_import.py", line 30, in setUp
[381](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:382)
    self.imp_pr.unpack(origin_path=self.arch_dir_comp, compress=True)
[382](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:383)
AttributeError: 'Project' object has no attribute 'unpack'
[383](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:384)

[384](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:385)
======================================================================
[385](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:386)
FAIL: test_HDF5 (archiving.test_export.TestPack)
[386](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:387)
----------------------------------------------------------------------
[387](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:388)
Traceback (most recent call last):
[388](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:389)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_export.py", line 50, in test_HDF5
[389](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:390)
    self.assertTrue(os.path.exists(h5_file_path))
[390](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:391)
AssertionError: False is not true
[391](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:392)

[392](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:393)
======================================================================
[393](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:394)
FAIL: test_compress (archiving.test_export.TestPack)
[394](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:395)
----------------------------------------------------------------------
[395](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:396)
Traceback (most recent call last):
[396](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:397)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_export.py", line 57, in test_compress
[397](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:398)
    self.assertTrue(os.path.exists(file_path))
[398](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:399)
AssertionError: False is not true
[399](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:400)

[400](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:401)
======================================================================
[401](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:402)
FAIL: test_export_with_targz_extension (archiving.test_export.TestPack)
[402](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:403)
----------------------------------------------------------------------
[403](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:404)
Traceback (most recent call last):
[404](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:405)
  File "/home/runner/work/pyiron_base/pyiron_base/tests/archiving/test_export.py", line 80, in test_export_with_targz_extension
[405](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:406)
    self.assertListEqual(desirable_lst, content_tmp)
[406](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:407)
AssertionError: Lists differ: ['archive_folder_comp.tar.gz', 'exported.csv'] != ['test.tar.gz']
[407](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:408)

[408](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:409)
First differing element 0:
[409](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:410)
'archive_folder_comp.tar.gz'
[410](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:411)
'test.tar.gz'
[411](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:412)

[412](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:413)
First list contains 1 additional elements.
[413](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:414)
First extra element 1:
[414](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:415)
'exported.csv'
[415](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:416)

[416](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:417)
- ['archive_folder_comp.tar.gz', 'exported.csv']
[417](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:418)
+ ['test.tar.gz']
[418](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:419)

[419](https://github.com/pyiron/pyiron_base/actions/runs/3732373926/jobs/6331732206#step:9:420)
----------------------------------------------------------------------

@stale
Copy link

stale bot commented Jan 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@mgt16-LANL
Copy link

This might be an edge case -but when I called pr.pack('.') it deleted all my calculations and everything in my sub-directory. My intuition for passing '.' was that it would just pack the project into the project name in the current directory.

@samwaseda
Copy link
Member

This might be an edge case -but when I called pr.pack('.') it deleted all my calculations and everything in my sub-directory. My intuition for passing '.' was that it would just pack the project into the project name in the current directory.

Your intuition was right and this function is currently not doing the right thing. It should work after this PR is merged.

@stale
Copy link

stale bot commented Mar 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 18, 2023
@stale stale bot closed this Apr 2, 2023
@samwaseda
Copy link
Member

Do we actually have updates on this PR? I think it would be helpful to have the functionality for Hackathon

@samwaseda samwaseda reopened this Oct 18, 2023
@stale stale bot removed the stale label Oct 18, 2023
@srmnitc
Copy link
Member Author

srmnitc commented Oct 18, 2023

Do we actually have updates on this PR? I think it would be helpful to have the functionality for Hackathon

Not really, I most likely will not have time to finish this in the next days due to the NFDI meeting. But feel free to work on it if you find time.

@srmnitc
Copy link
Member Author

srmnitc commented Oct 18, 2023

This might be an edge case -but when I called pr.pack('.') it deleted all my calculations and everything in my sub-directory. My intuition for passing '.' was that it would just pack the project into the project name in the current directory.

This itself has a fix now I believe #1047

Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 17, 2024
@jan-janssen
Copy link
Member

@srmnitc Do you plan to continue working on this? @jyang2009 is currently working on publishing her data for one project and we were wondering what the status of publishing the data is at the moment.

@stale stale bot removed the stale label Mar 26, 2024
@srmnitc
Copy link
Member Author

srmnitc commented Mar 28, 2024

I can pick this up again and finish it. Would be the week after Easter break.

@jyang2009
Copy link

Hi Sarath @srmnitc ,

I've found a bug in the pack function. Please see the issue here:
#1402

Best,
Jing

@samwaseda samwaseda self-assigned this May 22, 2024
@samwaseda samwaseda changed the base branch from main to pack_unpack May 23, 2024 08:41
@samwaseda
Copy link
Member

I merge this one to a normal branch (pack_unpack) because I take over the whole work and it appears too complicated for me to figure out how to work on forked branch

@samwaseda samwaseda marked this pull request as ready for review May 23, 2024 08:54
@samwaseda samwaseda merged commit 3128b29 into pyiron:pack_unpack May 23, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants