On 30 Oct 2023, at 11:50, Jakob Meng wrote:
> On 27.10.23 15:52, Eelco Chaudron wrote: >> On 25 Oct 2023, at 11:37, [email protected] wrote: >>> From: Jakob Meng <[email protected]> >>> >>> This patch introduces support for different output formats to the >>> Python code, as did the previous commit for ovs-xxx tools like >>> 'ovs-appctl --format json dpif/show'. >>> In particular, tests/appctl.py gains a global option '-f,--format' >>> which allows users to request JSON instead of plain-text for humans. >>> >>> This patch does not yet pass the choosen output format to commands. >>> Doing so requires changes to all command_register() calls and all >>> command callbacks. To improve readibility those changes have been >>> split out into a follow up patch. Respectively, whenever an output >>> format other than 'text' is choosen for tests/appctl.py, the script >>> will fail. >>> >>> Reported-at: https://bugzilla.redhat.com/1824861 >>> Signed-off-by: Jakob Meng <[email protected]> >> Note reviewed anything yet, but I get some flake8 errors when compiling your >> series: >> >> pends.py build-aux/soexpand.py build-aux/xml2nroff' && \ >> flake8 $src --select=H231,H232,H233,H238 && \ >> flake8 $src >> --ignore=E121,E123,E125,E126,E127,E128,E129,E131,E203,E722,W503,W504,F811,D,H,I >> && \ >> touch flake8-check >> python/ovs/unixctl/__init__.py:25:50: E261 at least two spaces before inline >> comment >> python/ovs/unixctl/__init__.py:30:9: E265 block comment should start with '# >> ' >> python/ovs/unixctl/__init__.py:73:68: E261 at least two spaces before inline >> comment >> python/ovs/unixctl/server.py:114:27: F821 undefined name 'params' >> python/ovs/unixctl/server.py:118:19: E111 indentation is not a multiple of 4 >> python/ovs/unixctl/server.py:148:51: E261 at least two spaces before inline >> comment >> python/ovs/unixctl/server.py:239:1: E302 expected 2 blank lines, found 1 >> make[1]: *** [Makefile:6795: flake8-check] Error 1 >> >> >> FYI if you install flake8 on your system, re-run ./configure it will pick >> these up as part of your compile process (and make sure you add >> --enable-Werror). >> > > Thank you, Eelco, for pointing this out. I was not aware that flake8 is > actually incorporated into the build if available. This reminds me of > something which bothers me about the OVS docs: > > It documents requirements and steps for building and installing OVS in great > detail (e.g. [0]). It lists all kinds of configure flags one could use and > software packages one could install and often gives rationale for it. But for > starters this is overwhelming! > > Please gimme a brief list of commands to get started on common OSes such as > Debian/Ubuntu and/or Fedora/RHEL. For example, put it at the beginning of > [0]. A list which reflects what you and other experienced OVS devs typically > use in their day to day work. Without experience in OVS, how else are > starters supposed to know which configure flags to use and which software to > install? I believe all the information you're looking for is actually included in the document you mentioned. I understand that it might appear a bit scattered, but the main issue here is that not everyone takes the time to thoroughly read through it. It's worth noting that all the essential development tools are listed right here: "If you're planning to make significant modifications to Open vSwitch, it's a good idea to install the following tools for better warnings." However, if you have time to submit a patch making the documentation more new user-friendly, that would be fantastic! Unfortunately, it seems that many people tend to overlook the finer details. For instance, very few actually follow through with running utilities/checkpatch.py, as suggested in the submitting-patches section. 😊 The following gives an idea of what the CI installs for Ubuntu; https://github.com/chaudron/ovs/tree/master/.ci or if you want my personal Fedora set (does not include sparse): https://github.com/chaudron/ovs_dp_test/blob/main/Vagrantfile Cheers, Eelco > [0] https://docs.openvswitch.org/en/latest/intro/install/general/ > > The benefit for you will hopefully be better patches, without basic > shortcomings such as flake8 failures. > > Wdyt? _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
