[Enhancement] Build workflow from dict, add lib versioning#129
Open
zephyrzilla wants to merge 1 commit intomainfrom
Open
[Enhancement] Build workflow from dict, add lib versioning#129zephyrzilla wants to merge 1 commit intomainfrom
zephyrzilla wants to merge 1 commit intomainfrom
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds the ability to build workflows from plain Python dictionaries (in addition to YAML files), and provides a library versioning pipeline across local dev, CI, and PyPI publishing.
Explain the features implemented:
Workflow.from_config()— build workflows from dictsWorkflow.from_config(config)accepts adictor a file path, returning a ready-to-runWorkflowinstanceConfigLoaderimprovements —load_and_create()now correctly initialises_is_existing_task,_node_counter, and returns a typedWorkflowSingle source of truth versioning
sygra/__init__.pyis now the sole version authority (__version__ = "2.0.0.post1")dynamic = ["version"]+[tool.hatch.version]inpyproject.toml2.0.0.post1to match the current PyPI release (the2.0.0namespace was burned)make version/make bump-versionmake version— prints the current version (stdlibpython3, nouv runoverhead)make bump-version V=X.Y.Z— patches bothsygra/__init__.pyand[tool.poetry].versionatomically, with PEP 440 validationPublish workflow updates (
publish.yml)push: tags: v*(CLI) andrelease: published(GitHub UI), with a concurrency group to prevent double-runsvprefix, validated against PEP 440.whland.tar.gzfilenames contain the correct version before uploadingCI version guards (
ci.yml)push: tags: v*in addition to branch pushes__version__format (supportsX.Y.Z,X.Y.Z.postN, etc.)__version__before proceedingPre-commit version hook
version-checkhook validates__version__is valid PEP 440 on every commit touchingsygra/__init__.pyPerformance impact (if any):
How to Test the feature
Test
Workflow.from_config():wf.name,wf._is_existing_task, andwf._node_counterare set correctlyTest versioning:
make version: should print2.0.0.post1make bump-version V=2.1.0: patches both files, prints next stepsmake bump-version V=bad: rejects with PEP 440 errormake bump-version V=2.0.0.post1Test CI/publish (dry run):
Validate version formatstep should passScreenshots (if applicable)
N/A — backend and CI/CD changes only.
Checklist