Skip to content

Commit

Permalink
some references are still k32
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Jun 29, 2021
1 parent de8b312 commit eb82eaa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/plotman/_tests/plot_util_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ def test_columns() -> None:
[ 1 ],
[ 2 ] ] )

def test_list_k_plots(fs: pyfakefs.fake_filesystem.FakeFilesystem) -> None:
def test_list_plots(fs: pyfakefs.fake_filesystem.FakeFilesystem) -> None:
fs.create_file('/t/plot-k32-0.plot', st_size=108 * GB)
fs.create_file('/t/plot-k32-1.plot', st_size=108 * GB)
fs.create_file('/t/.plot-k32-2.plot', st_size=108 * GB)
fs.create_file('/t/plot-k32-3.plot.2.tmp', st_size=108 * GB)
fs.create_file('/t/plot-k32-4.plot', st_size=100 * GB)
fs.create_file('/t/plot-k32-5.plot', st_size=108 * GB)

assert (plot_util.list_k_plots('/t/') ==
assert (plot_util.list_plots('/t/') ==
[ '/t/plot-k32-0.plot',
'/t/plot-k32-1.plot',
'/t/plot-k32-5.plot' ] )
Expand Down
4 changes: 2 additions & 2 deletions src/plotman/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def spawn_archive_process(dir_cfg: configuration.Directories, arch_cfg: configur

def compute_priority(phase: job.Phase, gb_free: float, n_plots: int) -> int:
# All these values are designed around dst buffer dirs of about
# ~2TB size and containing k plots. TODO: Generalize, and
# ~2TB size and containing k32 plots. TODO: Generalize, and
# rewrite as a sort function.

priority = 50
Expand Down Expand Up @@ -210,7 +210,7 @@ def archive(dir_cfg: configuration.Directories, arch_cfg: configuration.Archivin
dst_dir = dir_cfg.get_dst_directories()
for d in dst_dir:
ph = dir2ph.get(d, job.Phase(0, 0))
dir_plots = plot_util.list_k_plots(d)
dir_plots = plot_util.list_plots(d)
gb_free = plot_util.df_b(d) / plot_util.GB
n_plots = len(dir_plots)
priority = compute_priority(ph, gb_free, n_plots)
Expand Down
2 changes: 1 addition & 1 deletion src/plotman/plot_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def split_path_prefix(items: typing.List[str]) -> typing.Tuple[str, typing.List[
remainders = [ os.path.relpath(i, prefix) for i in items ]
return (prefix, remainders)

def list_k_plots(d: str) -> typing.List[str]:
def list_plots(d: str) -> typing.List[str]:
'List completed plots in a directory (not recursive)'
plots = []
for plot in os.listdir(d):
Expand Down
2 changes: 1 addition & 1 deletion src/plotman/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def dst_dir_report(jobs: typing.List[job.Job], dstdirs: typing.List[str], width:
eldest_ph = dir2oldphase.get(d, job.Phase(0, 0))
phases = job.job_phases_for_dstdir(d, jobs)

dir_plots = plot_util.list_k_plots(d)
dir_plots = plot_util.list_plots(d)
gb_free = int(plot_util.df_b(d) / plot_util.GB)
n_plots = len(dir_plots)
priority = archive.compute_priority(eldest_ph, gb_free, n_plots)
Expand Down

0 comments on commit eb82eaa

Please sign in to comment.