Skip to content

Commit 793087a

Browse files
committed
Change sketches report key from "fqbn" to "board"
Arduino CLI's issue tracker has shown that users have a lot of trouble with FQBN. For this reason, Arduino CLI will soon support the use of "board aliases" in place of FQBN. This is likely to become more commonly used than the FQBN. For this reason, it makes sense to change the key name to match the expected usage. "board" still applies well even if the value is an FQBN, whereas the reverse is not so. The move to reporting data for all sketches already causes a breaking change to the report, so updating the key name does no additional harm.
1 parent a6a5c92 commit 793087a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compilesketches/compilesketches.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class RunCommandOutput(enum.Enum):
8080
board_manager_platforms_path = arduino_cli_data_directory_path.joinpath("packages")
8181

8282
class ReportKeys:
83-
fqbn = "fqbn"
83+
board = "board"
8484
commit_hash = "commit_hash"
8585
commit_url = "commit_url"
8686
compilation_success = "compilation_success"
@@ -952,7 +952,7 @@ def get_sketches_report(self, sketch_report_list):
952952
current_git_ref = get_head_commit_hash()
953953

954954
sketches_report = {
955-
self.ReportKeys.fqbn: self.fqbn,
955+
self.ReportKeys.board: self.fqbn,
956956
self.ReportKeys.commit_hash: current_git_ref,
957957
self.ReportKeys.commit_url: ("https://github.com/"
958958
+ os.environ["GITHUB_REPOSITORY"]

compilesketches/tests/test_compilesketches.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ def test_get_sketches_report(monkeypatch, mocker):
15141514
compile_sketches = get_compilesketches_object(fqbn_arg=fqbn_arg)
15151515

15161516
assert compile_sketches.get_sketches_report(sketch_report_list=sketch_report_list) == {
1517-
compilesketches.CompileSketches.ReportKeys.fqbn: compile_sketches.fqbn,
1517+
compilesketches.CompileSketches.ReportKeys.board: compile_sketches.fqbn,
15181518
compilesketches.CompileSketches.ReportKeys.commit_hash: current_git_ref,
15191519
compilesketches.CompileSketches.ReportKeys.commit_url: ("https://github.com/"
15201520
+ github_repository
@@ -1531,7 +1531,7 @@ def test_get_sketches_report(monkeypatch, mocker):
15311531
compilesketches.CompileSketches.get_sizes_summary_report.return_value = []
15321532

15331533
assert compile_sketches.get_sketches_report(sketch_report_list=sketch_report_list) == {
1534-
compilesketches.CompileSketches.ReportKeys.fqbn: compile_sketches.fqbn,
1534+
compilesketches.CompileSketches.ReportKeys.board: compile_sketches.fqbn,
15351535
compilesketches.CompileSketches.ReportKeys.commit_hash: current_git_ref,
15361536
compilesketches.CompileSketches.ReportKeys.commit_url: ("https://github.com/"
15371537
+ github_repository

0 commit comments

Comments
 (0)