Skip to content

Commit 596c4a1

Browse files
authored
Remove bin/qmk (qmk#14231)
* Remove the bin/qmk script * remove bin/qmk from workflows
1 parent b46064a commit 596c4a1

File tree

14 files changed

+11
-114
lines changed

14 files changed

+11
-114
lines changed

.github/labeler.yml

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ keymap:
2222
via:
2323
- keyboards/**/keymaps/via/*
2424
cli:
25-
- bin/qmk
2625
- requirements.txt
2726
- lib/python/**/*
2827
python:

.github/workflows/cli.yml

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
pull_request:
99
paths:
1010
- 'lib/python/**'
11-
- 'bin/qmk'
1211
- 'requirements.txt'
1312
- '.github/workflows/cli.yml'
1413

Makefile

+1-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ endif
3030
endif
3131

3232
# Determine which qmk cli to use
33-
ifeq (,$(shell which qmk))
34-
QMK_BIN = bin/qmk
35-
else
36-
QMK_BIN = qmk
37-
endif
33+
QMK_BIN := qmk
3834

3935
# avoid 'Entering|Leaving directory' messages
4036
MAKEFLAGS += --no-print-directory

bin/qmk

-58
This file was deleted.

docs/contributing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ enum my_keycodes {
105105

106106
Before opening a pull request, you can preview your changes if you have set up the development environment by running this command from the `qmk_firmware/` folder:
107107

108-
./bin/qmk docs
108+
qmk docs
109109

110110
or if you only have Python 3 installed:
111111

docs/de/cli.md

-19
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,6 @@ Wir suchen nach Freiwilligen, die ein `qmk`-Package für weitere Betriebssysteme
5151
* Installiere mit einem [virtualenv](https://virtualenv.pypa.io/en/latest/).
5252
* Weise den User an, die Umgebungs-Variable `QMK_HOME` zu setzen, um die Firmware-Quelle anders einzustellen als `~/qmk_firmware`.
5353

54-
# Lokale CLI
55-
56-
Wenn Du die globale CLI nicht verwenden möchtest, beinhaltet `qmk_firmware` auch eine lokale CLI. Du kannst sie hier finden: `qmk_firmware/bin/qmk`. Du kannst den `qmk`-Befehl aus irgendeinem Datei-Verzeichnis ausführen und es wird immer auf dieser Kopie von `qmk_firmware` arbeiten.
57-
58-
**Beispiel**:
59-
60-
```
61-
$ ~/qmk_firmware/bin/qmk hello
62-
Ψ Hello, World!
63-
```
64-
65-
## Einschränkungen der lokalen CLI
66-
67-
Hier ein Vergleich mit der globalen CLI:
68-
69-
* Die lokale CLI unterstützt kein `qmk setup` oder `qmk clone`.
70-
* Die lokale CLI arbeitet immer innerhalb der selben `qmk_firmware`-Verzeichnisstruktur, auch wenn Du mehrere Repositories geklont hast.
71-
* Die lokale CLI läuft nicht in einer virtualenv. Daher ist es möglich, dass Abhängigkeiten (dependencies) miteinander in Konflikt kommen/stehen.
72-
7354
# CLI-Befehle
7455

7556
## `qmk compile`

docs/fr-fr/cli.md

-19
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,6 @@ Nous recherchons des gens pour créer et maintenir un paquet `qmk` pour plus de
4848
* Installez en utilisant un virtualenv
4949
* Expliquez à l'utilisateur de définir la variable d'environnement `QMK_Home` pour "check out" les sources du firmware à un autre endroit que `~/qmk_firmware`.
5050

51-
# CLI locale
52-
53-
Si vous ne voulez pas utiliser la CLI globale, il y a une CLI locale empaquetée avec `qmk_firmware`. Vous pouvez le trouver dans `qmk_firmware/bin/qmk`. Vous pouvez lancer la commande `qmk` depuis n'importe quel répertoire et elle fonctionnera toujours sur cette copie de `qmk_firmware`.
54-
55-
**Exemple**:
56-
57-
```
58-
$ ~/qmk_firmware/bin/qmk hello
59-
Ψ Hello, World!
60-
```
61-
62-
## Limitations de la CLI locale
63-
64-
Il y a quelques limitations à la CLI locale comparé à la globale:
65-
66-
* La CLI locale ne supporte pas `qmk setup` ou `qmk clone`
67-
* La CLI locale n'opère pas sur le même arbre `qmk_firmware`, même si vous avez plusieurs dépôts clonés.
68-
* La CLI locale ne s'exécute pas dans un virtualenv, donc il y a des risques que des dépendances seront en conflit
69-
7051
# Les commandes CLI
7152

7253
## `qmk compile`

keyboards/dztech/dz65rgb/keymaps/jumper149/readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
Run commands in the root directory of this repository.
44

55
```
6-
./bin/qmk compile && sudo dfu-programmer atmega32u4 erase && sudo dfu-programmer atmega32u4 flash ./dztech_dz65rgb_v2_jumper149.hex && sudo dfu-programmer atmega32u4 reset
6+
qmk compile && sudo dfu-programmer atmega32u4 erase && sudo dfu-programmer atmega32u4 flash ./dztech_dz65rgb_v2_jumper149.hex && sudo dfu-programmer atmega32u4 reset
77
```
88

99
## build
1010

1111
```
12-
./bin/qmk compile
12+
qmk compile
1313
```
1414

1515
## flash

lib/python/qmk/cli/doctor/check.py

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class CheckStatus(Enum):
2626
'arm-none-eabi-gcc': {
2727
'version_arg': '-dumpversion'
2828
},
29-
'bin/qmk': {},
3029
}
3130

3231

lib/python/qmk/cli/format/python.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ def format_python(cli):
1111
"""Format python code according to QMK's style.
1212
"""
1313
edit = '--diff' if cli.args.dry_run else '--in-place'
14-
yapf_cmd = ['yapf', '-vv', '--recursive', edit, 'bin/qmk', 'lib/python']
14+
yapf_cmd = ['yapf', '-vv', '--recursive', edit, 'lib/python']
1515
try:
1616
cli.run(yapf_cmd, check=True, capture_output=False, stdin=DEVNULL)
17-
cli.log.info('Python code in `bin/qmk` and `lib/python` is correctly formatted.')
17+
cli.log.info('Python code in `lib/python` is correctly formatted.')
1818
return True
1919

2020
except CalledProcessError:
2121
if cli.args.dry_run:
22-
cli.log.error('Python code in `bin/qmk` and `lib/python` incorrectly formatted!')
22+
cli.log.error('Python code in `lib/python` is incorrectly formatted!')
2323
else:
2424
cli.log.error('Error formatting python code!')
2525

lib/python/qmk/cli/pytest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ def pytest(cli):
1212
"""Run several linting/testing commands.
1313
"""
1414
nose2 = cli.run(['nose2', '-v'], capture_output=False, stdin=DEVNULL)
15-
flake8 = cli.run(['flake8', 'lib/python', 'bin/qmk'], capture_output=False, stdin=DEVNULL)
15+
flake8 = cli.run(['flake8', 'lib/python'], capture_output=False, stdin=DEVNULL)
1616

1717
return flake8.returncode | nose2.returncode

lib/python/qmk/commands.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va
233233
f'VERBOSE={verbose}',
234234
f'COLOR={color}',
235235
'SILENT=false',
236-
f'QMK_BIN={"bin/qmk" if "DEPRECATED_BIN_QMK" in os.environ else "qmk"}',
236+
'QMK_BIN="qmk"',
237237
])
238238

239239
return make_command

lib/python/qmk/tests/test_cli_commands.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_hello():
8383
def test_format_python():
8484
result = check_subcommand('format-python', '--dry-run')
8585
check_returncode(result)
86-
assert 'Python code in `bin/qmk` and `lib/python` is correctly formatted.' in result.stdout
86+
assert 'Python code in `lib/python` is correctly formatted.' in result.stdout
8787

8888

8989
def test_list_keyboards():

shell.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let
1414
projectDir = ./util/nix;
1515
overrides = poetry2nix.overrides.withDefaults (self: super: {
1616
qmk = super.qmk.overridePythonAttrs(old: {
17-
# Allow QMK CLI to run "bin/qmk" as a subprocess (the wrapper changes
17+
# Allow QMK CLI to run "qmk" as a subprocess (the wrapper changes
1818
# $PATH and breaks these invocations).
1919
dontWrapPythonPrograms = true;
2020
});

0 commit comments

Comments
 (0)