Skip to content

Commit

Permalink
order
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Feb 26, 2025
1 parent b1a7e34 commit 26076e6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pixi_to_conda_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,6 @@ def _validate_pip_in_conda_packages(
raise ValueError(msg)


def _get_output_filename(output_dir: Path, env_name: str) -> Path:
"""Get the output filename for a given environment."""
return (
output_dir / "conda-lock.yml"
if env_name == "default"
else output_dir / f"{env_name}.conda-lock.yml"
)


def _parse_args() -> argparse.Namespace:
"""Parse command line arguments."""
parser = argparse.ArgumentParser(description="Convert pixi.lock to conda-lock.yml")
Expand Down Expand Up @@ -250,6 +241,15 @@ def _prepare_output_directory(output_path: Path | None) -> Path:
return output_dir


def _get_output_filename(output_dir: Path, env_name: str) -> Path:
"""Get the output filename for a given environment."""
return (
output_dir / "conda-lock.yml"
if env_name == "default"
else output_dir / f"{env_name}.conda-lock.yml"
)


def main() -> int:
"""Main function to convert pixi.lock to conda-lock.yml."""
args = _parse_args()
Expand Down

0 comments on commit 26076e6

Please sign in to comment.