mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-08 10:34:06 +00:00
Simplify plumbum usage in update_wiki
This commit is contained in:
@@ -46,8 +46,7 @@ def calculate_monthly_stat(
|
|||||||
images = year_month_file.content.count("Build manifest")
|
images = year_month_file.content.count("Build manifest")
|
||||||
|
|
||||||
with plumbum.local.env(TZ="UTC"):
|
with plumbum.local.env(TZ="UTC"):
|
||||||
future = (
|
git_log = git[
|
||||||
git[
|
|
||||||
"log",
|
"log",
|
||||||
"--oneline",
|
"--oneline",
|
||||||
"--since",
|
"--since",
|
||||||
@@ -55,12 +54,8 @@ def calculate_monthly_stat(
|
|||||||
"--until",
|
"--until",
|
||||||
f"{year_month_date + relativedelta.relativedelta(months=1)}.midnight",
|
f"{year_month_date + relativedelta.relativedelta(months=1)}.midnight",
|
||||||
"--first-parent",
|
"--first-parent",
|
||||||
]
|
]()
|
||||||
& plumbum.BG
|
commits = len(git_log.splitlines())
|
||||||
)
|
|
||||||
future.wait()
|
|
||||||
commits = len(future.stdout.splitlines())
|
|
||||||
|
|
||||||
return Statistics(builds=builds, images=images, commits=commits)
|
return Statistics(builds=builds, images=images, commits=commits)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user