From 62654170483411230d05ce0d6020d6c8576517a2 Mon Sep 17 00:00:00 2001 From: glitched-w0rld <164791169+glitched-w0rld@users.noreply.github.com> Date: Wed, 12 Mar 2025 15:57:06 -0400 Subject: [PATCH 1/2] Add missing language fences to `CONTRIBUTING.md` --- CONTRIBUTING.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 102614d4369..43b053b61da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -181,20 +181,20 @@ Below are some tips that might be useful and improve the development experience. * Install Pillow. For example, [here](ci/Dockerfile.micro) is what we do for the TFLM continuous integration Docker container. - ``` + ```bash pip install cpplint ``` * [yapf](https://github.com/google/yapf/) should be used for formatting Python code. For example: - ``` + ```bash pip install yapf yapf log_parser.py -i' ``` * Add a git hook to check for code style etc. prior to creating a pull request: - ``` + ```bash cp tensorflow/lite/micro/tools/dev_setup/pre-push.tflm .git/hooks/pre-push ``` @@ -205,20 +205,20 @@ Below are some tips that might be useful and improve the development experience. 1. Run in-place clang-format on all the files that are modified in your git tree with - ``` + ```bash clang-format -i -style=google `git ls-files -m | grep "\.cc"` clang-format -i -style=google `git ls-files -m | grep "\.h"` ``` 1. Make sure your code is lint-free. - ``` + ```bash cpplint `git ls-files -m` ``` 1. Run all the tests for x86, and any other platform that you are modifying. - ``` + ```bash tensorflow/lite/micro/tools/ci_build/test_x86_default.sh ``` @@ -230,7 +230,7 @@ Below are some tips that might be useful and improve the development experience. following commands (replace `micro_interpreter_test` with the target that you want to test: - ``` + ```bash CC=clang bazel run --config=asan tensorflow/lite/micro:micro_interpreter_test CC=clang bazel run --config=msan tensorflow/lite/micro:micro_interpreter_test CC=clang bazel run --config=ubsan tensorflow/lite/micro:micro_interpreter_test @@ -248,20 +248,20 @@ Below are some tips that might be useful and improve the development experience. Assuming that you forked tensorflow and added a remote called upstream with: - ``` + ```bash git remote add upstream https://github.com/tensorflow/tflite-micro.git ``` Fetch the latest changes from upstream and merge into your local branch. - ``` + ```bash git fetch upstream git merge upstream/main ``` In case of a merge conflict, resolve via: - ``` + ```bash git mergetool # Use your favorite diff tools (e.g. meld) to resolve the conflicts. From d0bb62d68f7528be67bba2e144fdd3c35c6652f8 Mon Sep 17 00:00:00 2001 From: glitched-w0rld <164791169+glitched-w0rld@users.noreply.github.com> Date: Wed, 12 Mar 2025 15:57:40 -0400 Subject: [PATCH 2/2] (missed one) --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43b053b61da..c2009a07160 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -293,7 +293,7 @@ Below are some tips that might be useful and improve the development experience. And a sketch of the steps: - ``` + ```bash git remote add git@github.com:/tflite-micro.git git fetch