Skip to content

[#2833] unzip resource files to a folder#2842

Merged
sblack-usu merged 5 commits into2502-composite-resource-phase-2from
2833-unzip-to-folder
Jul 25, 2018
Merged

[#2833] unzip resource files to a folder#2842
sblack-usu merged 5 commits into2502-composite-resource-phase-2from
2833-unzip-to-folder

Conversation

@sblack-usu
Copy link
Contributor

Pull Request Checklist:

  • Positive Test Case Written by Dev
  • Automated Testing
  • Sufficient User and Developer Documentation
  • Passing Jenkins Build
  • Peer Code review and approval

Positive Test Case

  1. [Enter positive test case here]

@sblack-usu
Copy link
Contributor Author

Depends on hydroshare/django_irods#44

zip_fname = os.path.basename(zip_with_rel_path)
istorage.session.run("ibun", None, '-xDzip', zip_with_full_path, unzip_path)
unzip_path = istorage.unzip(zip_with_full_path)
link_irods_folder_to_django(resource, istorage, unzip_path, (zip_fname,))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are crating a new folder always as part of unzip, then no need to pass zip_fname to be excluded from linking.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, I've removed it.

# there should not be any resource files ending with _meta.xml or _resmap.xml
for res_file in self.composite_resource.files.all():
self.assertFalse(res_file.file_name.endswith('_mata.xml'))
self.assertFalse(res_file.file_name.endswith('_resmap.xml'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it needs to be inside the for loop

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@aphelionz
Copy link
Contributor

@sblack-usu Are we looking to get this merged into 1.16?

@aphelionz aphelionz added this to the Release 1.16 milestone Jul 24, 2018
@sblack-usu
Copy link
Contributor Author

yeah, it'll go in the composite resource phase 2 first... it's a solution to a bug that we found when unzipping at the aggregation level.

@sblack-usu
Copy link
Contributor Author

@pkdash - Is this good to merge into the composite resource branch now?

@sblack-usu sblack-usu merged commit b9112aa into 2502-composite-resource-phase-2 Jul 25, 2018
@sblack-usu sblack-usu deleted the 2833-unzip-to-folder branch December 13, 2019 19:35
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.

3 participants