-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
# Usage: python parseSchedules.py [QUARTER] [OUTFILE] | ||
# | ||
# QUARTER: The school quarter of the schedule desired | ||
# (one of S/M1/M2/F) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is data for Summer semester available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Summer 1 and Summer 2 are M1 and M2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the two scripts use different terminology for this. Justin's script uses semester while this one uses quarter. I'm not as familiar with the data, but should we pick a name for both of these fields and go with it, or are the names good as they are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay, I thought those were minis. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I see that Justin's script has U for summer. Does that distinguish between Summer 1 and 2? For my script I have to since they are different links.
I'm ok with "semester" if we want that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My script has U for summer as the course description website doesn't make a distinction between Summer 1 and Summer 2. Perhaps we should have the semesters listed by the course description page associated with the course number, but each lecture/section has their own semester listed too?
I could have U be replaced by M1 and M2, but I'm not sure if the "Summer" listing means it's offered during both quarters.
@justingallagher @anbenson It'd be awesome if we could get some unit tests for your two scripts. |
The naming conventions between If you're looking for a style guide reference, see PEP 8. |
sys.exit() | ||
|
||
# parse data | ||
data = parseDataForQuarter(sys.argv[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put the command line args into descriptive variable names before using them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fixed
Style issues:
|
Any progress? |
this allows the 0 in departments like biology (03) to stay there
fixes bug with parsing a lot of courses completely wrong
Is this ready to be reviewed? I notice that you still have a couple TODOs in your code, but I'm not sure if those are like long-term TODOs or not. |
Not quite. I have a few local commits I haven't pushed, and I'm still figuring out how logging works so I can address a few last TODO's. |
Cool. Feel free to keep pushing again this PR, then, until you're ready, and leave a note or Facebook message when it's ready. |
All right, I think I've finally finished addressing most of the comments, and fixing the parsing bugs. Please take a look. |
### Output format | ||
|
||
Beware that any field below may have null or "TBA" instead of a string as a value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by "null"? The string null? The empty string? None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JavaScript value null. How do you suggest I make that explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap it in backticks.
I left two comments, I can't see anything else. I also tested it locally; it seems to work! Gonna pass this off to @tomshen for further review. |
------------|-----------|------------ | ||
instructors | [String] | List of last names of instructors of the lecture. | ||
letter | String | The lecture's identifier. Typically a capital letter or something like "Lec 1". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to call this lecture_number
? Are there situations where it isn't something like "Lec 1" or "Lec 2"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it's rarely something like "Lec 1" or "Lec 2". It's usually a capital letter (in lectures without recitations). Only awesome classes like 15122 use "Lec 1" or "Lec 2". I'm using "letter" so that it's somewhat consistent with the sections.
Once you make fix all the stuff noted in the comments, I think this is good to go. |
^ addresses jake's comments |
^pull plz? |
i haven't updated the readme yet (i'll do that in the next couple days) but this script works decently well. the instructions for how to use it are in the file. let me know about any errors you find, so i can fix them (i know of a couple that i'll be fixing soon).