As of Q3 2024, Fuchsia‘s Python toolchain now automatically enforces most of Honeydew’s conformance requirements. Teams may optionally run conformance.sh
for additional verification but they are no longer required to run it before code submission.
As of Q4 2023, Fuchsia does not automatically enforce coding standards on Python code and fix/flag the CL during development/review process.
Many teams across Fuchsia (and potentially third party vendors such as driver development):
To help facilitate #1, Honeydew relies on having solid unit test and functional test coverage.
To help facilitate #2, Honeydew relies on Google Python Style Guide (which contains a list of dos and don’ts for Python programs).
<device>.reboot()
actually reboots Fuchsia device) which can’t be ensured using unit test casesTo ease the development workflow, we have automated checking for these guidelines (everything except functional test cases). Users can run this script and fix any errors it suggests.
Note - Prior to running this, please make sure to follow the Honeydew Setup.
Run cd $FUCHSIA_DIR && sh $FUCHSIA_DIR/src/testing/end_to_end/honeydew/scripts/conformance.sh
and fix any errors it suggests.
Once the script has completed successfully, it will print output similar to the following:
INFO: Honeydew code has passed all of the conformance steps
This script will run the following scripts in same sequence:
Note - Prior to running this, please make sure to follow the Honeydew Setup.
Running cd $FUCHSIA_DIR && sh $FUCHSIA_DIR/src/testing/end_to_end/honeydew/scripts/install.sh
will install Honeydew
Running cd $FUCHSIA_DIR && sh $FUCHSIA_DIR/src/testing/end_to_end/honeydew/scripts/uninstall.sh
will uninstall Honeydew
Run cd $FUCHSIA_DIR && sh $FUCHSIA_DIR/src/testing/end_to_end/honeydew/scripts/format.sh
and fix any errors it suggests.
Run cd $FUCHSIA_DIR && sh $FUCHSIA_DIR/src/testing/end_to_end/honeydew/scripts/coverage.sh
which will show comprehensive coverage on the entire Honeydew codebase.
For a targeted report on only the locally modified files, run the command above with the --affected
flag and fix any errors it suggests.