Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into dp60_indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
yulei committed Apr 30, 2020
2 parents 19d94b5 + 231464c commit 88f2009
Show file tree
Hide file tree
Showing 1,115 changed files with 47,491 additions and 20,798 deletions.
24 changes: 0 additions & 24 deletions .clang_complete

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
container: qmkfm/base_container

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ quantum/version.h
.idea/
CMakeLists.txt
cmake-build-debug
.clang_complete
doxygen/
.DS_Store
/util/wsl_downloaded
Expand All @@ -47,7 +48,6 @@ doxygen/
*.iml
.browse.VC.db*
*.stackdump
util/Win_Check_Output.txt
# Let these ones be user specific, since we have so many different configurations
.vscode/c_cpp_properties.json
.vscode/launch.json
Expand Down
20 changes: 12 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
"**/*.bin": true
},
"files.associations": {
"*.h": "c",
"*.c": "c",
"*.inc": "c",
"*.cpp": "cpp",
"*.hpp": "cpp",
"xstddef": "c",
"type_traits": "c",
"utility": "c"
"*.h": "c",
"*.c": "c",
"*.inc": "c",
"*.cpp": "cpp",
"*.hpp": "cpp",
"xstddef": "c",
"type_traits": "c",
"utility": "c"
},
"[markdown]": {
"editor.trimAutoWhitespace": false,
"files.trimTrailingWhitespace": false
}
}
1 change: 0 additions & 1 deletion autocomplete.sh

This file was deleted.

59 changes: 40 additions & 19 deletions bin/qmk
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,59 @@
import os
import sys
from importlib.util import find_spec
from pathlib import Path

# Add the QMK python libs to our path
script_dir = os.path.dirname(os.path.realpath(__file__))
qmk_dir = os.path.abspath(os.path.join(script_dir, '..'))
python_lib_dir = os.path.abspath(os.path.join(qmk_dir, 'lib', 'python'))
sys.path.append(python_lib_dir)
script_dir = Path(os.path.realpath(__file__)).parent
qmk_dir = script_dir.parent
python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve()
sys.path.append(str(python_lib_dir))

# Make sure our modules have been setup
with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:
for line in fd.readlines():
line = line.strip().replace('<', '=').replace('>', '=')

if line[0] == '#':
continue
def _check_modules(requirements):
""" Check if the modules in the given requirements.txt are available.
"""
with Path(qmk_dir / requirements).open() as fd:
for line in fd.readlines():
line = line.strip().replace('<', '=').replace('>', '=')

if len(line) == 0 or line[0] == '#' or line.startswith('-r'):
continue

if '#' in line:
line = line.split('#')[0]
if '#' in line:
line = line.split('#')[0]

module = line.split('=')[0] if '=' in line else line
module = dict()
module['name'] = module['import'] = line.split('=')[0] if '=' in line else line

if module in ['pep8-naming']:
# Not every module is importable by its own name.
continue
if module['name'] == "pep8-naming":
module['import'] = "pep8ext_naming"

if not find_spec(module):
print('Could not find module %s!' % module)
print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')
exit(255)
if not find_spec(module['import']):
print('Could not find module %s!' % module['name'])
print('Please run `python3 -m pip install -r %s` to install required python dependencies.' % (qmk_dir / requirements,))
if developer:
print('You can also turn off developer mode: qmk config user.developer=None')
print()
exit(255)


developer = False
# Make sure our modules have been setup
_check_modules('requirements.txt')

# Setup the CLI
import milc # noqa

# For developers additional modules are needed
if milc.cli.config.user.developer:
# Do not run the check for 'config',
# so users can turn off developer mode
if len(sys.argv) == 1 or (len(sys.argv) > 1 and 'config' != sys.argv[1]):
developer = True
_check_modules('requirements-dev.txt')

milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'


Expand Down
5 changes: 5 additions & 0 deletions build_json.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
endif

# Load the keymap-level rules.mk if exists
ifneq ("$(wildcard $(KEYMAP_PATH))", "")
-include $(KEYMAP_PATH)/rules.mk
endif

# Generate the keymap.c
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
bin/qmk json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
6 changes: 6 additions & 0 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* [Testing and Debugging](newbs_testing_debugging.md)
* [Getting Help/Support](support.md)
* [Other Resources](newbs_learn_more_resources.md)
* [Syllabus](syllabus.md)

* FAQs
* [General FAQ](faq_general.md)
Expand Down Expand Up @@ -121,6 +122,7 @@
* [Drivers](hardware_drivers.md)
* [ADC Driver](adc_driver.md)
* [I2C Driver](i2c_driver.md)
* [SPI Driver](spi_driver.md)
* [WS2812 Driver](ws2812_driver.md)
* [EEPROM Driver](eeprom_driver.md)
* [GPIO Controls](internals_gpio_control.md)
Expand All @@ -135,6 +137,10 @@
* [Development Environment](api_development_environment.md)
* [Architecture Overview](api_development_overview.md)

* Hardware Platform Development
* Arm/ChibiOS
* [Early initialization](platformdev_chibios_earlyinit.md)

* QMK Reference
* [Contributing to QMK](contributing.md)
* [Translating the QMK Docs](translating.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The QMK CLI makes building and working with QMK keyboards easier. We have provid

### Requirements :id=requirements

The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI.
QMK requires Python 3.6 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI.

### Install Using Homebrew (macOS, some Linux) :id=install-using-homebrew

Expand All @@ -21,7 +21,7 @@ qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build

### Install Using easy_install or pip :id=install-using-easy_install-or-pip

If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command:
If your system is not listed above you can install QMK manually. First ensure that you have python 3.6 (or later) installed and have installed pip. Then install QMK with this command:

```
pip3 install qmk
Expand Down
Loading

0 comments on commit 88f2009

Please sign in to comment.