virtualscienceforum / automation

Scripts for running the VSF
BSD 2-Clause "Simplified" License
0 stars 1 forks source link

Automatically scheduling zoom talks and sending keys #16

Closed everthemore closed 4 years ago

akhmerov commented 4 years ago

BTW, here the code for talking with zoom can be copies almost completely from #5

akhmerov commented 4 years ago

Let's separate issues, and implement host key rotation separately (I'm looking into that). We'll arrange the sending at a later stage.

akhmerov commented 4 years ago

Also if the meeting is configured to send an email upon registration, then participants registered via API will receive a registration confirmation, resulting in the speaker getting 2 emails: one with the host key, and another one with their join URL.

As a workaround we can create the meeting with registrants_email_notification = False, and then set it to True after registering the speaker.

Alternatively we can register the speaker with a wrong email. That's faster, but less classy.

akhmerov commented 4 years ago

@everthemore I pushed the implementation of host key rotation to the repo. host_key_rotation.host_key(timeslot: datetime.datetime) generates the key for a specific time slot.

akhmerov commented 4 years ago

cron runs aren't on yet, but I checked that key updates work.

akhmerov commented 4 years ago

@everthemore the keys are fully in place, and should be easy to reuse. Let's get this one going now.

akhmerov commented 4 years ago

I also put some reusable zoom functionality into common.py

everthemore commented 4 years ago

@akhmerov I added the 'add talk to researchseminars.org' file here too, since it makes sense to do so as soon as the zoom link has been registered.

The code is WIP, meaning that most likely some of the YAML fields are incorrectly named atm. I will fix this before we start testing of course. There are a few places in the code that I would like input on, I'll highlight them in review.

everthemore commented 4 years ago

Closes #20

akhmerov commented 4 years ago

Result of the LRC questions query:

{'questions': [{'field_name': 'last_name', 'required': True},
  {'field_name': 'org', 'required': False}],
 'custom_questions': [{'title': 'Please confirm you have read the participant instructions: http://virtualscienceforum.org/#/attendeeguide',
   'type': 'short',
   'required': True,
   'answers': []},
  {'title': 'May we contact you about future Virtual Science Forum events?',
   'type': 'single',
   'required': False,
   'answers': ['Yes', 'No']},
  {'title': 'How did you hear about the Virtual Science Forum?',
   'type': 'single',
   'required': False,
   'answers': ['Email list',
    'One of the organizers',
    'A colleague (not an organizer)',
    'Other']}]}
everthemore commented 4 years ago

@akhmerov Regarding adding talks to researchseminars.org: Adding a talk should only happen once, in principle, once the zoom meeting id exists. If anything changes, the same piece of code will simply update it, if in addition we add the unique talk identifier in the body. So question: Do we want to add such an identifier in the yaml?

everthemore commented 4 years ago

I have a temporary bit in there that prevents updating of the yaml file with talks, for the first few tests

akhmerov commented 4 years ago

Plan:

everthemore commented 4 years ago
  • [x] Implement email responses

What did you have in mind here? Should this instead be done by the host-key rotator?

akhmerov commented 4 years ago

Should this instead be done by the host-key rotator?

No, that one runs on schedule and doesn't know whom to contact. We should of course reuse the function that generates the host key for a given time slot, but call if from this workflow.

everthemore commented 4 years ago

Use mailgun?

everthemore commented 4 years ago

@akhmerov Zoom link for meeting is missing, and I'm sure other things are not up to standards. Hopefully I can tweak from here.

everthemore commented 4 years ago

Like adding the time slot to the email

everthemore commented 4 years ago

@akhmerov Merge for testing?

akhmerov commented 4 years ago

My linter catches a bunch of things, let me fix those first.

akhmerov commented 4 years ago

I propose to disable research seminars registration at first: it's easier to debug one thing at a time. Plus authorization is missing in one of the function signatures. Other than that I think good to merge and debug.