pedal-edu / pedal

A collection of tools to analyze student's Python source code
https://pedal-edu.github.io/pedal/
MIT License
29 stars 7 forks source link

Initial Major Restructure #1

Closed acbart closed 5 years ago

acbart commented 6 years ago

Here's what I propose for the directory layout (based on advice by http://docs.python-guide.org/en/latest/writing/structure/):

Top-Level:

All tests will go in the tests/ directory. We're already using unittest, so we can keep using that. I'll set up the MAKEFILE to run the relevant tests conveniently. I'll also be setting up a code coverage reporter.

We should probably use Sphinx to generate our documentation. I'm going to vote for Google style docstrings - I've been using them in Tifa and I think they're a bit more concise than the regular Sphinx ones. https://pythonhosted.org/an_example_pypi_project/sphinx.html#function-definitions

The Pedal module will have the following submodules:

These should be organized with absolute imports. The __init__.py file in each module should expose the client-facing functions/variables/classes.

Let me know if you have a preferred name for mistakes/ - perhaps misconceptions/ is better for that.

Here's a rough outline of dependencies between these libraries:

lukesg08 commented 6 years ago

All of what you said looks fine to me. I'm not sure I understand the "The init.py file in each module should expose the client-facing functions/variables/classes." because I'm not very well versed in python, but my understanding is that it's used for pathing?

acbart commented 6 years ago

Yep, just a matter of making imports prettier. if you put stuff into init.py, those things are available when you import the module. You can get some more info here.

After some design, I think there needs to be one more aspect to our pipeline: setting the source. This is the entry point for most of the modules, since they all need access to the students' source code. There might be some other elements that need to be set via the environment, but I think this is the primary. Others include:

acbart commented 6 years ago

Anyway, I have a design in mind, I'm going to mock it out and you can see what you think.