forked from pennlabs/penn-courses
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor request_degreeworks to management script
- Loading branch information
Showing
4 changed files
with
2,394 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from django.core.management.base import BaseCommand | ||
import tqdm | ||
|
||
from degree.models import DegreePlan, Requirement, Rule | ||
from degree.utils.request_degreeworks import get_programs, degree_plans_of, audit, write_dp | ||
|
||
|
||
class Command(BaseCommand): | ||
help = "TODO: ADD HELP TEXT" | ||
|
||
def handle(self, *args, **kwargs): | ||
for year in range(2017, 2023 + 1): | ||
print(year) | ||
for program in get_programs(year=year): | ||
print("\t" + program) | ||
for degree_plan in tqdm(degree_plans_of(program), year=year): | ||
write_dp(degree_plan, audit(degree_plan)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.