whisk-ml / whisk

whisk is a data science project framework that makes collaboration, reproducibility, and deployment "just work".
https://docs.whisk-ml.org
MIT License
10 stars 0 forks source link

Can't fully create a project #28

Open atremblay opened 4 years ago

atremblay commented 4 years ago

and

Description

Following the basic instructions on the README. It builds part of the project and then crashes (see below)

.rw-r--r--  168 alexis  4 Jun 12:21 .envrc
.rw-r--r--  168 alexis  4 Jun 12:19 .envrc.example
drwxr-xr-x    - alexis  4 Jun 12:21 .git
.rw-r--r--  980 alexis  4 Jun 12:19 .gitignore
.rw-r--r--  220 alexis  4 Jun 12:19 .slugignore
drwxr-xr-x    - alexis  4 Jun 12:19 .whisk
drwxr-xr-x    - alexis  4 Jun 12:19 __pycache__
drwxr-xr-x    - alexis  4 Jun 12:19 app
drwxr-xr-x    - alexis  4 Jun 12:19 data
drwxr-xr-x    - alexis  4 Jun 12:19 docs
.rw-r--r--   51 alexis  4 Jun 12:19 MANIFEST.in
drwxr-xr-x    - alexis  4 Jun 12:19 notebooks
.rw-r--r-- 1.4k alexis  4 Jun 12:19 README.md
drwxr-xr-x    - alexis  4 Jun 12:19 references
drwxr-xr-x    - alexis  4 Jun 12:19 reports
.rw-r--r-- 1.1k alexis  4 Jun 12:19 requirements.txt
.rw-r--r--  969 alexis  4 Jun 12:19 setup.py
drwxr-xr-x    - alexis  4 Jun 12:19 src
drwxr-xr-x    - alexis  4 Jun 12:19 tests
.rw-r--r--  420 alexis  4 Jun 12:19 tox.ini
drwxr-xr-x    - alexis  4 Jun 12:20 venv
drwxr-xr-x    - alexis  4 Jun 12:19 whisk_commands

What I Did

$ pip install whisk
$ whisk create demo. <--- crash here
$ cd demo
$ source venv/bin/activate
$ whisk create demo
│
├── Creating project directory structure...
|   ├── Project created in /Users/alexis/demo
|   ├── DONE.
│
├── Setting up venv...
|   ├── DONE.
│
├── Installing Python dependencies via pip  (may take several minutes)...
|   ├── WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
|   ├── You should consider upgrading via the 'pip install --upgrade pip' command.
|   ├── DONE.
│
├── Checking if a git repo has been initialized...
|   ├── False
│
├── Initializing the Git repo
|   ├── DONE.
│
├── Setting up kernel=demo for Jupyter Notebooks...
|   ├── Installed kernelspec demo in /Users/alexis/Library/Jupyter/kernels/demo
|   ├── DONE.
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
  File "/Users/alexis/miniconda3/envs/workbench/bin/whisk", line 8, in <module>
    sys.exit(cli())
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/whisk/cli/commands/create.py", line 45, in cli
    ctx.invoke(setup_cli, dir = res)
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/whisk/cli/commands/project/setup.py", line 19, in cli
    whisk.setup.setup(dir)
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/whisk/setup.py", line 205, in setup
    exec_setup(project)
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/whisk/setup.py", line 116, in exec_setup
    if not is_git_repo and git.has_unstaged_changes():
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/site-packages/whisk/git.py", line 25, in has_unstaged_changes
    universal_newlines=True)
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/Users/alexis/miniconda3/envs/workbench/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'git status --porcelain' returned non-zero exit status 128.
atremblay commented 4 years ago

Possible workaround:

$ mkdir demo
$ cd demo
$ git init
$ cd ..
$ whisk create demo --force
ebrunet28 commented 3 years ago

Possible workaround:

$ mkdir demo
$ cd demo
$ git init
$ cd ..
$ whisk create demo --force

I had the same issue and it worked for me.