Closed pmayd closed 2 years ago
Ah, that makes sense because all the gitpython stuff was added after the download function but before the display function. That should also be an easy fix (famous last words).
After doing some thinking, should we just change the code to download to BITE_REPO
always instead of the current directory? The repo is required to use the submit feature and display already utilizes it. Maybe just display a warning immediately if any of the the three constants (username, password, and repo) haven't been set yet?
Decided to change the defaults from cwd to BITE_REPO
as determined by the $PYBITES_REPO
environment variable. Users can also provide a path for download/extraction, display, and submitting. What do you think about this? e54ed8d419eed06f5121cfefc6b280bdcf40e86b
made a few detailed comments to your commit ;)
Oh man, I didn't even know you could do that! It's like commenting on a google doc (can you tell I'm a teacher?). Thanks I'll look it over and see what I can fix.
Yep, normally you only comment on PR, but Github allows to comment on every commit in the history. But its not a review then, only single comments, a proper review is only done in the context of a PR
Tried to address all of your comments: 259b3353bd8c4319c60a7de3c56331756acd6a5f
Going with the init command addresses this issue. init mode - Issue #27
Currently when downloading via
eatlocal download 1
the repo is downloaded in the current working directory. However, when you want to display the just downloaded bite viaeatlocal display 1
you get anIndexError
if the env varPYBITES_REPO
is set. This is because display has a parameterbite_path
that defaults toBITE_REPO
, which in return is set toPYBITES_REPO
. So you can download a bite to the cwd, but not display it? This is strange.I suggest that the download should also per default download bites to the local bite repo unless the env var is not set, then default to cwd.