Skip to content

Commit

Permalink
Remove --to keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
finsberg committed Jan 22, 2025
1 parent 73279fb commit 3a053e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
9 changes: 1 addition & 8 deletions src/gotranx/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,6 @@ def ode2julia(
readable=True,
resolve_path=True,
),
to: str = typer.Option(
".jl",
"--to",
help="Generate code to another programming language",
),
outname: typing.Optional[str] = typer.Option(
None,
"-o",
Expand Down Expand Up @@ -491,13 +486,11 @@ def ode2julia(
stiff_states = config_data.get("stiff_states", stiff_states)
scheme = config_data.get("scheme", scheme)
scheme = utils.validate_scheme(scheme)
c_config = config_data.get("c", {})
to = c_config.get("to", to)
# c_config = config_data.get("c", {})
# format = CFormat(c_config.get("format", format))

gotran2julia.main(
fname=fname,
suffix=to,
outname=outname,
scheme=scheme,
remove_unused=remove_unused,
Expand Down
3 changes: 1 addition & 2 deletions src/gotranx/cli/gotran2julia.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def get_code(

def main(
fname: Path,
suffix: str = ".jl",
outname: str | None = None,
scheme: list[Scheme] | None = None,
remove_unused: bool = False,
Expand All @@ -112,6 +111,6 @@ def main(
stiff_states=stiff_states,
)
out = fname if outname is None else Path(outname)
out_name = out.with_suffix(suffix=suffix)
out_name = out.with_suffix(suffix=".jl")
out_name.write_text(code)
logger.info(f"Wrote {out_name}")

0 comments on commit 3a053e3

Please sign in to comment.