Skip to content

Configuration

Colin Robbins edited this page Apr 16, 2020 · 19 revisions

SCM Helper is driven by the file scm-helper/config.yaml in your home directory. A default file will be created for you.

You MUST edit this file to configure SCM Helper to meet your needs. It should run with no configuration, but will likely report a lot of false errors.

Example

See leander.yaml for a full worked example.

Configuration Sections

Email

This is used to configure the command line --email option.

email:
  smtp_server: smtp.server.address
  smtp_port: 25
  username:
  send_to:
  tls: False
  password: "email.enc"     # This file will be created when needed.

The parameters should be self explainatary.

Swim England

See Swim England feature.

Swimmers

This applies to all swimming types: Swimmers, Water Polo and Syncho. Further configuration via the [Types](##Types] configuration.

swimmers:
    username:
        min_age: 17     # Min age to have a user name
    parent:
        mandatory: True # Must have a parent
        max_age: 17     # Age a parent is mandatory until
    confirmation_difference:
        verify: False    
    absence:
        time:  182      # Warn if not seen at swimming for this period of time

If confirmation_difference is set to True SCM Helper will look for and difference of more than 3 months in the confiuration confirmation dates fo parents and children. If there is a difference, it will then check to see of basic details like email, phone and address are the same. If they are, it will not print an error. If an error is printed it means parent has not confirmed their detials, and they are different to the child. This prevents this situation where we needlessly hassle parents to confirm details, when the child details are up to date and the same.

Parents

parents:
    age:
        min_age: 17   # min age to be a parent
        child: 21     # Age at which child should not longer have a parent
    login:
        mandatory: True         # must have a login to SCM

No explaination needed!

Members

This applies to all club members.

members:
    confirmation:
        expiry: 365             # Warn if confirmation more than this many day old.
        align_quarter: True     # Align expiry to calender quarter
                                # So reminders go in batches.
    dbs:
        expiry: 60      # Days waring prior to expiry.
    newstarter:
        grace:  90      # Don't give errors for 90 days, giving admin time to sort it all out
    inactive:
        time: 365       # Warn if member in inactive state for this many days

The align_quarter is used so that we are not constantly getting NOT CONFIRMED issues reported. Instead, they come in batches each quarter.

Coaches

coaches:
    role:
        mandatory: False # All coaches, must be in a coach role

No explaination needed!

Roles

This relates to Roles configured in SCM.

roles:
    volunteer:
        mandatory: True       # if user in a role, the volunteer flag must be set
    login:
        unused: 180           # Error if not used in 180 days

Above should be obvious.

For each roles you want to check you need to add the roles to the configurations. Roles not in the configuration will not be checked.

roles:
    role:
     "Coaches":
         check_permissions: False
         is_coach: True                # Should have "Is A Coach" ticked.
     "Register Taker":
         check_restrictions: True        # Check they have session restrictions

In the above we have two example roles Coaches and Register Taker configured in SCM. The parameters are:

  • check_permissions

    In our set up, each coach has SCM restricted sessions configured, so when the coach logs on they can only see the records of the swimmers they coach. With this set to true SCM Helper will check all the permissions are set correctly.

  • is_coach

    If in the coaches role, they must have "is a coach" ticked in SCM.

  • check_restrictions

    Like check_permissions, but we don't know which sessions should be configured, so the check is less stringent.

Groups

groups:
  priority:   
    - 'Water Polo'
    - 'Masters'

When printing issues, in some cases SCM Help will print the swimmers group. If a members is in multiple groups, they will be printed in this priority order.

You can configure the checking behaviour on a per group basis. These should be listed in the group parameter as follows...

groups
  group:
    'Membership Only':
        no_sessions: true
    'Senior Development':
        sessions: 
          - 'Senior Development'
        type: swimmer
    'Masters':
        session: 
          - 'Masters'
        no_session_allowed:
          - 'Life Members and Past Presidents'
          - 'Membership Only'
        unique: false
        min_age: 17
        type: swimmer
    'Life Members and Past Presidents':
        ignore_unknown: true    # Don't raise issue if not a swimmer, parent or coach.
        unique: false
    'Team Manager':
        check_dbs: true
        type: volunteer       # Must be of this type
        unique: false
    'Club Timekeeper':
        unique: false
        type: volunteer
    'Resignations':
        ignore_swimmer: true

Where the paramters are:

  • check_dbs

    Members of the group should have a DBS and Safeguarding.

  • ignore_swimmer

    Don't report any errors for this group

  • ignore_unknown

    If someone is not a swimmer/coach/parent/volunteer an error is normally printed. Ignore the issue of they are in this group.

  • min_age and max_age

    The minimum and maximum age allowed for the group

  • no_session_allowed

    This contains a list of other groups. If they are a member of these groups also, don't report session errors.

  • no_sessions

    If true don't check session membership

  • sessions

    The member should belong to at least one of these sessions. This is not an exact match - the session name must contian this string. For example, the "Masters" group above, would be allowed in the sessions "Masters", "Seniors and Masters" or "Masters Sprint Session".

  • type

    Members of the group, must also have the relevant type set in SCM.

  • unique If set to true the member should be a member of this group only.

Sessions

sessions:
  absence:  120  # Number of days allowed to miss a sesssion
  register: 60   # Alert if register not taken for this many days

Above should be obvious.

You can configure the checking behaviour on a per session basis. These should be listed in the session parameter as follows...

sessions:
  session:
    'Junior Squad':
        groups:
          - 'Junior Squad'
    'Masters':
        groups:
          - 'Masters'
    'Transition':
        groups:
          - 'Tadpoles'
          - 'Development'
          - 'Transition'
        ignore_attendance: True
    'Starts and Turns':
        ignore_attendance: True

Where the paramters are:

  • groups

    A list of groups a member of the session should be in. They only need to be a member of one. Not all.

  • ignore_attendance

    Don't report on attendance issues for this session.

Codes of Conduct

conduct:
   "Code of Conduct for Coaches":
      types:
        - "coach"
    "Code of Conduct for Swimmers and Water Polo Players":
      types:
        - "swimmer"
      ignore_group:
        - "Tadpoles"

For each code of conduct, you can configure the type the code should apply to. While this is configured in SCM, and is applied automatically, this seems to go wrong if you change the type of entries. So this will report on missing codes.

The ignore_group parameter is used to exclude that group from the code.

Lists

See Lists

Types

You can configure the checking behaviour on a per type basis (swimmers, parent, volunteer, committee, synchro etc) These should be listed in the types parameter as follows...

types:
    synchro:
        name: "Synchro"
        check_se_number: False
        parents: False              # Don't check parents, overrides Mandatory above.
    waterpolo:
        name: "Water Polo"
        groups:                   # Specify if they must be members of a specific group
         - "Water Polo"
    volunteer:
        ignore_coach: True          # If coach, do not need to be a volunteer
        ignore_committee: True      # If committee, do not need to be a volunteer
        groups:
          - "Team Manager"
          - "Club Timekeeper"
          - "Licensed Officals"
    committee:
        jobtitle: True              # must have a job title

Where the paramters are:

  • name

    Is an alternative name to print.

  • check_se_number

    If false the existance of a Swim England numner will not be checked

  • parents

    If false parent records will not be checked

  • groups

    Members of the type should also be members of one of the listed groups.

  • ignore_coach and ignore_committee

    If true then the volunteer type is not needed for these types

  • jobtitle

    This type must have a jobtitle in thier entry.

Normally, if a job title is given the member should be a volunteer or committee member. This lists job titles that can be ignored.

jobtitle:
    ignore:
        - "Vice President"      # If VP, dont need to be a committee member.

Facebook

See Facebook

Issues

See Configuration Issues

Clone this wiki locally