Commit Graph

6 Commits

Author SHA1 Message Date
Al Bailey 5fff425f25 Update tox path for python3
- The reference to cgcs_patch was the older centos python2
location, and has now bee updated to the python3 debian
package.

- Removed 'legacy-resolver' from the pip install command.

- The basepython is now python3 and the upper-constraints
for debian and python3 are now specified.

- The older python2 to 3 conversion directives in pylint
have been removed, and only the errors that are currently
valid are being suppressed.

- The python2 vs python3 requirements are now updated to
only reflect python3.

- The zuul job for pylint specifies the debian nodeset.

- override tox constraints file to use the STX constraints
  This means starlingx/root needs to be a required project

None of these changes have any runtime effect.
These changes only affect tox and zuul.

Test Plan:
  PASS: tox

Story: 2010642
Task: 47916
Change-Id: I1cd8a78e5e26efc4b3d4b346749735e4de9f6016
Signed-off-by: Al Bailey <al.bailey@windriver.com>
2023-05-01 14:01:17 +00:00
Bernardo Decco 550c0fe2c5 Re-enable important py3k checks for gui
Re-enabling some of the disabled tox warnings present on
the pylint.rc file
Re-enabling:

W1619: old-division
W1633: round-builtin
W1637: zip-builtin-not-iterating
W1639: filter-builtin-not-iterating

Note:
W1633: Was suppressed inline and floated to keep the same behavior from
py2
W1619: No change needed. Suppressed inline added.

Test Plan: Sanity test run on AIO-SX:

PASS: test_system_health_pre_session[pods]
PASS: test_system_health_pre_session[alarms]
PASS: test_system_health_pre_session[system_apps]
PASS: test_wr_analytics[deploy_and_remove]
PASS: test_horizon_host_inventory_display
PASS: test_lock_unlock_host[controller]
PASS: test_pod_to_pod_connection
PASS: test_pod_to_service_connection
PASS: test_host_to_service_connection

Story: 2006796
Task: 43381
Signed-off-by: Bernardo Decco <bernardo.deccodesiqueira@windriver.com>
Change-Id: I809adc421a155f5efcc88827b00401477eecb1f3
2021-10-21 12:35:20 +00:00
Bernardo Decco 8a62ff5708 Add pylint py3 portability checks for the gui repo
A lot of work has gone into making sure that StarlingX is python3
compatible. To ensure future compatibility, enable the python3
portability checks. Disable the checks that are raising errors.
Another set of commits will address the offending code.

Story: 2006796
Task: 43270
Signed-off-by: Bernardo Decco <bernardo.deccodesiqueira@windriver.com>
Change-Id: If01168c4bc2469fe8f633ed9b23f408cb96c93a1
2021-09-15 15:27:24 -03:00
albailey 927bee2d66 Use newer flake8 to run on ubuntu-focal Zuul machines
flake8 2.5.5  fails on ubuntu-focal zuul machines running python3.8
with the following error:
AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

The update updates the version constraint to use newer flake8.

pylint has been switched to running in python3 which has challenges
related to the new pip resolver. The correct version of Django cannot
be specified with the new resolver so the pylint errors caused
by the newer version are suppressed for now.

The docs targets for tox use their own install_command which
does not include an upper constraint.

A non ascii character was removed from the tox.ini file which
prevented running tox on some ubuntu envs.

Partial-Bug: 1895054
Signed-off-by: albailey <Al.Bailey@windriver.com>
Change-Id: Ic6a50c2ecf2a654fd883ed92fc305336741d4303
2020-12-21 12:34:37 -06:00
Eric Barrett 827e89c04a Enable Signature Differs Warning in pylint
Pylint currently ignores any signature differs (W0222) warnings
Enable it for more thorough testing of code

Change-Id: Iddb8734eb70e9e099d50ba0e458190053a8cd51b
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-03-18 12:06:03 -04:00
Kristine Bujold e79dcfae87 Enable zuul unit tests for stx-gui
Enable pylint and fix tox errors resulting from that.

Story: 2003863
Task: 27931

Change-Id: I3455f29ec182ed91966d4724cf49dceb314a1387
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2018-11-23 14:29:29 -05:00