diff --git a/charidotella/__init__.py b/charidotella/__init__.py index bad76da..12355a9 100644 --- a/charidotella/__init__.py +++ b/charidotella/__init__.py @@ -205,7 +205,7 @@ def load_parameters(path: pathlib.Path): def save_parameters(path: pathlib.Path, parameters: dict[str, typing.Any]): with open(path.with_suffix(".part"), "w", encoding="utf-8") as file: toml.dump(parameters, file) - path.with_suffix(".part").rename(path) + path.with_suffix(".part").replace(path) def compare_parameters(a: dict[str, typing.Any], b: dict[str, typing.Any]): return json.dumps(a, sort_keys=True, separators=(",", ":")) == json.dumps( @@ -656,7 +656,7 @@ def run_generators(configuration: dict[str, typing.Any]): toml.load(configuration_file), configuration_schema(), ) - utilities.with_suffix(configuration_path, ".part").rename(configuration_path) + utilities.with_suffix(configuration_path, ".part").replace(configuration_path) sys.exit(0) if args.command == "run": @@ -801,7 +801,7 @@ def run_generators(configuration: dict[str, typing.Any]): ) utilities.with_suffix( directory / name / attachment["target"], ".part" - ).rename(directory / name / attachment["target"]) + ).replace(directory / name / attachment["target"]) parameters["attachments"][attachment["target"]] = attachment[ "source" ] @@ -827,7 +827,7 @@ def run_generators(configuration: dict[str, typing.Any]): end, filter["parameters"], ) - utilities.with_suffix(output_path, ".part").rename(output_path) + utilities.with_suffix(output_path, ".part").replace(output_path) parameters["filters"][filter_name] = filter["parameters"] save_parameters(parameters_path, parameters) else: @@ -873,7 +873,7 @@ def run_generators(configuration: dict[str, typing.Any]): ) input = output parameters["filters"][filter_name] = filter["parameters"] - utilities.with_suffix(output_path, ".part").rename(output_path) + utilities.with_suffix(output_path, ".part").replace(output_path) save_parameters(parameters_path, parameters) for task_name in job["tasks"]: task = configuration["tasks"][task_name] @@ -898,7 +898,7 @@ def run_generators(configuration: dict[str, typing.Any]): end, task["parameters"], ) - utilities.with_suffix(task_output_path, ".part").rename( + utilities.with_suffix(task_output_path, ".part").replace( task_output_path ) parameters["tasks"][task_name] = task["parameters"] diff --git a/charidotella/tasks/wiggle.py b/charidotella/tasks/wiggle.py index d66b9bd..aa4d52b 100644 --- a/charidotella/tasks/wiggle.py +++ b/charidotella/tasks/wiggle.py @@ -76,7 +76,7 @@ def run( shutil.copyfile(path, sorted_frames / f"{output_index:>06d}.ppm") output_index += 1 for path in reversed(selected_paths[1:-1]): - path.rename(sorted_frames / f"{output_index:>06d}.ppm") + path.replace(sorted_frames / f"{output_index:>06d}.ppm") output_index += 1 subprocess.run( [ diff --git a/charidotella/version.py b/charidotella/version.py index 824978d..91bf823 100644 --- a/charidotella/version.py +++ b/charidotella/version.py @@ -1 +1 @@ -__version__ = "0.9" +__version__ = "0.10" diff --git a/command_line_tools b/command_line_tools index 1fb3fa4..30c06b4 160000 --- a/command_line_tools +++ b/command_line_tools @@ -1 +1 @@ -Subproject commit 1fb3fa4d7553f3857ab3a31073b28e32a0f27721 +Subproject commit 30c06b4da1854500788dffd680efa5e702a220cb diff --git a/setup.py b/setup.py index b4848d4..8ed6aa2 100644 --- a/setup.py +++ b/setup.py @@ -115,7 +115,7 @@ "event_stream", "jsonschema", "matplotlib", - "pillow>=9.4", + "pillow>=9.1", "scipy", "toml", ],