code
stringlengths
3
6.57k
patch("sentry.integrations.github_enterprise.webhook.get_installation_metadata")
test_multiple_orgs(self, mock_get_installation_metadata, mock_get_jwt)
integration.add_organization(project.organization, self.user)
self.create_organization()
self.create_project(organization=org2, name="bar")
integration.add_organization(org2, self.user)
six.text_type(uuid4()
Commit.objects.filter(organization_id=project.organization_id)
select_related("author")
order_by("-date_added")
len(commit_list)
Commit.objects.filter(organization_id=org2.id)
select_related("author")
order_by("-date_added")
len(commit_list)
PullRequestEventWebhook(APITestCase)
patch("sentry.integrations.github_enterprise.webhook.get_installation_metadata")
test_opened(self, mock_get_installation_metadata)
integration.add_organization(project.organization, self.user)
six.text_type(uuid4()
len(prs)
patch("sentry.integrations.github_enterprise.webhook.get_installation_metadata")
test_edited(self, mock_get_installation_metadata)
integration.add_organization(project.organization, self.user)
six.text_type(uuid4()
PullRequest.objects.get(id=pr.id)
patch("sentry.integrations.github_enterprise.webhook.get_installation_metadata")
test_closed(self, mock_get_installation_metadata)
integration.add_organization(project.organization, self.user)
six.text_type(uuid4()
len(prs)
TurbomoleHarness(ProgramHarness)
found(raise_error: bool = False)
get_version(self)
which("define")
temporary_directory(suffix="_define_scratch")
Path(tmpdir)
execute_define("\n", cwd=tmpdir)
re.compile("TURBOMOLE (?:rev\. )
version_re.search(stdout)
safe_version(version)
compute(self, input_model: "AtomicInput", config: "TaskConfig")
self.found(raise_error=True)
self.build_input(input_model, config)
self.execute(job_inputs)
InputError(dexe["stdout"])
self.parse_output(dexe["outfiles"], input_model)
sub_control(self, control, pattern, repl, **kwargs)
re.sub(pattern, repl, control, **kwargs)
append_control(self, control, to_append)
self.sub_control(control, "\$end", f"{to_append}\n$end")
isinstance(input_model.model.basis, BasisSet)
InputError("QCSchema BasisSet for model.basis not implemented. Use string basis name.")
input_model.molecule.to_string(dtype="turbomole", return_data=True)
input_model.driver.derivative_int()
temporary_directory(suffix="_define_scratch")
Path(tmpdir)
open(tmpdir / "coord", "w")
handle.write(coord_str)
execute_define(stdin, cwd=tmpdir)
split()
full_fn.exists()
open(full_fn)
handle.read()
os.environ.copy()
str(config.ncores)
str(config.ncores)
any([keywords.get(ri_kw, False)
int(ricore / config.ncores)
self.sub_control(control, "\$ricore\s+(\d+)
int(maxcor / config.ncores)
self.sub_control(control, "\$maxcor\s+(\d+)
input_model.driver.derivative_int()
geoopt (state)
commands.append("ricc2")
input_model.driver.derivative_int()
commands.append(grad_command)
input_model.driver.derivative_int()
commands.append(freq_command)
self.append_control(control, "$noproj\n$nprhessian file=nprhessian")
join(commands)
which()
outfiles.pop("stdout")
harvest(input_model.molecule, stdout, **outfiles)
input_model.driver.upper()
isinstance(retres, Decimal)
float(retres)
build_out(qcvars)
build_atomicproperties(qcvars)
input_model.dict()
Provenance(creator="Turbomole", version=self.get_version()
AtomicResult(**output_data)
Action(object)
__init__(self, callback: Callable, *args, **kwargs)
partial(callback, *args, **kwargs)
__repr__(self)
__call__(self)
self._callback()
set_schedule(self, schedule: Schedule)
self.schedule_next_execution()