Automatisation#

Examens#

ensae_teaching_cs.automation_students.git_helper.git_clone (local_folder, url_https, user = None, password = None, timeout = 60, init = True, fLOG = <function noLOG at 0x7f31b9f39c10>)

Clones a project from a git repository in a non empty local folder, it requires GIT to be installed and uses the command line.

ensae_teaching_cs.automation_students.enumerate_send_email (mailbox, subject, fr, df1, cc = None, delay = (1000, 1500), delay_sending = False, exc = True, skip = 0, only = None, params)

Sends feedback to students. Sets mailbox to None to see what the first mail looks like before going through the whole list.

ensae_teaching_cs.automation_students.interro_motif.execute_python_scripts (root, df, col_names = None, url = None, eol = “/”, fLOG = <function noLOG at 0x7f31b9f39c10>, gen_mail = None)

Retrieves all python scripts and run them.

ensae_teaching_cs.automation_students.extract_students_mail_and_name_from_gmail (user = None, pwd = None, server = “imap.gmail.com”, mailfolder = [“ensae/actuariat”], date = “1-Jan-2016”, fLOG = <function noLOG at 0x7f31b9f39c10>)

Extracts mails and names from a mail box.

ensae_teaching_cs.automation_students.extract_students_mails_from_gmail_and_stores_in_folders (folder = “.”, filemails = “emails.txt”, user = None, pwd = None, server = “imap.gmail.com”, mailfolder = [“ensae/ENSAE_2016_3A”], date = “1-Jan-2016”, zipfilename = “projet_3A_2016.zip”, zipencpwd = b’sixteenbyteskeys”, dataframe = None, columns = {“name”: “nom_prenom”, “group”: “groupe”, “subject”: “sujet”}, skip_names = None, process_name = None, title = “List of emails”, nolink_if = None, fLOG = <function fLOG at 0x7f31b9f39ca0>)

The scenario is the following:

  • You are the teacher.

  • Students started their projects at date t.

  • They can work alone or by group.

  • They send mails, you reply.

  • Their address mail follows the convention: <first name>.<last name>@anything so it is to associate a mail address to a student name.

  • You move every mail you received in a separate folder in your inbox.

  • Sometime, you send a mail to everybody.

  • Finally they send their project with attachments.

  • You want to store everything (mails and attachements) in folders, one per group.

  • You want a summary of what was received.

  • You want to build a zip file to share their work with others teachers.

  • You want to update the folder if a new mail was sent.

This function looks into a folder of your inbox and grabs every mails and attachements from a groups of students.

Web#

ensae_teaching_cs.automation.get_teaching_modules (branch = True)

List of teachings modules to maintain (CI + documentation).

ensae_teaching_cs.automation.publish_teachings_to_web (login, ftpsite = “ftp.xavierdupre.fr”, tracking_id = None, location = “c:jenkinspymy%s%s%sdist%s”, rootw = “/www/htdocs/app/%s/%s”, folder_status = “.”, layout = [(“html”, “helpsphinx”)], modules = None, password = None, force_allow = None, suffix = (“_UT_39_std”,), delay = 0.5, exc = False, exc_transfer = False, transfer = True, additional_projects = None, ftps = “FTP”, page_transform = None, fLOG = <built-in function print>)

Copies the documentation to the website.

ensae_teaching_cs.automation.rst_table_modules (classifier = False)

Produces a table with some modules useful to do machine learning.

ensae_teaching_cs.automation.setup_jenkins_server (js, github = “sdpython”, modules = None, overwrite = False, location = None, prefix = “”, delete_first = False, disable_schedule = False, fLOG = <function noLOG at 0x7f31b9f39c10>)

Sets up many jobs on Jenkins.