summaryrefslogtreecommitdiffstats
path: root/lib/python/qmk/tests
Commit message (Collapse)AuthorAgeFilesLines
* Update json2c to use dump_lines (#21013)Joel Challis2023-05-221-2/+2
|
* CLI: Improve keymap folder resolution (#20981)Ryan2023-05-191-2/+2
|
* Fix `test_json2c_no_json()` (#20756)Ryan2023-05-062-2/+2
|
* Remove `FLIP_HALF` layouts and move to data driven (#20588)Ryan2023-04-301-2/+6
|
* JSON encoder: improve sorting of layout dict keys (#19974)Ryan2023-03-131-2/+2
|
* Macro keycode name refactoring (#18958)Nick Brassel2022-11-051-2/+2
|
* Normalise info_config.h define generation (#18439)Ryan2022-09-211-10/+10
| | | | | | | | | | | | | * Normalise info_config.h define generation * format * Fix tests * Update lib/python/qmk/cli/generate/config_h.py Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Nick Brassel <nick@tzarc.org>
* Tidy up LAYOUT macro generation (#18262)Joel Challis2022-09-191-6/+0
|
* Switch over MANUFACTURER and PRODUCT to string literals (#18183)Ryan2022-08-281-2/+2
|
* Fix test logic to check for both keymaps (#17761)Niko Wenselowski2022-07-231-5/+10
| | | | | | | | | | | Python will evaluate first the left and then the right side of the and operator. The left side would previously return True based on the truthiness logic that treats any non-emptry string as true. It would not check if the desired keymap exists. If the left side is true it will evaluate the right side which will check for the existance of a specific keymap. With this change the check for existance of two keymaps is implemented.
* Add support for linting deprecated and removed functionality (#17063)Joel Challis2022-06-091-1/+0
| | | | | | | | | * Add support for more lint warnings/errors * Develop currently needs extra deps installed * Lint a few more scenarios * fix tests
* Map data driven `DESCRIPTION` as string literal (#16523)Ryan2022-03-051-1/+1
|
* Merge remote-tracking branch 'origin/master' into developQMK Bot2022-02-281-0/+12
|\
| * CLI: Validate JSON keymap input (#16261)Erovia2022-02-281-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix schema validator It should use the passed schema. * Add required attributes to keymap schema * Rework subcommands to validate the JSON keymaps The 'compile', 'flash' and 'json2c' subcommands were reworked to add JSON keymap validation so error is reported for non-JSON and non-compliant-JSON inputs. * Fix required fields in keymap schema * Add tests * Fix compiling keymaps directly from keymap directory * Schema should not require version for now.
* | Rework generate-api CLI command to use .build directory (#16441)Joel Challis2022-02-271-1/+1
|/
* Fix issues with Python Tests (#16162)Drashna Jaelre2022-02-021-1/+1
| | | | | | | | | | | * Reformat python due to yapf changes * Fix pytest keymap list test * revert formatting * Use contra, because, well https://www.reddit.com/r/MechanicalKeyboards/comments/8riofq/did_i_kill_my_contra/
* Macros in JSON keymaps (#14374)Zach White2021-11-222-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * macros in json keymaps * add advanced macro support to json * add a note about escaping macro strings * add simple examples * format json * add support for language specific keymap extras * switch to dictionaries instead of inline text for macros * use SS_TAP on the innermost tap keycode * add the new macro format to the schema * document the macro limit * add the json keyword for syntax highlighting * fix format that vscode screwed up * Update feature_macros.md * add tests for macros * change ding to beep * add json support for SENDSTRING_BELL * update doc based on feedback from sigprof * document host_layout * remove unused var * improve carriage return handling * support tab characters as well * Update docs/feature_macros.md Co-authored-by: Nick Brassel <nick@tzarc.org> * escape backslash characters * format * flake8 * Update quantum/quantum_keycodes.h Co-authored-by: Nick Brassel <nick@tzarc.org>
* Merge remote-tracking branch 'origin/master' into developDrashna Jael're2021-11-191-2/+2
|\
| * Add diff logic to python format subcommand (#15156)Joel Challis2021-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | * Add diff logic to python format subcommand * Update test * Add in filter per format-c * fix tests * Update new workflow
* | Map `PRODUCT` define to `keyboard_name` (#14372)Ryan2021-11-052-6/+6
| | | | | | | | | | | | | | * Map `PRODUCT` define to `keyboard_name` * Fix tests * Fix last test
* | Remove bin/qmk (#14231)Zach White2021-08-291-1/+1
|/ | | | | * Remove the bin/qmk script * remove bin/qmk from workflows
* Remove references to info.json `width` and `height` in CLI (#13728)Ryan2021-07-292-4/+2
|
* CLI/Docs: Fix the format commands' name (#13668)Erovia2021-07-231-6/+6
| | | | | | | PR #13296 changed the name of the `cformat` and `pyformat` commands to `format-c` and `format-py` respectively. This PR updates the documentation and some parts of the CLI to use the new names. Also add documentation for the new `format-text` subcommand, introduced in the same PR.
* CLI: Add subcommand to generate version.h (#13151)Ryan2021-06-271-0/+6
|
* Merge remote-tracking branch 'origin/master' into developZach White2021-05-191-5/+4
|\ | | | | | | | | | | Resolved Conflicts: lib/python/qmk/tests/test_cli_commands.py util/install/fedora.sh
| * Align our subprocess usage with current best practices. (#12940)Zach White2021-05-191-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Align our subprocess usage with current best practices. * remove unused import * Apply suggestions from code review Co-authored-by: Ryan <fauxpark@gmail.com> * fix the cpp invocation for older python * allow for unprompted installation * make sure qmk new-keyboard works on windows Co-authored-by: Ryan <fauxpark@gmail.com>
* | Use milc.subcommand.config instead of qmk.cli.config (#12915)Zach White2021-05-161-6/+0
| | | | | | | | | | | | | | * Use milc.subcommand.config instead * pyformat * remove the config test
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-05-101-3/+13
|\|
| * Improve our CI tests (#11476)Zach White2021-05-101-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add a test and dry-run to qmk generate-api * add a dry-run to qmk pyformat * Add a --dry-run to qmk cformat * reverse the order of nose2 and flake8 tests * run CI test against cformat and pyformat * fix programming errors * tweak job name * fix argument * refine the files we select * fix stack trace in --ci * make cformat exit clean * fix c file extensions * decouple CI from pyformat * remove --ci arg * make ci happy * use the environment var instead * change output to text * fix log message * replace tabs
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-03-254-6/+44
|\|
| * Add a `qmk format-json` command that will format JSON files (#12372)Zach White2021-03-254-6/+44
| | | | | | | | | | | | | | | | | | | | | | * Add a command to format json files * change to work after rebase * add test for qmk format-json * add documentation for qmk format-json * Update lib/python/qmk/cli/format/json.py
* | Merge remote-tracking branch 'origin/master' into developQMK Bot2021-03-241-2/+2
|\|
| * Add support for qmk_configurator style aliases (#11954)Zach White2021-03-241-2/+2
| | | | | | | | | | | | | | | | | | * Add support for qmk_configurator style aliases * add the keyboard aliases to the api data * add support for a keyboard metadata file * make flake8 happy
* | Begin the process of deprecating bin/qmk in favor of the global cli (#12109)Zach White2021-03-071-2/+2
|/ | | | | * Begin the process of deprecating bin/qmk in favor of the global cli * Correctly set the qmk bin
* Fix develop (#12039)Zach White2021-02-271-1/+1
| | | | | | | | | Fixes file encoding errors on Windows, and layouts not correctly merging into info.json. * force utf8 encoding * correctly merge layouts and layout aliases * show what aliases point to
* Create a system to map between info.json and config.h/rules.mk (#11548)Zach White2021-01-311-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | * generate rules.mk from a json mapping * generate rules.mk from a json mapping * support for config.h from json maps * improve the mapping system * document the mapping system * move data/maps to data/mappings * fix flake8 errors * fixup LED_MATRIX_DRIVER * remove product and description from the vision_division keymap level * reduce the complexity of generate-rules-mk * add tests for the generate commands * fix qmk doctor when submodules are not clean
* Migrate python tests away from onekey (#11367)Joel Challis2021-01-054-51/+57
| | | | | | | * Migrate python tests away from onekey * Add stub files to stop lint complaints * Make all the pytest keymaps compile
* [CLI] Add stdin support for json2c command (#11289)LongerHV2020-12-291-1/+28
| | | | | | | | | | | | | | | * Implement stdin for json2c command * Refactor * Handle json decode error * Add stdin support for c2json cli command * Refactor to prevent code duplication * Change exit(1) to return False in c2json command * Remove unused import
* CLI-ify rgblight_breathing_table_calc.c (#11174)Ryan2020-12-161-0/+7
| | | | Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Co-authored-by: Zach White <skullydazed@drpepper.org>
* Reduce travis load by replacing an exclusive grep with an inclusive grep ↵Zach White2020-11-301-1/+1
| | | | | | | (#10964) * add -n to avoid compiling * switch to an include rather than exclude strategy
* CLI: Udev related fixes and improvements (#10736)Erovia2020-11-161-12/+12
|
* CLI: Add `qmk clean` (#10785)Ryan2020-11-041-0/+6
|
* `qmk info`: Add `--ascii` flag (#10793)Ryan2020-11-021-2/+15
| | | | | | | | | | | | | | | * `qmk info`: Add `--ascii` flag * Fix typo * Force ASCII for Windows/MSYS2 * Make it gooder * Remove redundant windows check * ...And this too * Make pytest work on Windows
* Generate api data on each push (#10609)Zach White2020-10-251-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add new qmk generate-api command, to generate a complete set of API data. * Generate api data and push it to the keyboard repo * fix typo * Apply suggestions from code review Co-authored-by: Joel Challis <git@zvecr.com> * fixup api workflow * remove file-changes-action * use a more mainstream github action * fix yaml error * Apply suggestions from code review Co-authored-by: Erovia <Erovia@users.noreply.github.com> * more uniform date handling * make flake8 happy * Update lib/python/qmk/decorators.py Co-authored-by: Erovia <Erovia@users.noreply.github.com> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Erovia <Erovia@users.noreply.github.com>
* [CLI] Add c2json (#8817)Erovia2020-10-062-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Basic keymap parsing finally works * Add 'keymap.json' creation to the qmk.keymap module * Add tests and fix formatting * Fix/exclude flake8 errors * Convert keymap.c to valid keymap.json * Fix some errors * Add tests * Finalize keymap.json creation, add json template * Add docs * Move pygments to the standard requirements * Add support for nameless layers, fix tests * Fix things after rebase * Add missing 'keymap' value. * Fix missing layer numbers from advanced keycodes Buckwich noticed that if the advanced keycode / layer toggling key contains a number, it goes missing. Now we properly handle them. Thx for noticing! * Apply suggestions from code review * fixup tests Co-authored-by: Zach White <skullydazed@drpepper.org> Co-authored-by: skullY <skullydazed@gmail.com>
* CLI: update subcommands to use return instead of exit() (#10323)Ryan2020-10-062-1/+4
|
* Parse version better in `qmk doctor` GCC version checks (#9324)Ryan2020-06-181-4/+4
|
* [CLI] Add a subcommand for getting information about a keyboard (#8666)Zach White2020-05-261-21/+83
| | | | | You can now use `qmk info` to get information about keyboards and keymaps. Co-authored-by: Erovia <Erovia@users.noreply.github.com>
* CLI: fix `json2c` subcommand and add/fix tests (#9206)Erovia2020-05-262-2/+8
| | | Co-authored-by: Zach White <skullydazed@users.noreply.github.com>
* Adding unit tests for list-keymaps command (#7711)codecoffeecode2020-05-161-10/+26
| | | | Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> Co-Authored-By: Erovia <Erovia@users.noreply.github.com>