Commit 31150fac authored by Jonathan Tow's avatar Jonathan Tow
Browse files

Fix data path location

parent d7076a63
...@@ -33,13 +33,14 @@ class MuTualBase(Task): ...@@ -33,13 +33,14 @@ class MuTualBase(Task):
if self.BASE_PATH.exists(): if self.BASE_PATH.exists():
return return
Path.mkdir(self.BASE_PATH, parents=True) Path.mkdir(self.BASE_PATH, parents=True)
sh("wget https://github.com/Nealcly/MuTual/archive/master.zip") master_zip = Path("data/master.zip")
with zipfile.ZipFile("./master.zip", 'r') as zip: sh(f"wget https://github.com/Nealcly/MuTual/archive/master.zip -O {master_zip}")
zip.extractall("./data") with zipfile.ZipFile(master_zip, 'r') as zip:
Path("./data/Mutual-master/data/").rename("./data/mutual/") zip.extractall("data")
Path("data/MuTual-master/data").rename(str(self.BASE_PATH))
# Remove left over files and directories. # Remove left over files and directories.
Path("./master.zip").unlink() master_zip.unlink()
shutil.rmtree(Path("./data/MuTual-master")) shutil.rmtree(("data/MuTual-master"))
def has_training_docs(self): def has_training_docs(self):
return True return True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment