ElliotAOram / GhostPyramid

CS39440 Major project
0 stars 0 forks source link

Feature 13: Allow user to guess phrase #61

Closed ElliotAOram closed 7 years ago

ElliotAOram commented 7 years ago

Description of work

The API does not need to be implemented to complete this feature but the infrastructure is put in place to allows the user to guess the phrase rather than the word. There will need to be a check put in place to see if the word is the phrase (e.g. one word phrase). This will be done in feature 16

Merge criteria

Refs #60

ElliotAOram commented 7 years ago

Jenkins build output

Started by user Elliot Oram
Building in workspace C:\Users\User\.jenkins\workspace\pythontests
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Done
Cloning the remote Git repository
Cloning repository https://github.com/ElliotAOram/GhostPyramid
 > C:/Program Files/Git/bin/git.exe. init C:\Users\User\.jenkins\workspace\pythontests # timeout=10
Fetching upstream changes from https://github.com/ElliotAOram/GhostPyramid
 > C:/Program Files/Git/bin/git.exe. --version # timeout=10
 > C:/Program Files/Git/bin/git.exe. fetch --tags --progress https://github.com/ElliotAOram/GhostPyramid +refs/heads/*:refs/remotes/origin/*
 > C:/Program Files/Git/bin/git.exe. config remote.origin.url https://github.com/ElliotAOram/GhostPyramid # timeout=10
 > C:/Program Files/Git/bin/git.exe. config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > C:/Program Files/Git/bin/git.exe. config remote.origin.url https://github.com/ElliotAOram/GhostPyramid # timeout=10
Fetching upstream changes from https://github.com/ElliotAOram/GhostPyramid
 > C:/Program Files/Git/bin/git.exe. fetch --tags --progress https://github.com/ElliotAOram/GhostPyramid +refs/heads/*:refs/remotes/origin/*
 > C:/Program Files/Git/bin/git.exe. rev-parse "refs/remotes/origin/60_feature_13^{commit}" # timeout=10
 > C:/Program Files/Git/bin/git.exe. rev-parse "refs/remotes/origin/origin/60_feature_13^{commit}" # timeout=10
Checking out Revision 91d1a90a7a52cb6b25b3aa5c5a62fe0e3cfbd090 (refs/remotes/origin/60_feature_13)
 > C:/Program Files/Git/bin/git.exe. config core.sparsecheckout # timeout=10
 > C:/Program Files/Git/bin/git.exe. checkout -f 91d1a90a7a52cb6b25b3aa5c5a62fe0e3cfbd090
 > C:/Program Files/Git/bin/git.exe. rev-list 6ce24ee7c08575460c71c3e6893f9c9249c4758a # timeout=10
[pythontests] $ cmd /c call C:\WINDOWS\TEMP\hudson5329258661478802649.bat

C:\Users\User\.jenkins\workspace\pythontests>set PYTHONPATH='C:\Python27' 

C:\Users\User\.jenkins\workspace\pythontests>pip install nose 
Requirement already satisfied: nose in c:\python27\lib\site-packages

C:\Users\User\.jenkins\workspace\pythontests>pip install pylint 
Requirement already satisfied: pylint in c:\python27\lib\site-packages
Requirement already satisfied: mccabe in c:\python27\lib\site-packages (from pylint)
Requirement already satisfied: isort>=4.2.5 in c:\python27\lib\site-packages (from pylint)
Requirement already satisfied: six in c:\python27\lib\site-packages (from pylint)
Requirement already satisfied: configparser; python_version == "2.7" in c:\python27\lib\site-packages (from pylint)
Requirement already satisfied: backports.functools-lru-cache; python_version == "2.7" in c:\python27\lib\site-packages (from pylint)
Requirement already satisfied: colorama; sys_platform == "win32" in c:\python27\lib\site-packages (from pylint)
Requirement already satisfied: astroid<1.5.0,>=1.4.5 in c:\python27\lib\site-packages (from pylint)
Requirement already satisfied: wrapt in c:\python27\lib\site-packages (from astroid<1.5.0,>=1.4.5->pylint)
Requirement already satisfied: lazy-object-proxy in c:\python27\lib\site-packages (from astroid<1.5.0,>=1.4.5->pylint)

