anaconda / anaconda-project

Tool for encapsulating, running, and reproducing data science projects
https://anaconda-project.readthedocs.io/en/latest/
Other
217 stars 88 forks source link

[BUG] Unable to extract Zip file from Github #325

Open AlbertDeFusco opened 3 years ago

AlbertDeFusco commented 3 years ago

found in version 0.10.0

  1. Download this zip file: https://github.com/AlbertDeFusco/hello-world/archive/refs/heads/master.zip
  2. run anaconda-project unarchive

ouptut

>anaconda-project unarchive master.zip 
[Errno 13] Permission denied: '/var/folders/lk/s__7f9fx15x_zrw6q5xkmm500000gp/T/tmpti9r7o4l/hello-world-master/.gitignore'
Failed to read project archive.
AlbertDeFusco commented 3 years ago

Downloading the tar.gz file works, however.

(base) adefusco@0565-adefusco:Desktop>wget https://github.com/AlbertDeFusco/hello-world/archive/refs/heads/master.tar.gz
--2021-06-23 09:37:48--  https://github.com/AlbertDeFusco/hello-world/archive/refs/heads/master.tar.gz
Resolving github.com (github.com)... 140.82.114.3
Connecting to github.com (github.com)|140.82.114.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/AlbertDeFusco/hello-world/tar.gz/refs/heads/master [following]
--2021-06-23 09:37:48--  https://codeload.github.com/AlbertDeFusco/hello-world/tar.gz/refs/heads/master
Resolving codeload.github.com (codeload.github.com)... 140.82.112.10
Connecting to codeload.github.com (codeload.github.com)|140.82.112.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 619 [application/x-gzip]
Saving to: ‘master.tar.gz’

master.tar.gz                   100%[====================================================>]     619  --.-KB/s    in 0s      

2021-06-23 09:37:49 (6.21 MB/s) - ‘master.tar.gz’ saved [619/619]

(base) adefusco@0565-adefusco:Desktop>anaconda-project unarchive master.tar.gz 
Unpacking hello-world-master/.gitignore to /Users/adefusco/Desktop/hello-world-master/.gitignore
Unpacking hello-world-master/.projectignore to /Users/adefusco/Desktop/hello-world-master/.projectignore
Unpacking hello-world-master/README.md to /Users/adefusco/Desktop/hello-world-master/README.md
Unpacking hello-world-master/anaconda-project.yml to /Users/adefusco/Desktop/hello-world-master/anaconda-project.yml
Unpacking hello-world-master/hello.py to /Users/adefusco/Desktop/hello-world-master/hello.py
Project archive unpacked to /Users/adefusco/Desktop/hello-world-master.

One possibility is to

  1. Download tar.gz
  2. unarchive the file
  3. create a new Zip anaconda-project archive ../project.zip
  4. compare the new zip with the one from github