gslab-econ / gslab_python

Python tools for GSLab
MIT License
13 stars 11 forks source link

git-lfs command deprecated? #161

Closed jmshapir closed 6 years ago

jmshapir commented 6 years ago

I may be mistaken but I think the command git-lfs is no longer used as this functionality is available via command git. It should be possible to figure out whether I'm right using the git-lfs docs.

If I'm right we will likely need to update the way we check for git-lfs in configuration.

Example error below.


\paper_slides>python run.py
scons: Reading SConscript files ...
'git-lfs' is not recognized as an internal or external command,
operable program or batch file.
'git-lfs' is not recognized as an internal or external command,
operable program or batch file.
PrerequisiteError: Either Git LFS is not installed or your Git LFS settings need to be updated. Please install Git LFS or run 'git lfs install --force' if prompted above.:
  File "C:\Users\jshapir1\Documents\GitHub\Skills\paper_slides\SConstruct", line 12:
    [mode, cache_dir, CONFIG, executable_names, prereqs, pythonpath] = configuration(ARGUMENTS)
  File "../config\configuration.py", line 55:
    gslab_vers = CONFIG['global']['gslab_version'])
  File "C:\Python27\lib\site-packages\gslab_scons\check_prereq.py", line 36:
    check_git_lfs()
  File "C:\Python27\lib\site-packages\gslab_scons\check_prereq.py", line 100:
    raise PrerequisiteError(message)

\paper_slides>git lfs install
Updated git hooks.
Git LFS initialized.

\paper_slides>python run.py
scons: Reading SConscript files ...
'git-lfs' is not recognized as an internal or external command,
operable program or batch file.
'git-lfs' is not recognized as an internal or external command,
operable program or batch file.
PrerequisiteError: Either Git LFS is not installed or your Git LFS settings need to be updated. Please install Git LFS or run 'git lfs install --force' if prompted above.:
  File "C:\Users\jshapir1\Documents\GitHub\Skills\paper_slides\SConstruct", line 12:
    [mode, cache_dir, CONFIG, executable_names, prereqs, pythonpath] = configuration(ARGUMENTS)
  File "../config\configuration.py", line 55:
    gslab_vers = CONFIG['global']['gslab_version'])
  File "C:\Python27\lib\site-packages\gslab_scons\check_prereq.py", line 36:
    check_git_lfs()
  File "C:\Python27\lib\site-packages\gslab_scons\check_prereq.py", line 100:
    raise PrerequisiteError(message)
Shun-Yang commented 6 years ago

From wiki-page of the git-lfs repo:

screen shot 2018-09-20 at 3 07 01 pm

How to install page:

screen shot 2018-09-20 at 3 07 54 pm
Shun-Yang commented 6 years ago

@jmshapir, it seems like we still need to install git lfs per the above comment.

The error I'm guessing is that in the current code, we are using the command git-lfs install instead of git lfs install. Both work on Mac, but git-lfs install may not work on Windows. I don't have a Windows machine on my side --- do you mind trying git-lfs install in your terminal?

If this fails, then this is the issue and we should update our current code to git lfs install.

Shun-Yang commented 6 years ago

git-lfs install seems to be working on @z-y-huang's windows computer.

Need to look more into what's wrong.

jmshapir commented 6 years ago

@Shun-Yang see below. I could of course alias the command git-lfs to just point to the command "git" but that would just be a way to trick the config check.


C:\Users\jshapir1\Documents\GitHub\Skills>git-lfs install
'git-lfs' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\jshapir1\Documents\GitHub\Skills>git lfs install
Updated git hooks.
Git LFS initialized.
Shun-Yang commented 6 years ago

@jmshapir Thanks! Your screenshot confirms that the command git-lfs installis indeed the issue. I think as long as we update our gslab_python code to use git lfs install for testing if one has git-lfs installed, then everything should work.

Shun-Yang commented 6 years ago

Bug fixed in branch dev_4.1.3. Will make a new release after #162.