C:\Users\User\.jenkins\workspace\pythontests>nosetests -v --with-xunit --with-coverage --cover-package=python --cover-inclusive --all-modules python/tests/ 
test_max_img_size_mt_res (python.tests.test_helper_functions.TestCalculateCropRange) ... ok
test_non_int_input (python.tests.test_helper_functions.TestCalculateCropRange) ... ok
test_non_zero_input (python.tests.test_helper_functions.TestCalculateCropRange) ... ok
test_positive_int (python.tests.test_helper_functions.TestCalculateCropRange) ... ok
test_valid_crop_range (python.tests.test_helper_functions.TestCalculateCropRange) ... ok
test_long_height_image_size (python.tests.test_helper_functions.TestCalculateImagePositions) ... ok
test_long_width_image_size (python.tests.test_helper_functions.TestCalculateImagePositions) ... ok
test_non_int_zero_negative (python.tests.test_helper_functions.TestCalculateImagePositions) ... ok
test_square_image_size (python.tests.test_helper_functions.TestCalculateImagePositions) ... ok
test_1080_display_length (python.tests.test_helper_functions.TestGetIdealImageResolution) ... ok
test_input_non_int_or_zero (python.tests.test_helper_functions.TestGetIdealImageResolution) ... ok
test_larger_than_known (python.tests.test_helper_functions.TestGetIdealImageResolution) ... ok
test_small_display_area (python.tests.test_helper_functions.TestGetIdealImageResolution) ... ok
test_correct_type_and_format (python.tests.test_helper_functions.TestGetScreenDimensions) ... ok
test_90_degree_rotation (python.tests.test_helper_functions.TestRotateImageClockwise) ... ok
test_no_rotation (python.tests.test_helper_functions.TestRotateImageClockwise) ... ok
test_height_mt_width (python.tests.test_helper_functions.TestScreenBoundaries) ... ok
test_non_int_zero_negative (python.tests.test_helper_functions.TestScreenBoundaries) ... ok
test_width_mt_height (python.tests.test_helper_functions.TestScreenBoundaries) ... ok
test_integer_zero (python.tests.test_parsers.TestIntParser) ... ok
test_negative (python.tests.test_parsers.TestIntParser) ... ok
test_non_int (python.tests.test_parsers.TestIntParser) ... ok
test_negative (python.tests.test_parsers.TestNonZeroParser) ... ok
test_positive (python.tests.test_parsers.TestNonZeroParser) ... ok
test_zero (python.tests.test_parsers.TestNonZeroParser) ... ok
test_negative (python.tests.test_parsers.TestPositiveParser) ... ok
test_positive (python.tests.test_parsers.TestPositiveParser) ... ok
test_zero (python.tests.test_parsers.TestPositiveParser) ... ok
test_begin_capture_from_webcam (python.tests.test_video_processor.TestCameraCapture) ... ok
test_begin_capture_with_non_int (python.tests.test_video_processor.TestCameraCapture) ... ok
test_end_capture_from_webcam (python.tests.test_video_processor.TestCameraCapture) ... ok
test_video_feed_initial_state (python.tests.test_video_processor.TestCameraCapture) ... ok
test_height_input (python.tests.test_video_processor.TestInitForVidoeProcessor) ... ok
test_no_input (python.tests.test_video_processor.TestInitForVidoeProcessor) ... ok
test_width_input (python.tests.test_video_processor.TestInitForVidoeProcessor) ... ok
test_close_to_resolution (python.tests.test_video_processor.TestScaleVideoFeed) ... ok
test_same_resolution_as_video (python.tests.test_video_processor.TestScaleVideoFeed) ... ok
test_scale_down_resolution (python.tests.test_video_processor.TestScaleVideoFeed) ... ok
test_up_scale_resolution (python.tests.test_video_processor.TestScaleVideoFeed) ... ok

----------------------------------------------------------------------
XML: C:\Users\User\.jenkins\workspace\pythontests\nosetests.xml
Name        Stmts   Miss  Cover
-------------------------------
python.py       0      0   100%
----------------------------------------------------------------------
Ran 39 tests in 4.238s

OK

C:\Users\User\.jenkins\workspace\pythontests>python -m coverage xml --include=python* --omit=python/vpa/run_vpa.py 

C:\Users\User\.jenkins\workspace\pythontests>pylint -f parseable -d I0011,R0801,E0401,E0611,W0403,W0401,C0412 --rcfile=.pylintrc python   1>pylint.out  & type pylint.out 

Report

======

330 statements analysed.

Statistics by type

------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |11     |11         |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |13     |13         |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |51     |51         |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |9      |9          |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+

External dependencies

---------------------

