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.
Here are the things that grader does well:
- Easy matlab grader code scraping(
reference code
,learner code
,...
)
- Easy github and matlab grader synchronization
- Email notifications about students submissions and statistics
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
- 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:
-
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"
-
Modify the
reference.m
orstarter.m
files you want to update -
Run the following code to update your matlab grader files
import grader if __name__ == "__main__": grader.loadCredentials() grader.UploadModified() ## MUST BE IN MAIN THREAD
-
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"
- 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
For usage questions, contact by email sarmiento.
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!