Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-42291: Provide a default argument for schema renumbering to modify-tap command #32

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/felis/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def load_tap(


@cli.command("modify-tap")
@click.option("--start-schema-at", type=int, help="Rewrite index for tap:schema_index")
@click.option("--start-schema-at", type=int, help="Rewrite index for tap:schema_index", default=0)
@click.argument("files", nargs=-1, type=click.File())
def modify_tap(start_schema_at: int, files: Iterable[io.TextIOBase]) -> None:
"""Modify TAP information in Felis schema FILES.
Expand Down
4 changes: 0 additions & 4 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ def test_modify_tap(self) -> None:
"""Test for modify-tap command."""
runner = CliRunner()

# Without --start-schema-at it makes an exception
with self.assertRaises(TypeError):
result = runner.invoke(cli, ["modify-tap", TEST_YAML], catch_exceptions=False)

result = runner.invoke(cli, ["modify-tap", "--start-schema-at=1", TEST_YAML], catch_exceptions=False)
self.assertEqual(result.exit_code, 0)

Expand Down