~runxiyu/sjdb#3: 
Code quality

There are quite a few issues with the code quality that must be resolved:

  • The use of datetime objects, YYYY-MM-DD strings, and integer date representations are inconsistent.
  • Some main functions are too long.
  • Sometimes the API doesn't need to be called at all in weekly.py. Don't request for a token and don't make any network requests if all file downloads have already been completed.
  • Some variable names are frankly stupid. What does tbll look like to you?
  • Some things e.g. in menu interpretation are hardcoded.
  • Configuration objects should probably not be passed around. It makes more sense to directly pass relevant things as variables directly.
Status
REPORTED
Submitter
~runxiyu
Assigned to
No-one
Submitted
8 months ago
Updated
7 months ago
Labels
enhancement

~runxiyu 8 months ago

Commit eaa922639f10f78d7b0e524557eaeb75f69c90fd fixes most of this for weekly.py.

~runxiyu 7 months ago

Date strings should not be passed around. Pass around "aware" datetime objects instead.

Register here or Log in to comment, or comment via email.