timvideos / edid.tv

EDID Database Website
GNU General Public License v2.0
26 stars 7 forks source link

Make Travis Green Again #28

Closed pp3345 closed 5 years ago

todo[bot] commented 5 years ago

v1.1 works this way?

https://github.com/timvideos/edid.tv/blob/3ddf5514fcd2905deeca84137edf61b4c81b7878/edid_parser/edid_parser.py#L151-L155


This comment was generated by todo based on a TODO comment in 3ddf5514fcd2905deeca84137edf61b4c81b7878 in #28. cc @pp3345.
pp3345 commented 5 years ago

Ignore the bot. Just added a space between # and TODO. I don't have a clue what's going on with pylint in Travis now though.

mithro commented 5 years ago

Looks like pylint is having trouble importing the code;

40.51s$ pylint --reports=n *.py edid_parser/ frontend/
Using config file /home/travis/build/timvideos/edid.tv/pylintrc
************* Module edid.tv.edid_parser.tests
E:  6, 0: No name 'EDIDParser' in module 'edid_parser' (no-name-in-module)
E:  6, 0: No name 'EDIDParsingError' in module 'edid_parser' (no-name-in-module)
E:  6, 0: No name 'DisplayType' in module 'edid_parser' (no-name-in-module)
E:  6, 0: No name 'DisplayStereoMode' in module 'edid_parser' (no-name-in-module)
E:  6, 0: No name 'TimingSyncScheme' in module 'edid_parser' (no-name-in-module)
E:  6, 0: No name 'CVTSupportDefinitionPreferredAspectRatio' in module 'edid_parser' (no-name-in-module)
E:  6, 0: No name 'ColorBitDepth' in module 'edid_parser' (no-name-in-module)
E:  6, 0: No name 'DigitalVideoInterface' in module 'edid_parser' (no-name-in-module)
************* Module edid.tv.frontend.selenium_tests.test_update
E:  8, 0: Unable to import 'base' (import-error)
************* Module edid.tv.frontend.selenium_tests.test_login
E:  7, 0: Unable to import 'base' (import-error)
************* Module edid.tv.frontend.selenium_tests.test_upload
E:  8, 0: Unable to import 'base' (import-error)
-----------------------------------
Your code has been rated at 9.82/10

Might try PYTHONPATH=$PYTHONPATH:. in front of the command? See https://stackoverflow.com/questions/1899436/pylint-unable-to-import-error-how-to-set-pythonpath ?

Stack Overflow
PyLint "Unable to import" error - how to set PYTHONPATH?
I'm running PyLint from inside Wing IDE on Windows. I have a sub-directory (package) in my project and inside the package I import a module from the top level, ie. __init__.py myapp.py one.py subd...
mithro commented 5 years ago

Alternatively, edit ~/.pylintrc to include the directory above your module, like this:

[MASTER]
init-hook='import sys; sys.path.append("/path/to/root")'

(Or in other version of pylint, the init-hook requires you to change [General] to [MASTER])

Both of these options ought to work.

Hope that helps.

pp3345 commented 5 years ago

Neither of these seem to work. I don't really know what change is causing it to fail now in the first place, since it didn't have any issues finding stuff previously. Also, it's only failing for some imports. And it works fine on my machine.

pp3345 commented 5 years ago

It seems to work this way, however, now it doesn't include all subfolders of frontend/. Adding each single folder to the command line seems a bit hacky.

mithro commented 5 years ago

Great work!