Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor dockerfile building #514

Merged
merged 6 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ ignore = [

"ANN101",
"ANN102",
"ANN201",
"ANN202",
"ANN204",

"E402",
"E501",
Expand All @@ -178,10 +181,11 @@ ignore = [
"C408",
"C901",

"FA100",

"T201",
"T203",

"D415",

"SIM108",

Expand All @@ -198,6 +202,8 @@ ignore = [
"D105",
"D106",
"D107",
"D202",
"D415",

"TRY003",
"TRY300",
Expand All @@ -207,6 +213,8 @@ ignore = [

"PERF203",

"PLC0415",

"PLW2901",
"PLW0603",

Expand All @@ -229,6 +237,7 @@ ignore = [

"PD901",

"UP006",
"UP040",

"SIM112",
Expand Down
23 changes: 9 additions & 14 deletions src/latch_cli/centromere/ctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class _Container:
image_name: str


# todo(ayush): cleanse this
class _CentromereCtx:
"""Manages state for interaction with centromere.

Expand Down Expand Up @@ -270,8 +271,7 @@ def __init__(
)
click.secho(f"`{new_meta}`", bold=True, fg="red", nl=False)
click.secho(
f" file:\n```\n{snakemake_metadata_example}```",
fg="red",
f" file:\n```\n{snakemake_metadata_example}```", fg="red"
)
if click.confirm(
click.style(
Expand Down Expand Up @@ -299,9 +299,10 @@ def __init__(
import subprocess

if system == "Linux":
res = subprocess.run(
["xdg-open", new_meta]
).returncode
res = subprocess.run([
"xdg-open",
new_meta,
]).returncode
elif system == "Darwin":
res = subprocess.run(["open", new_meta]).returncode
elif system == "Windows":
Expand All @@ -320,7 +321,7 @@ def __init__(
dedent(
"""
Make sure a `latch_metadata` exists in the Snakemake
project root or provide a metadata folder with the `--metadata-root` argument.""",
project root or provide a metadata folder with the `--metadata-root` argument."""
),
fg="red",
)
Expand Down Expand Up @@ -500,9 +501,7 @@ def get_old_centromere_info(self) -> Tuple[str, str]:
response = tinyrequests.post(
self.latch_provision_url,
headers=headers,
json={
"public_key": self.public_key,
},
json={"public_key": self.public_key},
)

resp = response.json()
Expand Down Expand Up @@ -559,11 +558,7 @@ def nucleus_get_image(self, task_name: str, version: Optional[str] = None) -> st

headers = {"Authorization": f"Bearer {self.token}"}
response = tinyrequests.post(
self.latch_get_image_url,
headers=headers,
json={
"task_name": task_name,
},
self.latch_get_image_url, headers=headers, json={"task_name": task_name}
)

resp = response.json()
Expand Down
Loading
Loading