Compare commits
No commits in common. "0f2e61e6009038a1da5bd690d2aeec2ee984b7d1" and "11a5c0727778418b759e5cb19498c5ec7a6f5c52" have entirely different histories.
0f2e61e600
...
11a5c07277
2 changed files with 0 additions and 22 deletions
|
@ -6,7 +6,6 @@ from .toml import import_tomls, update_project, reimport_project
|
||||||
from .find import find_record, list_projects
|
from .find import find_record, list_projects
|
||||||
from .tools import str2list
|
from .tools import str2list
|
||||||
from .main import update_aliases
|
from .main import update_aliases
|
||||||
from .meas_io import drop_cache as mio_drop_cache
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
app = typer.Typer()
|
app = typer.Typer()
|
||||||
|
@ -158,21 +157,6 @@ def init(
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@app.command()
|
|
||||||
def drop_cache(
|
|
||||||
path: str = typer.Option(
|
|
||||||
str('./corrlib'),
|
|
||||||
"--dataset",
|
|
||||||
"-d",
|
|
||||||
),
|
|
||||||
) -> None:
|
|
||||||
"""
|
|
||||||
Drop the currect cache directory of the dataset.
|
|
||||||
"""
|
|
||||||
mio_drop_cache(path)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
@app.callback()
|
@app.callback()
|
||||||
def main(
|
def main(
|
||||||
version: Optional[bool] = typer.Option(
|
version: Optional[bool] = typer.Option(
|
||||||
|
|
|
@ -8,7 +8,6 @@ from typing import Union
|
||||||
from pyerrors import Obs, Corr, dump_object, load_object
|
from pyerrors import Obs, Corr, dump_object, load_object
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
from .tools import cached
|
from .tools import cached
|
||||||
import shutil
|
|
||||||
|
|
||||||
|
|
||||||
def write_measurement(path, ensemble, measurement, uuid, code, parameter_file=None):
|
def write_measurement(path, ensemble, measurement, uuid, code, parameter_file=None):
|
||||||
|
@ -195,8 +194,3 @@ def drop_record(path: str, meas_path: str):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
raise ValueError("This measurement does not exist as a file!")
|
raise ValueError("This measurement does not exist as a file!")
|
||||||
|
|
||||||
def drop_cache(path: str):
|
|
||||||
cache_dir = os.path.join(path, ".cache")
|
|
||||||
for f in os.listdir(cache_dir):
|
|
||||||
shutil.rmtree(os.path.join(cache_dir, f))
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue