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

Optionally Re-run the tests but not the workflow to help develop tests #176

Open
yfarjoun opened this issue Jun 16, 2023 · 5 comments
Open

Comments

@yfarjoun
Copy link

Slightly different from #174 (not a duplicate)

Once I have a workflow and code set up, I iterate on the tests that I want to add, adding md5sum contains elements to the yml file, but not actually changing the workflow or the code behind it.

It would be helpful if there was a way to just run the "lower part" of each workflow test.

In the envisioned implementation the user would

  • provide an "old" working directory (that was preserved using --kwd)
  • state that they do not want the workflows to be rerun ( --use_old_workflow_outputs)

This would cause pytest workflow to use the old working directory, not delete file in it, skip the first step of each test (running the workflow) and evaluate the rest of the tests as if that step succeeded.

@rhpvorderman
Copy link
Member

I think this can be collapsed in a single command line flag that provides the old TMP folder where all the workflows are run. This then also disables launching any workflows and simply the workflow directory provided is used to run all the tests again. I think this is doable to implement without too much code.

So now we just need a nice flag. I am thinking of --reuse-workflow-dir <WORKFLOW_DIR>. @yfarjoun, @DavyCats , @Redmar-van-den-Berg any suggestions or feedback?

@Redmar-van-den-Berg
Copy link
Collaborator

I think this would be a nice addition, especially for slow tests where you run your entire pipeline with some fake data, which can take a few minutes each time.

@wholtz
Copy link
Contributor

wholtz commented Sep 19, 2023

This is functionality that I would also find useful.

As for the name of the flag, --reuse-workflow-dir <WORKFLOW_DIR> could be interpreted as simply reusing the the directory as the place to execute the workflow. I will suggest --reevaluate-workflow-dir <WORKFLOW_DIR> as it is more descriptive of the action being performed.

@rhpvorderman
Copy link
Member

@wholtz Excellent suggestion. I agree. That is a nice descriptive flag.

@rhpvorderman rhpvorderman added technical debt Suggestions/pr's to make code more maintainable. Accepted feature and removed technical debt Suggestions/pr's to make code more maintainable. labels Dec 5, 2023
@stianlagstad
Copy link

I would very much like a flag like --reevaluate-workflow-dir <WORKFLOW_DIR>, to allow quicker iterations of the tests (not the workflow). Any initial ideas on how to implement this, to get me started?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants