Closed sapi closed 9 years ago
I spent some time over the last few days commenting everything* according to the Google style guide for Python docstrings. Hopefully that boosts the maintainability of MyPyTutor a fair bit.
I'm doing the same thing to the web API (in particular, mpt_cgi.py
) as individual calls are updated to work with Python 3 / the new tutorial format.
* excluding some GUI classes that I haven't got around to yet, and the parts of jgat's online/sso work, which were already nicely commented.
There's been a lot of functionality added against this pull request, including server functionality.
So that other people can work on the code using branches from master, and still be able to talk to the server, I'm going to merge this in.
Still more than happy to discuss individual changes after the fact.
I had quite a few hours spare after getting the static analysis and testing frameworks up to scratch, so I've cleaned up the code base (or, at least, tutorlib) quite substantially.
Because of the substantial changes, I'm not going to auto-merge this one as I usually do until @pjritee has had a chance to look over it.
Most of the meaningful commits have long, descriptive messages, so I'd encourage you to read those if you're interested. However, here's a quick overview of the changes:
tutorlib
is no longer a flat package; it now has various submodules:.analysis
- static analysis code.config
- code for managing the configuration files.gui
.app
- the main application window (excluding the editor).dialogs
- all the pesky dialog boxes.editor
- theEditorWindow
subclass (ie, where the students type their code).interface
- supporting code (much of which was originally inTutorialInterface
), along with wrappers around various other modules (such as testing and the web API).testing
- the testing framework (including allunittest
subclasses that we need)TutorialApp
and the removal ofTutorialInterface
)At the time of writing, the refactor isn't complete, but I wanted to throw this up here anyway. Remaining changes include:
and menu hotkeysgui.editor
,including the menus, which are non-compliant atm)all the web code needs to be rewritten/updated (I haven't got around to this yet, as I wanted to wait until I started on the synchronisation framework); this shouldn't be too difficult, as @jgat has already done the hard workrefactoringonline.py
(which I didn't want to touch until @jgat was done with it, and which doesn't need a great deal anyway)The branch should be stable for testing, and is compatible with the same tutorial format as master.
(Side note: because I merged
sso
in order to take advantage of the new auth system, merging this pull request will merge the current version ofsso
as well.)This pull request closes #2, closes #3, closes #9, closes #12, closes #25, closes #30, closes #34, closes #35.