Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mu-editor/mu
Browse files Browse the repository at this point in the history
  • Loading branch information
fmorton committed Jan 20, 2025
2 parents 01e83c6 + 563cb86 commit bec739a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 16 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
build:
strategy:
matrix:
os: [macos-11, windows-2019]
os: [macos-13, windows-2019]
fail-fast: false
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -46,22 +46,23 @@ jobs:
make macos
mv dist/*.dmg upload/
- name: Upload Mu installer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mu-editor-${{ runner.os }}-${{ github.sha }}
path: upload

build-linux:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
container:
image: ghcr.io/mu-editor/mu-appimage:2022.05.01
image: ghcr.io/mu-editor/mu-appimage:2024.12.02
name: Build AppImage
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Display system info
run: |
uname -a
cat /etc/lsb-release
cat /etc/os-release
ldd --version
python -c "import sys; print(sys.version)"
python -c "import platform, struct; print(platform.machine(), struct.calcsize('P') * 8)"
python -c "import sys; print(sys.executable)"
Expand All @@ -72,9 +73,8 @@ jobs:
run: |
pip install .[tests]
pip list
- run: mkdir upload
- name: Build Linux AppImage
run: xvfb-run make linux
run: QT_QPA_PLATFORM=offscreen make linux
# GitHub actions upload artifact breaks permissions, workaround using tar
# https://github.com/actions/upload-artifact/issues/38
- name: Tar AppImage to maintain permissions
Expand All @@ -83,7 +83,7 @@ jobs:
tar -cvf Mu_Editor-AppImage-x86_64-${{ github.sha }}.tar *.AppImage
ls -la .
- name: Upload Mu AppImage
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: mu-editor-${{ runner.os }}-${{ github.sha }}
path: dist/Mu_Editor-AppImage-x86_64-${{ github.sha }}.tar
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies to help the code scanner
run: pip install .[dev]

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: python
config-file: ./.github/codeql/codeql-config.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
# macos-13 is x86 and macos-14 is arm64
os: [ubuntu-20.04, ubuntu-latest, macos-11, macos-13, windows-2019, windows-latest]
os: [ubuntu-20.04, ubuntu-latest, macos-13, windows-2019, windows-latest]
python-version: ['3.5', '3.6', '3.7', '3.8']
exclude:
# Python 3.5 and 3.6 not available in the latest Ubuntu runners
Expand Down
1 change: 1 addition & 0 deletions mu/modes/esp.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class ESPMode(MicroPythonMode):
(0x1A86, 0x7523, None, "HL-340"),
(0x10C4, 0xEA60, None, "CP210x"),
(0x0403, 0x6001, "M5STACK Inc.", "M5Stack ESP32 device"),
(0x1A86, 0x55D4, None, None), # CH9102
(0x0403, 0x6001, None, None), # FT232/FT245 (XinaBox CW01, CW02)
(0x0403, 0x6010, None, None), # FT2232C/D/L/HL/Q (ESP-WROVER-KIT)
(0x0403, 0x6011, None, None), # FT4232
Expand Down
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@
# The core 'install_requires' should only be things
# which are needed for the main editor to function.
#
"PyQt5-sip<=12.13.0"
+ ';"arm" not in platform_machine and "aarch" not in platform_machine',
"PyQt5==5.13.2"
+ ';"arm" not in platform_machine and "aarch" not in platform_machine',
"QScintilla==2.11.3"
+ ';"arm" not in platform_machine and "aarch" not in platform_machine',
"PyQtChart==5.13.1"
+ ';"arm" not in platform_machine and "aarch" not in platform_machine',
# FIXME: Needed for qtconsole, this is the latest wheel in armv7l for
# Python 3.7 (Buster), otherwise it tries to build from source and fails.
"pyzmq<=26.0.3",
# FIXME: jupyter-client added for Py3.5 compatibility, to be dropped after
# Mu v1.1 release. So, qtconsole < 5 and jupyter-client < 6.2 (issue #1444)
"jupyter-client>=4.1,<6.2",
Expand Down
1 change: 1 addition & 0 deletions tests/interface/test_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ def test_EditorPane_toggle_comments_handle_crlf_newline():
"""
ep = mu.interface.editor.EditorPane(None, "test\r\nline 2\n")
ep.hasSelectedText = mock.MagicMock(return_value=False)
ep.setCursorPosition(0, 0)
ep.toggle_comments()
assert ep.text() == "# test\nline 2\n"
assert ep.selectedText() == "# test"
Expand Down
5 changes: 2 additions & 3 deletions tests/modes/test_python3.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,9 @@ def test_python_remove_plotter():
"""
editor = mock.MagicMock()
view = mock.MagicMock()
pm = PythonMode(editor, view)
pm.set_buttons = mock.MagicMock()
with mock.patch("builtins.super") as mock_super:
pm = PythonMode(editor, view)
pm.set_buttons = mock.MagicMock()
mock_super.reset_mock()
pm.remove_plotter()
pm.set_buttons.assert_called_once_with(run=True, repl=True, debug=True)
mock_super().remove_plotter.assert_called_once_with()
Expand Down

0 comments on commit bec739a

Please sign in to comment.