Commit Graph

14 Commits

Author SHA1 Message Date
skullydazed
c66930445f
Use pathlib everywhere we can (#7872)
* Use pathlib everywhere we can

* Update lib/python/qmk/path.py

Co-Authored-By: Erovia <Erovia@users.noreply.github.com>

* Update lib/python/qmk/path.py

Co-Authored-By: Erovia <Erovia@users.noreply.github.com>

* Improvements based on @erovia's feedback

* rework qmk compile and qmk flash to use pathlib

* style

* Remove the subcommand_name argument from find_keyboard_keymap()

Co-authored-by: Erovia <Erovia@users.noreply.github.com>
2020-02-17 11:42:11 -08:00
Erovia
3db41817e0 Code cleanup, use pathlib, use pytest keyboard
Clean up checks and logics that are unnecessary due to MILC updates.
Use pathlib instead of os.path for readability.
Use the 'pytest' keyboard for the tests.
Add community layout for 'handwired/onekey/pytest' so we can test
community layouts.
2020-02-15 15:19:03 -08:00
Erovia
8eeab1112a Fix commandline parsing and flake8 findings, rebase
Fixed commandline and config parsing. Thx @xplusplus.
Rebased on master and fixed merge conflicts.
2020-02-15 15:19:03 -08:00
Erovia
3ed1223678 Drop bs4 dependency, update docs, minor improvements 2020-02-15 15:19:03 -08:00
Erovia
26f53d38d9 Another major refactoring, add documentation
Move all useful functions to the qmk module and use the cli subcommand
as a wrapper around it.
Add both inline comments and documentation.
2020-02-15 15:19:03 -08:00
Erovia
f96085af38 Fix output format 2020-02-15 15:19:03 -08:00
Erovia
e46cc2db8c Try to figure out revision, drop -rv/--revision argument 2020-02-15 15:19:03 -08:00
Erovia
c3b168e6fd Fix help message. 2020-02-15 15:19:03 -08:00
Erovia
62c1bcba71 Get all buildable keymaps for each revision
The command now return all keymaps that's buildable for a
keyboard/revision. If the base directory of a keyboard does not contain
a 'rules.mk' file, nothing is returned. If the base directory contains a
'keymaps' directory, those keycaps will be returned for every revision.
2020-02-15 15:19:03 -08:00
Erovia
057c7d0ffe Major update to work better with revisions
Find the community keymaps supported by each revision.
2020-02-15 15:19:03 -08:00
Erovia
409c610543 CLI: add support for list_keymaps
List all the available keymaps for a given keyboard
2020-02-15 15:19:03 -08:00
skullydazed
f7bdc54c69
Add flake8 to our test suite and fix all errors (#7379)
* Add flake8 to our test suite and fix all errors

* Add some documentation
2019-11-20 14:54:18 -08:00
skullY
79edb7c594 Small CLI cleanups
* yapf changes
* Fix the cformat test
* Make the normpath test work when run from /
* `qmk config`: Mark `--read-only` as arg_only
2019-11-12 18:41:38 -08:00
Dan McClain
f04e58dad6 [CLI] Add qmk list_keyboards (#6927)
`list_keyboards` replicates the `make list-keyboards` by globbing for all paths
that include `rules.mk` and then removing the paths that include `keymaps`.

This basis of this cli command could be reused in the future as a util, but is
not done so here since this would be the only place that would use it currently

Resolves #6911
2019-10-07 11:32:30 -07:00