Skip to content

Latest commit

 

History

History
129 lines (93 loc) · 3.25 KB

File metadata and controls

129 lines (93 loc) · 3.25 KB

🚀 Quick Start: Push Your Solution to GitHub

✅ What's Been Done

All 8 functions are implemented and committed locally:

  • _c_iota, _c_neg (Phase 1)
  • _c_add, _c_sub, _c_exp (Phase 2)
  • _c_transpose, _c_reduce, _c_reshape (Phase 3)
  • ✅ Tests enabled (pytest.mark.skip removed)
  • ✅ 5 commits with clear messages

Current Branch: solution/main

📤 How to Push to YOUR GitHub

Option 1: Using GitHub CLI (Easiest)

# 1. Install GitHub CLI if you don't have it
winget install GitHub.cli

# 2. Login to GitHub
gh auth login

# 3. Create and push to new repo
cd C:\Users\sanja\workspace\fall_2025\dsl\APL2C
gh repo create apl2c-solution --private --source=. --remote=my-solution --push

# 4. Push the solution branch
git push my-solution solution/main

Option 2: Manual Method

# 1. Go to github.com and create a new repository
#    - Name: apl2c-solution
#    - Visibility: Private
#    - Don't initialize with README

# 2. Add remote and push
cd C:\Users\sanja\workspace\fall_2025\dsl\APL2C
git remote add my-solution https://github.com/YOUR_USERNAME/apl2c-solution.git
git push -u my-solution solution/main

Option 3: Fork and Push to Your Fork

# 1. Go to https://github.com/DSLs-for-HPC/APL2C and click "Fork"

# 2. Add your fork as remote
git remote add fork https://github.com/YOUR_USERNAME/APL2C.git

# 3. Push solution branch to your fork
git push fork solution/main

🧪 Testing Your Code (Requires C Compiler)

If Visual Studio Build Tools finished installing:

# Open "x64 Native Tools Command Prompt for VS 2022"
cd C:\Users\sanja\workspace\fall_2025\dsl\APL2C
poetry run pytest tests/test_apl_codegen.py -v

If you want to use GCC instead:

# Download WinLibs from: https://winlibs.com/
# Extract to C:\mingw64
# Add to PATH:
$env:Path += ";C:\mingw64\bin"
$env:CC = "gcc"

# Then run tests:
poetry run pytest tests/test_apl_codegen.py -v

📋 Check Your Work

# View your commits
git log --oneline -5

# See what was changed
git diff assignment solution/main

# View file changes
git show solution/main --stat

🎯 For Assignment Submission

  1. Push to GitHub (using one of the methods above)
  2. Get the repo URL: https://github.com/YOUR_USERNAME/apl2c-solution
  3. Create a ZIP for Canvas:
    cd C:\Users\sanja\workspace\fall_2025\dsl\
    Compress-Archive -Path APL2C -DestinationPath APL2C-solution.zip
  4. Submit the ZIP on Canvas

📝 What to Share

When you push to GitHub, your instructor will see:

  • ✅ All 8 implementations in src/apl2c/apl/codegen.py
  • ✅ Clean commit history showing phased development
  • ✅ Test modifications in tests/test_apl_codegen.py
  • ✅ Documentation (SOLUTION_README.md, SETUP_INSTRUCTIONS.md)

⚠️ Important

  • Keep your repository PRIVATE to avoid academic integrity issues
  • Don't push to the original DSLs-for-HPC/APL2C repository
  • Use your own GitHub account

🆘 Need Help?

If you get errors:

  1. Make sure you're on the solution/main branch: git branch
  2. Check remote is added: git remote -v
  3. Verify commits exist: git log --oneline -5

Ready to push? Pick Option 1, 2, or 3 above and execute! 🚀