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

[cli] Enable job test command to use the --config-file option #180

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

fallonchen
Copy link
Contributor

@fallonchen fallonchen commented Mar 18, 2021

klio job test currently takes in the --config-file option but does nothing with it, since the requires_config_file flag is set to False.

The config file option was also ignored in klio-exec, but that was fixed via PR 177.

This PR sets enables the use of the --config-file option by doing 2 things:

  1. Setting TestPipeline().requires_config_file to True.
  2. This PR also adjusts the way TestPipeline handles command generation so that the --config-file option is appended after the test command, but before pytest arguments are added.

Before this change, the generated command would be:

klio job test -- py_arg1 pyarg2 ... pyargN --config-file config.yaml

This causes the --config-file option to be ignored.

After this change, the generated command would be:

klio job test --config-file config.yaml -- py_arg1 pyarg 2 .. pyargN

Checklist for PR author(s)

  • Format the pull request title like [cli] Fixes bugs in 'klio job fake-cmd'.
  • Changes are covered by unit tests (no major decrease in code coverage %) and/or integration tests.
  • Document any relevant additions/changes in the appropriate spot in docs/src.
  • For any change that affects users, update the package's changelog in docs/src/reference/<package>/changelog.rst.

@fallonchen fallonchen changed the title [cli] Enable job test command to read materialized config file [cli] Enable job test command to use the --config-file option Mar 18, 2021
Copy link
Contributor

@DanSimon DanSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@fallonchen fallonchen merged commit 5824e19 into develop Mar 18, 2021
@fallonchen fallonchen deleted the fallon/klio-job-test-config-file branch March 18, 2021 16:59
@fallonchen fallonchen added this to the 21.3.0 milestone Mar 18, 2021
@econchick econchick mentioned this pull request Mar 23, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants