def get_installation(self, id): """ :param id: :return: """ return Installation.Installation(self.__requester, headers={}, attributes={"id": id}, completed=True)
def get_installation(self, owner, repo): """ :calls: `GET /repos/:owner/:repo/installation <https://developer.github.com/v3/apps/#get-a-repository-installation>`_ :param owner: str :param repo: str :rtype: :class:`github.Installation.Installation` """ headers = { "Authorization": "Bearer {}".format(self.create_jwt()), "Accept": Consts.mediaTypeIntegrationPreview, "User-Agent": "PyGithub/Python", } response = requests.get("{}/repos/{}/{}/installation".format( DEFAULT_BASE_URL, owner, repo), headers=headers) response_dict = response.json() return Installation.Installation(None, headers, response_dict, True)
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import Installation as install import Equipement as equip import Activite as activ import database as bd import time import json #On commence par extraire les donnees des fichiers json installations = install.parseJson("Installations.json") equipements = equip.parseJson("Equipements.json") activites = activ.parseJson("Activites.json") #Creation de la base de donnees mabdeyy = bd.Database("BD/M4105C.db") #On effectue des insertions dans la base #Pour les installations mabdeyy.create_new("installation", installations[0]) mabdeyy.insert(installations) mabdeyy.select_all("installation") #Pour les activites mabdeyy.create_new("activite", activites[0]) mabdeyy.insert(activites) mabdeyy.select_all("activite")
import WorkPath import Installation import Revision if __name__ == '__main__': config_file_names = ['revison_setups', 'revisions'] work_path = WorkPath.WorkPath('program') revisions = Revision.Revision(work_path.out(), config_file_names) var = {'Compilation Manager': {'replacements': 'There are {flag} pads for the compiler.', 'file_name': 'compile', 'variation': ['{flag}']}, 'Thread Manager': {'replacements': 'There is a {threads} pad before running the program.', 'file_name': 'threads', 'variation': ['{threads}']}, 'Program Manager': {'replacements': 'There are two variation pads for the Program manager {flags} and {' 'problem}. Both use text.', 'file_name': 'program', 'variation': ['{flags}', '{problem}']}, } states = Installation.Installation(revisions.working_directory, var, config_file_names)