degreepath / auditor

The evaluator for Degreepath
GNU Affero General Public License v3.0
5 stars 3 forks source link

Rebuild codified areas with explicit names on requirements instead of using maps #41

Closed hawkrives closed 5 years ago

hawkrives commented 5 years ago

iow, go from this

name: Biology
type: major
degree: Bachelor of Arts
catalog: 2018-19

result:
  count: all
  of:
    - requirement: Foundation
    - requirement: Core
    - requirement: Level III
    - requirement: Electives
    - requirement: Chemistry

limiters:
  - where: {level: '100'}
    at_most: 2
  - where: {institution: '! St. Olaf College'}
    at_most: 0

requirements:
  Foundation:
    result:
      course: BIO 150

  Core:
    result:
      count: all
      of:
        - requirement: Genetics
        - requirement: Cell Biology
        - requirement: Comparative Organismal Biology
        - requirement: Ecology

    requirements:
      Genetics:
        result:
          count: 1
          of:
            - BIO 233

      Cell Biology:
        result:
          count: 1
          of:
            - BIO 227
            - CH/BI 227

      Comparative Organismal Biology:
        result:
          count: 1
          of:
            - BIO 242
            - BIO 247
            - BIO 248
            - BIO 251
            - BIO 252
            - BIO 266
            - BIO 275
            - BIO 226

      Ecology:
        result:
          count: 1
          of:
            - BIO 261
            - BIO 226

  Level III:
    result:
      count: 1
      of:
        - BIO 315
        - BIO 341
        - BIO 348
        - BIO 363
        - BIO 364
        - BIO 371
        - BIO 372
        - BIO 382
        - BIO 383
        - BIO 385
        - BIO 386
        - BIO 391

  Electives:
    result:
      given: courses
      where: {attribute: bio_elective}
      what: courses
      do: count >= 2

  Chemistry:
    result:
      count: any
      of:
        - {count: all, of: [CHEM 121, CHEM 123, CHEM 126]}
        - {count: all, of: [CHEM 125, CHEM 126]}
        - {count: all, of: [CH/BI 125, CH/BI 126]}

to this

name: Biology
type: major
degree: Bachelor of Arts
catalog: 2018-19

result:
  count: all
  of:
    - requirement: Foundation
    - requirement: Core
    - requirement: Level III
    - requirement: Electives
    - requirement: Chemistry

limiters:
  - where: {level: '100'}
    at_most: 2
  - where: {institution: '! St. Olaf College'}
    at_most: 0

requirements:
  - name: Foundation
    result:
      course: BIO 150

  - name: Core
    result:
      count: all
      of:
        - requirement: Genetics
        - requirement: Cell Biology
        - requirement: Comparative Organismal Biology
        - requirement: Ecology

    requirements:
      - name: Genetics
        result:
          count: 1
          of:
            - BIO 233

      - name: Cell Biology
        result:
          count: 1
          of:
            - BIO 227
            - CH/BI 227

      - name: Comparative Organismal Biology
        result:
          count: 1
          of:
            - BIO 242
            - BIO 247
            - BIO 248
            - BIO 251
            - BIO 252
            - BIO 266
            - BIO 275
            - BIO 226

      - name: Ecology
        result:
          count: 1
          of:
            - BIO 261
            - BIO 226

  - name: Level III
    result:
      count: 1
      of:
        - BIO 315
        - BIO 341
        - BIO 348
        - BIO 363
        - BIO 364
        - BIO 371
        - BIO 372
        - BIO 382
        - BIO 383
        - BIO 385
        - BIO 386
        - BIO 391

  - name: Electives
    result:
      given: courses
      where: {attribute: bio_elective}
      what: courses
      do: count >= 2

  - name: Chemistry
    result:
      count: any
      of:
        - {count: all, of: [CHEM 121, CHEM 123, CHEM 126]}
        - {count: all, of: [CHEM 125, CHEM 126]}
        - {count: all, of: [CH/BI 125, CH/BI 126]}
hawkrives commented 5 years ago

Done in db54a51e6faf8925ad3ccc78c9b36a6556e4ccfa