Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@ 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'
shell: pwsh
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
Expand Down
13 changes: 8 additions & 5 deletions codeshuffler/backlog.md
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -19,6 +23,5 @@
- UI Improvements

- Abstract more functionality away from the GUI

- ~~Menu Bar Branding & Packaging~~
- ~~Application Packaging, Executable Wrapping~~

- Allow for template changing through settings menu
25 changes: 25 additions & 0 deletions codeshuffler/gui/cache/inputs/mergelists.py
Original file line number Diff line number Diff line change
@@ -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 []",
}
Binary file added codeshuffler/gui/icons/codeshuffler-icon.icns
Binary file not shown.
Binary file modified codeshuffler/gui/tabs/__pycache__/examshuffler.cpython-313.pyc
Binary file not shown.
Binary file modified codeshuffler/gui/utils/__pycache__/syntax.cpython-313.pyc
Binary file not shown.
Binary file modified codeshuffler/lib/__pycache__/parser.cpython-313.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion codeshuffler/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.0"
__version__ = "1.0.1"
55 changes: 55 additions & 0 deletions packaging/mac.spec
Original file line number Diff line number Diff line change
@@ -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',
)
2 changes: 1 addition & 1 deletion scripts/build_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller

pyinstaller packaging/codeshuffler.spec
pyinstaller packaging/mac.spec