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.
Merge branch 'chris/models' of github.com:pennlabs/penn-degree-plan i…
…nto chris/models
- Loading branch information
Showing
7 changed files
with
2,904 additions
and
78 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,18 @@ | ||
import tqdm | ||
from django.core.management.base import BaseCommand | ||
|
||
from degree.models import DegreePlan, Rule | ||
from degree.utils.request_degreeworks import audit, degree_plans_of, get_programs, write_dp | ||
|
||
|
||
class Command(BaseCommand): | ||
# TODO: ADD HELP TEXT | ||
help = "" | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Generated by Django 3.2.20 on 2023-10-01 15:45 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("degree", "0002_auto_20230924_1412"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="degreeplan", | ||
name="program", | ||
field=models.CharField( | ||
choices=[ | ||
("EU_BSE", "Engineering BSE"), | ||
("EU_BAS", "Engineering BAS"), | ||
("AU_BA", "College BA"), | ||
("WU_BS", "Wharton BS"), | ||
], | ||
help_text="\nThe program code for this degree plan, e.g., EU_BSE\n", | ||
max_length=32, | ||
), | ||
), | ||
migrations.RemoveField( | ||
model_name="requirement", | ||
name="degree_plan", | ||
), | ||
migrations.AddField( | ||
model_name="requirement", | ||
name="degree_plan", | ||
field=models.ManyToManyField( | ||
help_text="\nThe degree plan(s) that have this requirement.\n", | ||
to="degree.DegreePlan", | ||
), | ||
), | ||
] |
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,84 @@ | ||
# Generated by Django 3.2.20 on 2023-10-06 21:54 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("degree", "0003_auto_20231001_1145"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="rule", | ||
name="max_cus", | ||
), | ||
migrations.RemoveField( | ||
model_name="rule", | ||
name="max_num", | ||
), | ||
migrations.RemoveField( | ||
model_name="rule", | ||
name="min_cus", | ||
), | ||
migrations.RemoveField( | ||
model_name="rule", | ||
name="min_num", | ||
), | ||
migrations.RemoveField( | ||
model_name="rule", | ||
name="requirement", | ||
), | ||
migrations.AddField( | ||
model_name="rule", | ||
name="cus", | ||
field=models.DecimalField( | ||
decimal_places=1, | ||
help_text="\nThe minimum number of CUs required for this rule. Only non-null\nif this is a Rule leaf.\n", | ||
max_digits=4, | ||
null=True, | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="rule", | ||
name="degree_plan", | ||
field=models.ForeignKey( | ||
default=0, | ||
help_text="\nThe degree plan that has this rule.\n", | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="degree.degreeplan", | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name="rule", | ||
name="num", | ||
field=models.IntegerField( | ||
help_text="\nThe minimum number of courses or subrules required for this rule.\n", | ||
null=True, | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="rule", | ||
name="parent", | ||
field=models.ForeignKey( | ||
help_text="\nThis rule's parent Rule if it has one.\n", | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="degree.rule", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="rule", | ||
name="q", | ||
field=models.TextField( | ||
help_text="\nString representing a Q() object that returns the set of courses\nsatisfying this rule. Only non-empty if this is a Rule leaf.\n", | ||
max_length=1000, | ||
), | ||
), | ||
migrations.DeleteModel( | ||
name="Requirement", | ||
), | ||
] |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.