Add roboflow_core/current_time@v1 Workflow block#2410
Merged
Conversation
The (Number) in range operator was already implemented in the evaluation engine and BinaryStatement union but was not included in the introspection export, making it invisible to the workflow builder UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds the NumberInRange BinaryOperator class and its evaluation lambda so the operator exposed in the workflow builder UI has a working backend. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
New formatter block that outputs the current date/time for a user-selected timezone. Inputs a curated IANA timezone (literal or selector, default UTC) and returns a timezone-aware timestamp plus iso_string, date, and time strings. Uses stdlib zoneinfo (backports.zoneinfo for py<3.9) and adds tzdata so the timezone database is available on slim/Windows runtimes. Curated dropdown options expose friendly UTC-offset labels via values_metadata. Registered in loader.py. Includes unit tests and a full execution-engine integration test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| fastapi>=0.133.0,<0.140 # 0.133+ dropped the starlette<1.0 cap; be careful with upper pin - fastapi might remove support for on_event | ||
| starlette>=1.0.1 # CVE-2026-48710 (BadHost) — Host-header path-injection fix | ||
| python-dotenv~=1.0.0 | ||
| backports.zoneinfo>=0.2.1; python_version < "3.9" |
Collaborator
There was a problem hiding this comment.
we do not support Py < 3.9
Collaborator
PawelPeczek-Roboflow
left a comment
There was a problem hiding this comment.
LGTM apart from dependency which is not needed
PawelPeczek-Roboflow
previously approved these changes
Jun 4, 2026
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
PawelPeczek-Roboflow
approved these changes
Jun 4, 2026
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 a new Workflow block
roboflow_core/current_time@v1(category: formatter) that outputs the current date and time for a user-selected timezone.timezone— a curated IANA timezone name (literalLiteral[...]or aSelector(STRING_KIND)), default"UTC". The curated set (~55 zones) covers the common UTC offsets and exposes friendly labels (e.g.UTC-5/-4 Eastern Time (EST/EDT)) viavalues_metadataso the app renders a clean dropdown.timestamp— timezone-awaredatetime(TIMESTAMP_KIND), composable by downstream blocksiso_string,date(%Y-%m-%d),time(%H:%M:%S) —STRING_KINDconveniencesValueErrorfor unsupported/unknown values.Implementation notes
zoneinfo, falling back tobackports.zoneinfoon Python < 3.9.tzdatato requirements so the IANA database is present on slim/Windows runtimes that lack system tz data.core_steps/loader.py(import +load_blocks()entry).Testing
tests/workflows/unit_tests/.../test_current_time.py): manifest parsing (valid/default/selector/invalid), curated-enum +values_metadataschema exposure, DST-vs-fixed-offset behavior, run() output shape/consistency, and error paths. 11 passed locally.tests/workflows/integration_tests/.../test_workflow_with_current_time.py): runs the block end-to-end throughExecutionEngineand asserts a timezone-aware result with consistent derived strings.Type
Bug fix / new feature: non-breaking, additive new block. No changes to existing blocks.