aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-07-30 15:37:18 +1000
committerGitHub <noreply@github.com>2021-07-29 22:37:18 -0700
commit25f43837d2d603505a498662993bdeaecb7bc43d (patch)
tree476cda71954995b842c9737d11577ca96811bc63
parent441914e0ad6163a83cd19953821e191033a45fe2 (diff)
downloadqmk_firmware-25f43837d2d603505a498662993bdeaecb7bc43d.tar.gz
qmk_firmware-25f43837d2d603505a498662993bdeaecb7bc43d.zip
Remove references to info.json `width` and `height` in CLI (#13728)
-rw-r--r--data/schemas/keyboard.jsonschema2
-rw-r--r--docs/ja/reference_configurator_support.md2
-rw-r--r--docs/ja/reference_info_json.md4
-rw-r--r--docs/reference_configurator_support.md2
-rw-r--r--docs/reference_info_json.md4
-rwxr-xr-xlib/python/qmk/cli/info.py2
-rwxr-xr-xlib/python/qmk/cli/kle2json.py2
-rwxr-xr-xlib/python/qmk/json_encoders.py3
-rw-r--r--lib/python/qmk/tests/minimal_info.json2
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py4
10 files changed, 2 insertions, 25 deletions
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 6ac2c7c60..764f66524 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -29,8 +29,6 @@
29 "enum": ["COL2ROW", "ROW2COL"] 29 "enum": ["COL2ROW", "ROW2COL"]
30 }, 30 },
31 "debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"}, 31 "debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"},
32 "height": {"$ref": "qmk.definitions.v1#/key_unit"},
33 "width": {"$ref": "qmk.definitions.v1#/key_unit"},
34 "community_layouts": { 32 "community_layouts": {
35 "type": "array", 33 "type": "array",
36 "items": {"$ref": "qmk.definitions.v1#/filename"} 34 "items": {"$ref": "qmk.definitions.v1#/filename"}
diff --git a/docs/ja/reference_configurator_support.md b/docs/ja/reference_configurator_support.md
index 4fb98fc0e..83d6d648d 100644
--- a/docs/ja/reference_configurator_support.md
+++ b/docs/ja/reference_configurator_support.md
@@ -104,8 +104,6 @@ JSON ファイルをビルドする最も簡単な方法は、[Keyboard Layout E
104 "tags": { 104 "tags": {
105 "form_factor": "numpad" 105 "form_factor": "numpad"
106 }, 106 },
107 "width": 4,
108 "height": 5,
109 "layouts": { 107 "layouts": {
110 "LAYOUT": { 108 "LAYOUT": {
111 "layout": [ 109 "layout": [
diff --git a/docs/ja/reference_info_json.md b/docs/ja/reference_info_json.md
index 5b9a1b6b6..7346a6395 100644
--- a/docs/ja/reference_info_json.md
+++ b/docs/ja/reference_info_json.md
@@ -20,10 +20,6 @@
20 * キーボードの製品ページ、[QMK.fm/keyboards](https://qmk.fm/keyboards) のページ、あるいはキーボードに関する情報を説明する他のページの URL。 20 * キーボードの製品ページ、[QMK.fm/keyboards](https://qmk.fm/keyboards) のページ、あるいはキーボードに関する情報を説明する他のページの URL。
21* `maintainer` 21* `maintainer`
22 * メンテナの GitHub のユーザ名、あるいはコミュニティが管理するキーボードの場合は `qmk` 22 * メンテナの GitHub のユーザ名、あるいはコミュニティが管理するキーボードの場合は `qmk`
23* `width`
24 * キー単位でのキーボードの幅
25* `height`
26 * キー単位でのキーボードの高さ
27* `layouts` 23* `layouts`
28 * 物理的なレイアウト表現。詳細は以下のセクションを見てください。 24 * 物理的なレイアウト表現。詳細は以下のセクションを見てください。
29 25
diff --git a/docs/reference_configurator_support.md b/docs/reference_configurator_support.md
index 1b34c85a2..ba3d49e2b 100644
--- a/docs/reference_configurator_support.md
+++ b/docs/reference_configurator_support.md
@@ -99,8 +99,6 @@ Use the `keyboard_name` object to set the name of the keyboard. For instruction
99 "tags": { 99 "tags": {
100 "form_factor": "numpad" 100 "form_factor": "numpad"
101 }, 101 },
102 "width": 4,
103 "height": 5,
104 "layouts": { 102 "layouts": {
105 "LAYOUT": { 103 "LAYOUT": {
106 "layout": [ 104 "layout": [
diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md
index 30d813e93..cf492629f 100644
--- a/docs/reference_info_json.md
+++ b/docs/reference_info_json.md
@@ -15,10 +15,6 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai
15 * A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard. 15 * A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard.
16* `maintainer` 16* `maintainer`
17 * GitHub username of the maintainer, or `qmk` for community maintained boards 17 * GitHub username of the maintainer, or `qmk` for community maintained boards
18* `width`
19 * Width of the board in Key Units
20* `height`
21 * Height of the board in Key Units
22* `debounce` 18* `debounce`
23 * How many milliseconds (ms) to wait for debounce to happen. (Default: 5) 19 * How many milliseconds (ms) to wait for debounce to happen. (Default: 5)
24* `diode_direction` 20* `diode_direction`
diff --git a/lib/python/qmk/cli/info.py b/lib/python/qmk/cli/info.py
index 0d08d242c..337b494a9 100755
--- a/lib/python/qmk/cli/info.py
+++ b/lib/python/qmk/cli/info.py
@@ -87,8 +87,6 @@ def print_friendly_output(kb_info_json):
87 cli.echo('{fg_blue}Maintainer{fg_reset}: %s', kb_info_json['maintainer']) 87 cli.echo('{fg_blue}Maintainer{fg_reset}: %s', kb_info_json['maintainer'])
88 cli.echo('{fg_blue}Keyboard Folder{fg_reset}: %s', kb_info_json.get('keyboard_folder', 'Unknown')) 88 cli.echo('{fg_blue}Keyboard Folder{fg_reset}: %s', kb_info_json.get('keyboard_folder', 'Unknown'))
89 cli.echo('{fg_blue}Layouts{fg_reset}: %s', ', '.join(sorted(kb_info_json['layouts'].keys()))) 89 cli.echo('{fg_blue}Layouts{fg_reset}: %s', ', '.join(sorted(kb_info_json['layouts'].keys())))
90 if 'width' in kb_info_json and 'height' in kb_info_json:
91 cli.echo('{fg_blue}Size{fg_reset}: %s x %s' % (kb_info_json['width'], kb_info_json['height']))
92 cli.echo('{fg_blue}Processor{fg_reset}: %s', kb_info_json.get('processor', 'Unknown')) 90 cli.echo('{fg_blue}Processor{fg_reset}: %s', kb_info_json.get('processor', 'Unknown'))
93 cli.echo('{fg_blue}Bootloader{fg_reset}: %s', kb_info_json.get('bootloader', 'Unknown')) 91 cli.echo('{fg_blue}Bootloader{fg_reset}: %s', kb_info_json.get('bootloader', 'Unknown'))
94 if 'layout_aliases' in kb_info_json: 92 if 'layout_aliases' in kb_info_json:
diff --git a/lib/python/qmk/cli/kle2json.py b/lib/python/qmk/cli/kle2json.py
index acb75ef4f..bbfddf426 100755
--- a/lib/python/qmk/cli/kle2json.py
+++ b/lib/python/qmk/cli/kle2json.py
@@ -44,8 +44,6 @@ def kle2json(cli):
44 'keyboard_name': kle.name, 44 'keyboard_name': kle.name,
45 'url': '', 45 'url': '',
46 'maintainer': 'qmk', 46 'maintainer': 'qmk',
47 'width': kle.columns,
48 'height': kle.rows,
49 'layouts': { 47 'layouts': {
50 'LAYOUT': { 48 'LAYOUT': {
51 'layout': kle2qmk(kle) 49 'layout': kle2qmk(kle)
diff --git a/lib/python/qmk/json_encoders.py b/lib/python/qmk/json_encoders.py
index 9f3da022b..72e91973a 100755
--- a/lib/python/qmk/json_encoders.py
+++ b/lib/python/qmk/json_encoders.py
@@ -102,9 +102,6 @@ class InfoJSONEncoder(QMKJSONEncoder):
102 elif key == 'maintainer': 102 elif key == 'maintainer':
103 return '12maintainer' 103 return '12maintainer'
104 104
105 elif key in ('height', 'width'):
106 return '40' + str(key)
107
108 elif key == 'community_layouts': 105 elif key == 'community_layouts':
109 return '97community_layouts' 106 return '97community_layouts'
110 107
diff --git a/lib/python/qmk/tests/minimal_info.json b/lib/python/qmk/tests/minimal_info.json
index b91c23bd3..11ef12fef 100644
--- a/lib/python/qmk/tests/minimal_info.json
+++ b/lib/python/qmk/tests/minimal_info.json
@@ -1,8 +1,6 @@
1{ 1{
2 "keyboard_name": "tester", 2 "keyboard_name": "tester",
3 "maintainer": "qmk", 3 "maintainer": "qmk",
4 "height": 5,
5 "width": 15,
6 "layouts": { 4 "layouts": {
7 "LAYOUT": { 5 "LAYOUT": {
8 "layout": [ 6 "layout": [
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index 022b24203..b39fe5e46 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -273,7 +273,7 @@ def test_generate_layouts():
273def test_format_json_keyboard(): 273def test_format_json_keyboard():
274 result = check_subcommand('format-json', '--format', 'keyboard', 'lib/python/qmk/tests/minimal_info.json') 274 result = check_subcommand('format-json', '--format', 'keyboard', 'lib/python/qmk/tests/minimal_info.json')
275 check_returncode(result) 275 check_returncode(result)
276 assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "height": 5,\n "width": 15,\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n' 276 assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n'
277 277
278 278
279def test_format_json_keymap(): 279def test_format_json_keymap():
@@ -285,7 +285,7 @@ def test_format_json_keymap():
285def test_format_json_keyboard_auto(): 285def test_format_json_keyboard_auto():
286 result = check_subcommand('format-json', '--format', 'auto', 'lib/python/qmk/tests/minimal_info.json') 286 result = check_subcommand('format-json', '--format', 'auto', 'lib/python/qmk/tests/minimal_info.json')
287 check_returncode(result) 287 check_returncode(result)
288 assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "height": 5,\n "width": 15,\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n' 288 assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n'
289 289
290 290
291def test_format_json_keymap_auto(): 291def test_format_json_keymap_auto():