Page MenuHomePhabricator

[LNT] Refactored plot_parameters
ClosedPublic

Authored by kpdev42 on Oct 27 2021, 2:29 AM.

Details

Summary

Arguments like plot.0=1.2.3 are the same for the pages Graph and Matrix.
The class MatrixDataRequest has been renamed to PlotParameter
The common code has been moved to helper functions assert_field_idx_valid(), load_plot_parameter(), parse_plot_parameters(),parse_and_load_plot_parameters(), parse_mean_parameter().
Renamed graph_parameters and data_parameters to plot_parameters.

OS Laboratory. Huawei Russian Research Institute. Saint-Petersburg

Diff Detail

Repository
rLNT LNT

Event Timeline

kpdev42 created this revision.Oct 27 2021, 2:29 AM
kpdev42 requested review of this revision.Oct 27 2021, 2:29 AM

LGTM, but that patch introduces some flake8 regressions:

./lnt/server/ui/views.py:23:1: F401 'typing.List' imported but unused
./lnt/server/ui/views.py:765:13: E128 continuation line under-indented for visual indent
./lnt/server/ui/views.py:765:88: E502 the backslash is redundant between brackets
./lnt/server/ui/views.py:766:13: E128 continuation line under-indented for visual indent
./lnt/server/ui/views.py:815:84: E502 the backslash is redundant between brackets
./lnt/server/ui/views.py:819:9: E303 too many blank lines (2)
./lnt/server/ui/views.py:838:1: W293 blank line contains whitespace
./lnt/server/ui/views.py:854:13: E128 continuation line under-indented for visual indent
./lnt/server/ui/views.py:881:23: E128 continuation line under-indented for visual indent
./lnt/server/ui/views.py:903:23: E128 continuation line under-indented for visual indent
./lnt/server/ui/views.py:904:23: E128 continuation line under-indented for visual indent
6 E128 continuation line under-indented for visual indent
1 E303 too many blank lines (2)
2 E502 the backslash is redundant between brackets
1 F401 'typing.List' imported but unused
1 W293 blank line contains whitespace

Please fix those and run tox to check that it's happy.

kpdev42 updated this revision to Diff 382938.Oct 28 2021, 12:38 AM

Add cosmetics

Still have the following when running tox:

./lnt/server/ui/views.py:852:13: E128 continuation line under-indented for visual indent
./lnt/server/ui/views.py:880:28: E127 continuation line over-indented for visual indent
./lnt/server/ui/views.py:903:28: E127 continuation line over-indented for visual indent
2     E127 continuation line over-indented for visual indent
1     E128 continuation line under-indented for visual indent
thopre added inline comments.Oct 28 2021, 2:20 AM
lnt/server/ui/views.py
851–852
878–883

I think that's what flake8 wants, but do check by running tox.

thopre added inline comments.Oct 28 2021, 2:38 AM
lnt/server/ui/views.py
900–906

I think that's what tox wants.

thopre accepted this revision.Oct 28 2021, 2:39 AM

LGTM with the proposed changes. I'll land it for you with them.

This revision is now accepted and ready to land.Oct 28 2021, 2:39 AM
This revision was automatically updated to reflect the committed changes.
kpdev42 updated this revision to Diff 382966.Oct 28 2021, 2:49 AM
kpdev42 edited the summary of this revision. (Show Details)

Fixed flake8 regressions

LGTM with the proposed changes. I'll land it for you with them.

Please check, thank you

LGTM with the proposed changes. I'll land it for you with them.

Please check, thank you

Looks better than what I did but I've already landed the change.