::

    cv2 (python.vpa.helper_functions,python.vpa.video_processor,python.tests.test_video_processor)

    numpy (python.vpa.video_processor,python.tests.test_helper_functions)

    python 

      \-tests 

      | \-context (python.tests.test_parsers,python.tests.test_helper_functions,python.tests.test_video_processor)

      \-vpa 

        \-helper_functions (python.vpa.video_processor)

        \-parsers (python.vpa.helper_functions,python.vpa.video_processor)

        \-video_processor (python.vpa.run_vpa)

Raw metrics

-----------

+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |378    |53.31 |378      |=          |
+----------+-------+------+---------+-----------+
|docstring |154    |21.72 |154      |=          |
+----------+-------+------+---------+-----------+
|comment   |46     |6.49  |46       |=          |
+----------+-------+------+---------+-----------+
|empty     |131    |18.48 |131      |=          |
+----------+-------+------+---------+-----------+

Duplication

-----------

+-------------------------+------+---------+-----------+
|                         |now   |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines      |0     |0        |=          |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |0.000    |=          |
+-------------------------+------+---------+-----------+

Messages by category

--------------------

+-----------+-------+---------+-----------+
|type       |number |previous |difference |
+===========+=======+=========+===========+
|convention |0      |0        |=          |
+-----------+-------+---------+-----------+
|refactor   |0      |0        |=          |
+-----------+-------+---------+-----------+
|warning    |0      |0        |=          |
+-----------+-------+---------+-----------+
|error      |0      |0        |=          |
+-----------+-------+---------+-----------+

Global evaluation

-----------------

Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

C:\Users\User\.jenkins\workspace\pythontests>cd charades 

C:\Users\User\.jenkins\workspace\pythontests\charades>pylint -f parseable -d I0011,R0801,E0401,E0611,W0403,W0401,C0412 --rcfile=..\.pylintrc charades   1>pylint_charades.out  & type pylint_charades.out 

Report

======

672 statements analysed.

Statistics by type

------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |21     |21         |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |13     |13         |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |101    |101        |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |15     |15         |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+

External dependencies

---------------------

::

    charades 

      \-actor (charades.views,charades.test.test_game,charades.test.test_actor)

      \-game (charades.views,charades.test.test_game)

      \-phrases (charades.views,charades.test.test_phrases)

      \-strings (charades.views,charades.test.test_instructions,charades.test.test_index)

      \-viewer (charades.views,charades.test.test_game,charades.test.test_viewer)

      \-views (charades.urls)

    django 

      \-conf 

      | \-urls (charades.urls)

      \-contrib 

      | \-admin (charades.urls)

      | \-staticfiles 

      |   \-testing (charades.test.test_guess,charades.test.test_select_phrase,charades.test.test_acting,charades.test.test_api_phrase_ready,charades.test.test_index,charades.test.test_instructions)

      \-core 

      | \-urlresolvers (charades.views)

      | \-wsgi (charades.wsgi)

      \-shortcuts (charades.views)

    selenium 

      \-common 

      | \-exceptions (charades.test.test_guess)

      \-webdriver (charades.test.test_guess,charades.test.test_select_phrase,charades.test.test_acting,charades.test.test_api_phrase_ready,charades.test.test_index,charades.test.test_instructions)

Raw metrics

-----------

+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |763    |57.76 |763      |=          |
+----------+-------+------+---------+-----------+
|docstring |334    |25.28 |331      |+3.00      |
+----------+-------+------+---------+-----------+
|comment   |29     |2.20  |29       |=          |
+----------+-------+------+---------+-----------+
|empty     |195    |14.76 |195      |=          |
+----------+-------+------+---------+-----------+

Duplication

-----------

+-------------------------+------+---------+-----------+
|                         |now   |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines      |48    |48       |=          |
+-------------------------+------+---------+-----------+
|percent duplicated lines |3.701 |3.709    |-0.01      |
+-------------------------+------+---------+-----------+

Messages by category

--------------------

+-----------+-------+---------+-----------+
|type       |number |previous |difference |
+===========+=======+=========+===========+
|convention |0      |1        |-1.00      |
+-----------+-------+---------+-----------+
|refactor   |0      |0        |=          |
+-----------+-------+---------+-----------+
|warning    |0      |0        |=          |
+-----------+-------+---------+-----------+
|error      |0      |0        |=          |
+-----------+-------+---------+-----------+

Global evaluation

-----------------

Your code has been rated at 10.00/10 (previous run: 9.99/10, +0.01)

C:\Users\User\.jenkins\workspace\pythontests\charades>pip install django==1.8.13 
Requirement already satisfied: django==1.8.13 in c:\python27\lib\site-packages

C:\Users\User\.jenkins\workspace\pythontests\charades>pip install -U selenium 
Requirement already up-to-date: selenium in c:\python27\lib\site-packages

