Skip to content

Commit

Permalink
Issue #73: Add a notebook for OSF data upload/download tutorial. Add …
Browse files Browse the repository at this point in the history
…local variables for project ID and token in Project class.
  • Loading branch information
bongjinkoo committed May 4, 2022
1 parent 98e3536 commit 45200ac
Show file tree
Hide file tree
Showing 3 changed files with 2,978 additions and 2,822 deletions.
4 changes: 3 additions & 1 deletion ioSPI/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class Project:
"""

def __init__(self, username: str, token: str, project_id: str = "7g42j") -> None:
self.username = username
self.token = token
self.project_id = project_id

config_path = os.path.join(".osfcli.config")
Expand Down Expand Up @@ -80,7 +82,7 @@ def upload(self, remote_path, local_path):
E.g. 4v6x_randomrot_copy6_defocus3.0_yes_noise.txt
"""
print(f"Uploading {local_path} to {remote_path}...")
os.system(f"osf upload {local_path} {remote_path} ")
os.system(f"osf upload {local_path} {remote_path}")
print("Done!")


Expand Down
Loading

0 comments on commit 45200ac

Please sign in to comment.