ElliotAOram / GhostPyramid

CS39440 Major project
0 stars 0 forks source link

Feature 9: Select word as Actor #53

Closed ElliotAOram closed 7 years ago

ElliotAOram commented 7 years ago

Description of work

Add the ability to select a word from the phrase. This feature also added global css

Merge criteria

Refs #52

ElliotAOram commented 7 years ago

Jenkins build graph

image

ElliotAOram commented 7 years ago

Jenkins build output: 89

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/52_feature_9^{commit}" # timeout=10
 > C:/Program Files/Git/bin/git.exe. rev-parse "refs/remotes/origin/origin/52_feature_9^{commit}" # timeout=10
Checking out Revision 597f9b38438da3b97fc6a88adeede3b3c57bf34f (refs/remotes/origin/52_feature_9)
 > C:/Program Files/Git/bin/git.exe. config core.sparsecheckout # timeout=10
 > C:/Program Files/Git/bin/git.exe. checkout -f 597f9b38438da3b97fc6a88adeede3b3c57bf34f
First time build. Skipping changelog.
[pythontests] $ cmd /c call C:\WINDOWS\TEMP\hudson8612611394583017716.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 3.272s

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

======

428 statements analysed.

Statistics by type

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

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |17     |17         |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |9      |9          |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |70     |69         |+1.00      |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|function |10     |10         |=          |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+

External dependencies

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

::

    charades 

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

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

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

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

      \-views (charades.urls)

    django 

      \-conf 

      | \-urls (charades.urls)

      \-contrib 

      | \-admin (charades.urls)

      | \-staticfiles 

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

      \-core 

      | \-wsgi (charades.wsgi)

      \-shortcuts (charades.views)

    selenium 

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

Raw metrics

-----------

+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |488    |55.45 |462      |+26.00     |
+----------+-------+------+---------+-----------+
|docstring |216    |24.55 |207      |+9.00      |
+----------+-------+------+---------+-----------+
|comment   |26     |2.95  |25       |+1.00      |
+----------+-------+------+---------+-----------+
|empty     |150    |17.05 |148      |+2.00      |
+----------+-------+------+---------+-----------+

Duplication

-----------

+-------------------------+------+---------+-----------+
|                         |now   |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines      |49    |49       |=          |
+-------------------------+------+---------+-----------+
|percent duplicated lines |5.698 |5.961    |-0.26      |
+-------------------------+------+---------+-----------+

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\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
...................................
----------------------------------------------------------------------
Ran 45 tests in 41.228s

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', 51001)
----------------------------------------
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 51233)
----------------------------------------
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

Changing the tests to be static has introduced an 10053 aborted connection error. This is caused by selenium and I have yet to establish the actual reason why this is happening. However this does not cause the tests to fail as it only happens that the end of a test. I will look into fixing this at a later stage