Skip to content

sarmientoF/grader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MATLAB GRADER SCRAPER


grader: powerful Python matlab grader scraping toolkit

Package Status Package Versions

What is it?

Grader is a Python package that provides fast, flexible downloading of your matlab grader code Check out matlab grader for more information.


Grader produces files that contain the reference code and learner template with .m extension. Grader can be used in Python scripts, the Python and IPython shell.

Main Features

Here are the things that grader does well:

  • Easy matlab grader code scraping(reference code, learner code, ...)

Upcoming Features

  • Easy github and matlab grader synchronization
  • Email notifications about students submissions and statistics

Where to get it

The source code is currently hosted on GitHub at: https://github.com/sarmientoF/grader.git

# PyPI
pip3 install git+https://github.com/sarmientoF/grader.git

How to use it

  • You must login at least once with the following command, this will crate a file called .credentials.json(🚨 Do not edit this file, it is generated automatically)
import grader
grader.login(YOUR_EMAIL, YOUR_PASSWORD)
  • Load your credentials everytime you use any other feature but login
import grader

if __name__ == "__main__":
    grader.loadCredentials()
    # ... other lines of code
  • The following lines of code load your credential and generate the follwing file myGrader.json(this contains the structure of your grader courses, such as: Courses, Assignments, Problems ...)
import grader

if __name__ == "__main__":
    grader.loadCredentials()
    grader.getGraderJson()
  • The following lines of code will create a folder called codes(this contains all the problems contained in your grader courses) and .html(this contains html pages of each grader problem)
import grader

if __name__ == "__main__": ## THIS IS MAIN THREAD
    grader.loadCredentials()
    grader.saveProblems() ## MUST BE INSIDE MAIN THREAD
├── codes
│   ├── Electromagnetism
│   │   ├── Capacitance
│   │   │   ├── ProblemFivePartAEdit
│   │   │   │   ├── reference.m
│   │   │   │   └── starter.m
│   │   │   ├── ProblemFivePartBEdit
│   │   │   │   ├── reference.m
│   │   │   │   └── starter.m
│   │   │   ├── ProblemFourPartAEdit
│   │   │   │   ├── reference.m
│   │   │   │   └── starter.m
│   │   │   ├── ProblemFourPartBEdit
│   │   │   │   ├── reference.m
│   │   │   │   └── starter.m
.   .   .   .   .
.   .   .   .   .
.   .   .   .   .
  • If you want to upload your changes to matlab grader, follow these steps:
  1. Init a git repo here and add all the files you obtained by utilizing grader.saveProblems()

    git init .
    git add .
    git commit -m "first commit"
  2. Modify the reference.m or starter.m files you want to update

  3. Run the following code to update your matlab grader files

    import grader
    
    if __name__ == "__main__":
        grader.loadCredentials()
        grader.UploadModified() ## MUST BE IN MAIN THREAD
  4. Finally, add and commit your changes from step 2 (this help us to only keep track of the most recent modifed files)

    git add .
    git commit -m "second commit"

Dependencies

Background

  • 4rd year Systems and Control Engineering undergrad student at Tokyo Institute of Technology .
  • Freelance Full Stack Developer
  • Intern at Pestalozzi Technology at IT department
  • Scholarship holder of Japan Ministry of Education, Culture, Sports, Science and Technology(MEXT)
  • Android, iOS, front end and backend developer

Getting Help

For usage questions, contact by email sarmiento.

Contributing to grader

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

Or maybe through using grader you have an idea of your own or are looking for something in the documentation and thinking ‘this can be improved’...you can do something about it!

Releases

No releases published

Packages

No packages published

Languages