Job Configuration - i-on-project/integration GitHub Wiki

On each job execution, besides doing basic sanity checks on received parameters, Integration must also confirm whether they correspond to supported institutions or programmes. This information could be kept in the supporting database, but we opted on using a single YAML configuration file so:

  • Information about supported institutions and programmes is kept together, maintainers do not have multiple files to chase down and edit.
  • The file is written in plaintext, so it can be read and edited by project contributors without needing deep understanding of the surrounding infrastructure.
  • It could, in the future, be moved to a remote location (i.e., a Git repository) and the only change would be to add means to automatically acquire it from said location.
  • Changes made to the file are immediately visible and usable by the application and do not require a restart. Currently the file is saved under the src/main/resources/config directory as supported-institutions.yml. It consists of an array of institution objects, although presently only one entry exists (for ISEL). The institution objects are described in the table below.
Field Type Description
Name Text Institution name
Timezone Text Refers to the institution time zone and is based in the IANA time zone database
Identifier URI Unique identifier using the institution’s reversed domain name
Resources Resource Array Resources used to obtain institution source data
Programmes Programme Array Supported programmes belonging to the institution

Each Resource object contains two fields: type and uri. The type is one of the supported file sources (academic_calendar, timetable, evaluations). And the uri field holds the resource’s location.

The Programme object is also composed of two fields: name and resources (which is another array of Resources).

Below you can find an example of a configuration file:

- name: Instituto Superior de Engenharia de Lisboa
  identifier: pt.ipl.isel
  timezone: Europe/Lisbon
  resources:
    - type: academic_calendar
      uri: https://www.isel.pt/media/uploads/OS09P2020_signed.pdf
  programmes:
    - name: Licenciatura em Engenharia Electrónica e Telecomunicações e de Computadores
      resources:
        - type: timetable
          uri: https://www.isel.pt/media/uploads/ADEETC_LEETC_210322.pdf
        - type: evaluations
          uri: https://www.isel.pt/media/uploads/tinymce/ADEETC_EN_ER_EE_210526.pdf
    - name: Licenciatura em Engenharia Informática e de Computadores
      resources:
        - type: timetable
          uri: https://www.isel.pt/media/uploads/ADEETC_LEIC_210322.pdf
        - type: evaluations
          uri: https://www.isel.pt/media/uploads/tinymce/ADEETC_EN_ER_EE_210526.pdf