Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autograding to divide points #120

Open
sgbaird opened this issue Nov 7, 2024 · 2 comments
Open

Fix autograding to divide points #120

sgbaird opened this issue Nov 7, 2024 · 2 comments
Assignees

Comments

@sgbaird
Copy link
Member

sgbaird commented Nov 7, 2024

Existing example from https://github.com/ACC-Robotics/1-pumps-and-pipettes/blob/main/.github/classroom/autograding.json

{
    "tests": [
      {
        "name": "Run pytest",
        "setup": "pip install -r requirements.txt",
        "run": "pytest",
        "input": "",
        "output": "",
        "comparison": "included",
        "timeout": 10,
        "points": 100
      }
    ]
  }

Use pytest file_name.py::function_name syntax to assign partial points (and make sure points add up to the total for the assignment, 10 points in most cases).

@sgbaird
Copy link
Member Author

sgbaird commented Nov 7, 2024

This is the new yaml syntax, which we should try to switch to: https://github.com/ACC-Robotics/0.2-intro-github-classroom/blob/main/.github/workflows/classroom.yml

E.g.,

name: Autograding Tests
'on':
- push
- repository_dispatch
permissions:
  checks: write
  actions: read
  contents: read
jobs:
  run-autograding-tests:
    runs-on: ubuntu-latest
    if: github.actor != 'github-classroom[bot]'
    steps:
    - name: Checkout code
      uses: actions/checkout@v4
    - name: Hello world test
      id: hello-world-test
      uses: classroom-resources/autograding-python-grader@v1
      with:
        timeout: 5
        max-score: 5
        setup-command: sudo -H pip3 install pytest
    - name: Autograding Reporter
      uses: classroom-resources/autograding-grading-reporter@v1
      env:
        HELLO-WORLD-TEST_RESULTS: "${{steps.hello-world-test.outputs.result}}"
      with:
        runners: hello-world-test

@SissiFeng SissiFeng self-assigned this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants