Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Mar 12, 2024
1 parent 1ef019a commit e8aa274
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .tools/boilercv_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ def sync():

DEV = Path(".tools/requirements/dev.in")
NODEPS = Path(".tools/requirements/nodeps.in")
LOCK = Path(".lock") / RUNNER
print("welp2", LOCK) # noqa: T201
LOCK = Path(".lock")
LOCK.mkdir(exist_ok=True, parents=True)
print("welp3", LOCK) # noqa: T201


@app.command()
Expand Down Expand Up @@ -99,27 +97,21 @@ def lock(highest: bool = False):
)
if lock_result.returncode:
raise RuntimeError(lock_result.stderr)
path = LOCK / (
path = LOCK / Path(
"_".join([
"requirements",
RUNNER,
PYTHON_VERSION.replace(".", ""),
*([] if highest else ["dev"]),
])
+ ".txt"
)
print("welp4", path) # noqa: T201
print("welp5", LOCK.exists()) # noqa: T201
print("welp6", path.exists()) # noqa: T201
path.touch()
).with_suffix(".txt")
path.write_text(
encoding="utf-8",
data="\n".join([
r.strip() for r in [lock_result.stdout, NODEPS.read_text(encoding="utf-8")]
])
+ "\n",
)
print("welp7") # noqa: T201


LOCKFILE = Path(".tools/lock.json")
Expand All @@ -139,7 +131,7 @@ def combine_locks():
@app.command()
def get_lock():
name = "_".join(["requirements", RUNNER, PYTHON_VERSION.replace(".", ""), "dev"])
(LOCK / RUNNER / Path(name).with_suffix(".txt")).write_text(
(LOCK / Path(name).with_suffix(".txt")).write_text(
encoding="utf-8", data=json.loads(LOCKFILE.read_text("utf-8"))[name]
)

Expand Down

0 comments on commit e8aa274

Please sign in to comment.