-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/719 add Nox session workflow:generate #720
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
Merged
ArBridgeman
merged 22 commits into
main
from
feature/719-add-workflows-update-nox-session
Feb 20, 2026
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
842478e
Add _select_workflows
ArBridgeman 41382f8
Add write_to_file
ArBridgeman 176b432
Add github_workflow_directory
ArBridgeman 22894fe
Switch to pytest fixture for config
ArBridgeman 3dd7570
Add and test update_selected_workflow
ArBridgeman 5d8ee8a
Harmonize to singular and template usage in backend
ArBridgeman c64b251
Fix missing import part
ArBridgeman 4aed04d
Add logging to WorkflowPatcher
ArBridgeman c0a5101
Add workflow:update Nox session
ArBridgeman 5578a95
Ignore type error
ArBridgeman e90bd81
Update deprecation warning with replacement
ArBridgeman 29ff123
Add changelog entry
ArBridgeman c46899d
Add final tests
ArBridgeman c80027b
Fix missing import part
ArBridgeman 420bac1
Apply reviewer changes with modifications to make consistent
ArBridgeman 8e856fe
Switch to generate as it is more specific
ArBridgeman 2705d66
Apply review comment for log
ArBridgeman 7f8db5d
Can change name as it no longer collides with nox session function
ArBridgeman 51d6ea0
Replace the last workflow:update to workflow:generate
ArBridgeman 976610b
Switch to a positional argument without a default
ArBridgeman d527c87
Adapt docstring per review
ArBridgeman b7675bb
Fix code smell
ArBridgeman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| from __future__ import annotations | ||
|
|
||
| import argparse | ||
|
|
||
| import nox | ||
| from nox import Session | ||
|
|
||
| from exasol.toolbox.util.workflows.workflow import ( | ||
| WORKFLOW_CHOICES, | ||
| update_workflow, | ||
| ) | ||
| from noxconfig import PROJECT_CONFIG | ||
|
|
||
|
|
||
| def _create_parser() -> argparse.ArgumentParser: | ||
| parser = argparse.ArgumentParser( | ||
| prog="nox -s workflow:generate", | ||
| usage="nox -s workflow:generate -- [-h] <workflow_choice>", | ||
| formatter_class=argparse.ArgumentDefaultsHelpFormatter, | ||
| ) | ||
|
|
||
| parser.add_argument( | ||
| "workflow_choice", | ||
| choices=WORKFLOW_CHOICES, | ||
| help="Select one workflow or 'all' to all workflows.", | ||
| ) | ||
| return parser | ||
|
|
||
|
|
||
| @nox.session(name="workflow:generate", python=False) | ||
| def generate_workflow(session: Session) -> None: | ||
| """ | ||
| Generate or update the specified GitHub workflow or all of them. | ||
| """ | ||
| parser = _create_parser() | ||
| args = parser.parse_args(session.posargs) | ||
|
|
||
| PROJECT_CONFIG.github_workflow_directory.mkdir(parents=True, exist_ok=True) | ||
|
|
||
| update_workflow(workflow_choice=args.workflow_choice, config=PROJECT_CONFIG) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.