Closed karlcow closed 7 years ago
We should probably configure what is harmless for the person, directories, etc and tackle the credentials. Once the person feels comfortable enough with the project.
What's the actionable request in this issue? Are you saying we should not ask for oauth creds in this tool?
What I said here: π
we should not ask the credentials as a mandatory thing.
Aka not make the credentials mandatory. The credentials are secondary. see #12 paths are essential. Let me try something
β¦ π β¦
β git clone git@github.com:webcompat/webcompat.com.git
Cloning into 'webcompat.com'...
remote: Counting objects: 19961, done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 19961 (delta 9), reused 14 (delta 5), pack-reused 19926
Receiving objects: 100% (19961/19961), 7.50 MiB | 1.08 MiB/s, done.
Resolving deltas: 100% (13228/13228), done.
Checking connectivity... done.
β cd webcompat.com/
β python run.py
Traceback (most recent call last):
File "run.py", line 39, in <module>
raise ImportError('{0}\n\n{1}'.format(e, IMPORT_ERROR))
ImportError: No module named flask
==============================================
It seems like you don't have all dependencies.
Please re-run:
pip install -r config/requirements.txt
==============================================
hmmm not good. Here we should probably warn about not being in a virtual environment. Not sure if we can detect this. Let's continue.
β mkvirtualenv -a ~/Documents/2017/08/25/webcompat.com deleteme
New python executable in /Users/karl/.virtualenvs/deleteme/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /Users/karl/.virtualenvs/deleteme/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/karl/.virtualenvs/deleteme/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/karl/.virtualenvs/deleteme/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/karl/.virtualenvs/deleteme/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/karl/.virtualenvs/deleteme/bin/get_env_details
Setting project for deleteme to /Users/karl/Documents/2017/08/25/webcompat.com
β pip install -r config/requirements.txt
Collecting Babel==2.3.4 (from -r config/requirements.txt (line 1))
Downloading Babel-2.3.4-py2.py3-none-any.whl (7.1MB)
100% |ββββββββββββββββββββββββββββββββ| 7.1MB 69kB/s
Collecting blinker==1.4 (from -r config/requirements.txt (line 2))
Downloading blinker-1.4.tar.gz (111kB)
100% |ββββββββββββββββββββββββββββββββ| 112kB 2.5MB/s
Collecting Flask==0.12 (from -r config/requirements.txt (line 3))
Downloading Flask-0.12-py2.py3-none-any.whl (82kB)
100% |ββββββββββββββββββββββββββββββββ| 92kB 3.5MB/s
Collecting Flask-Limiter==0.9.3 (from -r config/requirements.txt (line 4))
Downloading Flask-Limiter-0.9.3.tar.gz (82kB)
100% |ββββββββββββββββββββββββββββββββ| 92kB 3.3MB/s
Collecting Flask-SQLAlchemy==2.1 (from -r config/requirements.txt (line 5))
Downloading Flask-SQLAlchemy-2.1.tar.gz (95kB)
100% |ββββββββββββββββββββββββββββββββ| 102kB 3.0MB/s
Collecting Flask-WTF==0.14.2 (from -r config/requirements.txt (line 6))
Downloading Flask_WTF-0.14.2-py2.py3-none-any.whl
Collecting GitHub-Flask==3.1.5 (from -r config/requirements.txt (line 7))
Downloading GitHub-Flask-3.1.5.tar.gz
Collecting mock==2.0.0 (from -r config/requirements.txt (line 8))
Downloading mock-2.0.0-py2.py3-none-any.whl (56kB)
100% |ββββββββββββββββββββββββββββββββ| 61kB 2.9MB/s
Collecting nose==1.3.7 (from -r config/requirements.txt (line 9))
Downloading nose-1.3.7-py2-none-any.whl (154kB)
100% |ββββββββββββββββββββββββββββββββ| 163kB 1.8MB/s
Collecting pep8==1.7.0 (from -r config/requirements.txt (line 10))
Downloading pep8-1.7.0-py2.py3-none-any.whl (41kB)
100% |ββββββββββββββββββββββββββββββββ| 51kB 4.1MB/s
Collecting Pillow==4.0.0 (from -r config/requirements.txt (line 11))
Downloading Pillow-4.0.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.4MB)
100% |ββββββββββββββββββββββββββββββββ| 3.4MB 127kB/s
Collecting requests==2.13.0 (from -r config/requirements.txt (line 12))
Downloading requests-2.13.0-py2.py3-none-any.whl (584kB)
100% |ββββββββββββββββββββββββββββββββ| 593kB 481kB/s
Collecting ua-parser==0.7.2 (from -r config/requirements.txt (line 13))
Using cached ua_parser-0.7.2-py2.py3-none-any.whl
Collecting WTForms==2.1 (from -r config/requirements.txt (line 14))
Downloading WTForms-2.1.zip (553kB)
100% |ββββββββββββββββββββββββββββββββ| 563kB 561kB/s
Collecting pytz>=0a (from Babel==2.3.4->-r config/requirements.txt (line 1))
Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)
100% |ββββββββββββββββββββββββββββββββ| 491kB 623kB/s
Collecting itsdangerous>=0.21 (from Flask==0.12->-r config/requirements.txt (line 3))
Downloading itsdangerous-0.24.tar.gz (46kB)
100% |ββββββββββββββββββββββββββββββββ| 51kB 3.4MB/s
Collecting Werkzeug>=0.7 (from Flask==0.12->-r config/requirements.txt (line 3))
Downloading Werkzeug-0.12.2-py2.py3-none-any.whl (312kB)
100% |ββββββββββββββββββββββββββββββββ| 317kB 857kB/s
Collecting Jinja2>=2.4 (from Flask==0.12->-r config/requirements.txt (line 3))
Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)
100% |ββββββββββββββββββββββββββββββββ| 348kB 1.5MB/s
Collecting click>=2.0 (from Flask==0.12->-r config/requirements.txt (line 3))
Downloading click-6.7-py2.py3-none-any.whl (71kB)
100% |ββββββββββββββββββββββββββββββββ| 71kB 2.5MB/s
Collecting limits (from Flask-Limiter==0.9.3->-r config/requirements.txt (line 4))
Downloading limits-1.2.1-py2-none-any.whl
Collecting six>=1.4.1 (from Flask-Limiter==0.9.3->-r config/requirements.txt (line 4))
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting SQLAlchemy>=0.7 (from Flask-SQLAlchemy==2.1->-r config/requirements.txt (line 5))
Downloading SQLAlchemy-1.1.13.tar.gz (5.2MB)
100% |ββββββββββββββββββββββββββββββββ| 5.2MB 87kB/s
Collecting funcsigs>=1; python_version < "3.3" (from mock==2.0.0->-r config/requirements.txt (line 8))
Downloading funcsigs-1.0.2-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock==2.0.0->-r config/requirements.txt (line 8))
Downloading pbr-3.1.1-py2.py3-none-any.whl (99kB)
100% |ββββββββββββββββββββββββββββββββ| 102kB 3.2MB/s
Collecting olefile (from Pillow==4.0.0->-r config/requirements.txt (line 11))
Downloading olefile-0.44.zip (74kB)
100% |ββββββββββββββββββββββββββββββββ| 81kB 2.6MB/s
Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->Flask==0.12->-r config/requirements.txt (line 3))
Downloading MarkupSafe-1.0.tar.gz
Building wheels for collected packages: blinker, Flask-Limiter, Flask-SQLAlchemy, GitHub-Flask, WTForms, itsdangerous, SQLAlchemy, olefile, MarkupSafe
Running setup.py bdist_wheel for blinker ... done
Stored in directory: /Users/karl/Library/Caches/pip/wheels/7b/8a/eb/5a4f4444f366c515073db8a129c92d4727ad945e5e64b9e8bd
Running setup.py bdist_wheel for Flask-Limiter ... done
Stored in directory: /Users/karl/Library/Caches/pip/wheels/5a/d2/ab/02b9e13919f2da8973b45f1ebc3457d9daefa2657da2878643
Running setup.py bdist_wheel for Flask-SQLAlchemy ... done
Stored in directory: /Users/karl/Library/Caches/pip/wheels/cf/9f/1b/390c152e645c6e300fda9ed9c678c6e22717a3020fd02acb4d
Running setup.py bdist_wheel for GitHub-Flask ... done
Stored in directory: /Users/karl/Library/Caches/pip/wheels/90/c1/e4/d1768778d9158146912b3c3d487d6ea684b4786a19606cceb5
Running setup.py bdist_wheel for WTForms ... done
Stored in directory: /Users/karl/Library/Caches/pip/wheels/36/35/f3/7452cd24daeeaa5ec5b2ea13755316abc94e4e7702de29ba94
Running setup.py bdist_wheel for itsdangerous ... done
Stored in directory: /Users/karl/Library/Caches/pip/wheels/fc/a8/66/24d655233c757e178d45dea2de22a04c6d92766abfb741129a
Running setup.py bdist_wheel for SQLAlchemy ... done
Stored in directory: /Users/karl/Library/Caches/pip/wheels/f0/50/ca/3cb6e78527eb05e180d19632343ee14d2e5c164da2e61fbd2d
Running setup.py bdist_wheel for olefile ... done
Stored in directory: /Users/karl/Library/Caches/pip/wheels/20/58/49/cc7bd00345397059149a10b0259ef38b867935ea2ecff99a9b
Running setup.py bdist_wheel for MarkupSafe ... done
Stored in directory: /Users/karl/Library/Caches/pip/wheels/88/a7/30/e39a54a87bcbe25308fa3ca64e8ddc75d9b3e5afa21ee32d57
Successfully built blinker Flask-Limiter Flask-SQLAlchemy GitHub-Flask WTForms itsdangerous SQLAlchemy olefile MarkupSafe
Installing collected packages: pytz, Babel, blinker, itsdangerous, Werkzeug, MarkupSafe, Jinja2, click, Flask, six, limits, Flask-Limiter, SQLAlchemy, Flask-SQLAlchemy, WTForms, Flask-WTF, requests, GitHub-Flask, funcsigs, pbr, mock, nose, pep8, olefile, Pillow, ua-parser
Successfully installed Babel-2.3.4 Flask-0.12 Flask-Limiter-0.9.3 Flask-SQLAlchemy-2.1 Flask-WTF-0.14.2 GitHub-Flask-3.1.5 Jinja2-2.9.6 MarkupSafe-1.0 Pillow-4.0.0 SQLAlchemy-1.1.13 WTForms-2.1 Werkzeug-0.12.2 blinker-1.4 click-6.7 funcsigs-1.0.2 itsdangerous-0.24 limits-1.2.1 mock-2.0.0 nose-1.3.7 olefile-0.44 pbr-3.1.1 pep8-1.7.0 pytz-2017.2 requests-2.13.0 six-1.10.0 ua-parser-0.7.2
β python run.py
Traceback (most recent call last):
File "run.py", line 39, in <module>
raise ImportError('{0}\n\n{1}'.format(e, IMPORT_ERROR))
ImportError: import_string() failed for 'config'. Possible reasons are:
- missing __init__.py in a package;
- package or module path not included in sys.path;
- duplicated package or module name taking precedence in sys.path;
- missing module, class, function or variable;
Debugged import:
- 'config' not found.
Original exception:
ImportError: No module named secrets
==============================================
It seems like you don't have all dependencies.
Please re-run:
pip install -r config/requirements.txt
==============================================
Oh β¦ horrorβ¦ we have work to do. :) π± We should create a check for the secret.py file. Here is also a good opportunity to plug @zoepage tool (in its current form) to help people.
Let's continueβ¦
β cp config/secrets.py.example config/secrets.py
β python run.py
The OAUTH_TOKEN is not configured in your config file. You will need to set up one on github for testing your local developments. Read Instructions at https://github.com/webcompat/webcompat.com/blob/master/CONTRIBUTING.md#configuring-the-server
hmmm so I was wrong on this. I thought the project didn't require OAUTH_TOKEN for working.
weird.
```python
def config_validator():
'''Make sure the config file is ready.'''
# Checking if oauth token is configured
if app.config['OAUTH_TOKEN'] == '':
sys.exit(TOKEN_HELP)
yup that's it. If I put config_validator()
in a comment.
β python run.py
* Running on http://localhost:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 324-085-948
The app is starting and I get
RHaaaaa and it's my fault if we currently request the oauth token. geez. https://github.com/webcompat/webcompat.com/issues/284 https://github.com/webcompat/webcompat.com/pull/285
I have the feeling that was a bad idea from me now. Not very beginner friendly.
@zoepage is right when she says the project is a bit too hard to start. Thinking of good first bug like urlparse
.
So let's put this one on a low priority because the app requires it for now.
My feeling is that we should not ask the credentials as a mandatory thing. And specifically not the first mandatory thing. Even in my test with the cli tool, I'm reluctant to put an Oauth token there without really knowing what happens with it. We should probably configure what is harmless for the person, directories, etc and tackle the credentials. Once the person feels comfortable enough with the project.