C:\Users\User\.jenkins\workspace\pythontests\charades>pip install django-jenkins 
Requirement already satisfied: django-jenkins in c:\python27\lib\site-packages
Requirement already satisfied: Django>=1.8 in c:\python27\lib\site-packages (from django-jenkins)

C:\Users\User\.jenkins\workspace\pythontests\charades>cd charades\test 

C:\Users\User\.jenkins\workspace\pythontests\charades\charades\test>python ..\..\manage.py jenkins 
Traceback (most recent call last):
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 128, in finish_response
    self.write(data)
  File "C:\Python27\lib\wsgiref\handlers.py", line 212, in write
    self.send_headers()
  File "C:\Python27\lib\wsgiref\handlers.py", line 270, in send_headers
    self.send_preamble()
  File "C:\Python27\lib\wsgiref\handlers.py", line 194, in send_preamble
    'Date: %s\r\n' % format_date_time(time.time())
  File "C:\Python27\lib\socket.py", line 328, in write
    self.flush()
  File "C:\Python27\lib\socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 102, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\SocketServer.py", line 657, in __init__
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 716, in finish
    self.wfile.close()
  File "C:\Python27\lib\socket.py", line 283, in close
    self.flush()
  File "C:\Python27\lib\socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
....Traceback (most recent call last):
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 128, in finish_response
    self.write(data)
  File "C:\Python27\lib\wsgiref\handlers.py", line 212, in write
    self.send_headers()
  File "C:\Python27\lib\wsgiref\handlers.py", line 270, in send_headers
    self.send_preamble()
  File "C:\Python27\lib\wsgiref\handlers.py", line 194, in send_preamble
    'Date: %s\r\n' % format_date_time(time.time())
  File "C:\Python27\lib\socket.py", line 328, in write
    self.flush()
  File "C:\Python27\lib\socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 102, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\SocketServer.py", line 657, in __init__
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 716, in finish
    self.wfile.close()
  File "C:\Python27\lib\socket.py", line 283, in close
    self.flush()
  File "C:\Python27\lib\socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
....Traceback (most recent call last):
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 128, in finish_response
    self.write(data)
  File "C:\Python27\lib\wsgiref\handlers.py", line 212, in write
    self.send_headers()
  File "C:\Python27\lib\wsgiref\handlers.py", line 270, in send_headers
    self.send_preamble()
  File "C:\Python27\lib\wsgiref\handlers.py", line 194, in send_preamble
    'Date: %s\r\n' % format_date_time(time.time())
  File "C:\Python27\lib\socket.py", line 328, in write
    self.flush()
  File "C:\Python27\lib\socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 102, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\SocketServer.py", line 657, in __init__
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 716, in finish
    self.wfile.close()
  File "C:\Python27\lib\socket.py", line 283, in close
    self.flush()
  File "C:\Python27\lib\socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
...........Traceback (most recent call last):
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 128, in finish_response
    self.write(data)
  File "C:\Python27\lib\wsgiref\handlers.py", line 212, in write
    self.send_headers()
  File "C:\Python27\lib\wsgiref\handlers.py", line 270, in send_headers
    self.send_preamble()
  File "C:\Python27\lib\wsgiref\handlers.py", line 194, in send_preamble
    'Date: %s\r\n' % format_date_time(time.time())
  File "C:\Python27\lib\socket.py", line 328, in write
    self.flush()
  File "C:\Python27\lib\socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 102, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\SocketServer.py", line 657, in __init__
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 716, in finish
    self.wfile.close()
  File "C:\Python27\lib\socket.py", line 283, in close
    self.flush()
  File "C:\Python27\lib\socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
.............................................
----------------------------------------------------------------------
Ran 64 tests in 90.808s

OK
C:\Python27\lib\site-packages\django_jenkins\management\commands\jenkins.py:139: UserWarning: No PROJECT_APPS settings, coverage gathered over all apps
  warnings.warn('No PROJECT_APPS settings, coverage gathered over all apps')

Creating test database for alias 'default'...
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 56941)
----------------------------------------
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 57070)
----------------------------------------
test
test
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 57298)
----------------------------------------
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 57589)
----------------------------------------
Destroying test database for alias 'default'...
Done

C:\Users\User\.jenkins\workspace\pythontests\charades\charades\test>exit 0 
[Cobertura] Publishing Cobertura coverage report...
Publishing Cobertura coverage results...
Cobertura coverage report found.
Recording test results
Finished: SUCCESS
ElliotAOram commented 7 years ago

Jenkins build graphs

image