diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a04e423..716eca1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,11 +46,11 @@ jobs: shell: bash if: runner.os == 'Windows' - # - name: Build (PyInstaller) - # run: | - # pyinstaller packaging/macos.spec - # shell: bash - # if: runner.os == 'macOS' + - name: Build (PyInstaller) + run: | + pyinstaller packaging/mac.spec + shell: bash + if: runner.os == 'macOS' - name: Package artifact (Windows) if: runner.os == 'Windows' @@ -58,11 +58,11 @@ jobs: run: | Compress-Archive -Path dist\CodeShuffler\* -DestinationPath CodeShuffler-windows.zip - # - name: Package artifact (macOS) - # if: runner.os == 'macOS' - # shell: bash - # run: | - # ditto -c -k --sequesterRsrc --keepParent "dist/CodeShuffler.app" "CodeShuffler-macos.zip" + - name: Package artifact (macOS) + if: runner.os == 'macOS' + shell: bash + run: | + ditto -c -k --sequesterRsrc --keepParent "dist/CodeShuffler.app" "CodeShuffler-macos.zip" - name: Upload artifacts to workflow uses: actions/upload-artifact@v4 diff --git a/codeshuffler/backlog.md b/codeshuffler/backlog.md index 8e70753..7d61b89 100644 --- a/codeshuffler/backlog.md +++ b/codeshuffler/backlog.md @@ -1,16 +1,20 @@ -- **Backlog** +- **v1.0.0** - ~~Refactor Exam Shuffling Integration~~ - ~~Improved error handling and robustness~~ + - Keep Exam Code Snippet Integrity - ~~Create a code block from parsed exam, use that formatting as the expected template on inputs~~ - ~~Fully integrate code-block detection into parser, test rigourously~~ - ~~Improve styling on code-blocks~~ - ~~Finalize template & exam outputs~~ - - Two-block exam format - ~~Output 2 Exams, one w/ answer key, one without~~ - ~~The user will input a template where correct MCQs will be highlighted, parser outputs two exam versions~~ + + - ~~Menu Bar Branding & Packaging~~ + - ~~Application Packaging, Executable Wrapping~~ +**v1.0.1** - Save previous session when closing and re-opening - Save settings across sessions (opt for a config rather than settings.py) @@ -19,6 +23,5 @@ - UI Improvements - Abstract more functionality away from the GUI - - - ~~Menu Bar Branding & Packaging~~ - - ~~Application Packaging, Executable Wrapping~~ \ No newline at end of file + + - Allow for template changing through settings menu \ No newline at end of file diff --git a/codeshuffler/gui/cache/inputs/mergelists.py b/codeshuffler/gui/cache/inputs/mergelists.py new file mode 100644 index 0000000..3e31a93 --- /dev/null +++ b/codeshuffler/gui/cache/inputs/mergelists.py @@ -0,0 +1,25 @@ +def merge_sorted(l1, l2): + i = j = 0 + result = [] + while i < len(l1) and j < len(l2): + if l1[i] < l2[j]: + result.append(l1[i]) + i += 1 + else: + result.append(l2[j]) + j += 1 + while i < len(l1): + result.append(l1[i]) + i += 1 + while j < len(l2): + result.append(l2[j]) + j += 1 + return result + + +# Incorrect lines below +incorrect_lines = { + "if l1[i] < l2[j]:": "if l1[i] > l2[j]:", + "while i < len(l1):": "for i in range(len(l1)):", + "return result": "return []", +} diff --git a/codeshuffler/gui/icons/codeshuffler-icon.icns b/codeshuffler/gui/icons/codeshuffler-icon.icns new file mode 100644 index 0000000..6ecebb2 Binary files /dev/null and b/codeshuffler/gui/icons/codeshuffler-icon.icns differ diff --git a/codeshuffler/gui/tabs/__pycache__/examshuffler.cpython-313.pyc b/codeshuffler/gui/tabs/__pycache__/examshuffler.cpython-313.pyc index 69a6070..d28c2c7 100644 Binary files a/codeshuffler/gui/tabs/__pycache__/examshuffler.cpython-313.pyc and b/codeshuffler/gui/tabs/__pycache__/examshuffler.cpython-313.pyc differ diff --git a/codeshuffler/gui/utils/__pycache__/syntax.cpython-313.pyc b/codeshuffler/gui/utils/__pycache__/syntax.cpython-313.pyc index e493593..33c7c0e 100644 Binary files a/codeshuffler/gui/utils/__pycache__/syntax.cpython-313.pyc and b/codeshuffler/gui/utils/__pycache__/syntax.cpython-313.pyc differ diff --git a/codeshuffler/lib/__pycache__/parser.cpython-313.pyc b/codeshuffler/lib/__pycache__/parser.cpython-313.pyc index f3a93b2..4c07033 100644 Binary files a/codeshuffler/lib/__pycache__/parser.cpython-313.pyc and b/codeshuffler/lib/__pycache__/parser.cpython-313.pyc differ diff --git a/codeshuffler/version.py b/codeshuffler/version.py index 5becc17..5c4105c 100644 --- a/codeshuffler/version.py +++ b/codeshuffler/version.py @@ -1 +1 @@ -__version__ = "1.0.0" +__version__ = "1.0.1" diff --git a/packaging/mac.spec b/packaging/mac.spec new file mode 100644 index 0000000..535aa62 --- /dev/null +++ b/packaging/mac.spec @@ -0,0 +1,55 @@ +import os +import sys +spec_dir = os.path.dirname(os.path.abspath(sys.argv[0])) +repo_root = os.path.abspath(os.path.join(spec_dir, "..")) + +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + [os.path.join(repo_root, 'main.py')], + pathex=[], + binaries=[], + datas=[ + (os.path.join(repo_root, 'codeshuffler/gui/icons'), + 'codeshuffler/gui/icons'), + ], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, +) + +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name='CodeShuffler', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=False, + argv_emulation=True, + bundle_identifier="com.codeshuffler.app", + icon=os.path.join( + repo_root, + 'codeshuffler/gui/icons/codeshuffler-icon.icns', + ), +) + +coll = COLLECT( + exe, + a.binaries, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='CodeShuffler', +) diff --git a/scripts/build_mac.sh b/scripts/build_mac.sh index 922e673..9162ae4 100644 --- a/scripts/build_mac.sh +++ b/scripts/build_mac.sh @@ -10,4 +10,4 @@ pip install --upgrade pip pip install -r requirements.txt pip install pyinstaller -pyinstaller packaging/codeshuffler.spec +pyinstaller packaging/mac.spec