Release Notes
0.3.8
Enhancements:
- The manifest schema now restricts
custom.gear-builder.categorytoanalysis,converter,utility,classifierandqa, soManifest.validate()catches an invalid category before upload (GEAR-24428).
Fixes:
- Restore keyless
.metadata.jsonwrites for non-analysis destinations, always allow writes to the destination analysis itself, and fail fast with a clearValueErroron a missing destination instead of a misleading auth error. Non-SDK analysis gears writing to a parent container skip the hierarchy check and defer to the engine (GEAR-15390). get_fileand the metadata helpers no longer crash withAttributeErrorwhen a filename containsinfoorobject(for exampledicom_info.zip). This also fixes gears whose output zip had such a name crashing at exit (GEAR-34714).Manifest.to_jsonnow writesmanifest.jsonwith a trailing newline, preventing spurious "Auto-fix" commits from end-of-file linters in gear repositories that consumeflyw gear build(GEAR-12159).
Maintenance:
- Deprecated the api-key
read-onlymanifest property, ignored since Core 22.0. Manifests containing it stay valid and the property is now marked deprecated in the manifest schema; it has no effect. Use scoped gear rule permissions instead (GEAR-23784). - Removed the
<5upper bound onfw-metaso that Python 3.12+ environments can resolvefw-meta5.x.
Documentation:
- Rewrote the API keys section of the Gear Spec to accurately describe the job credential's scope: manually launched jobs run with the launching user's permissions, while gear-rule jobs run with the gear rule's assigned role (read-only by default). The previous prose implied all keys were governed by gear rule permissions (GEAR-23784).
- Rewrote the "Output metadata" section of the Gear Spec to replace dead
scitran/coreGitHub links, document the current schema enforced by the Flywheel API engine upload endpoint, list the supported fields for each destination container (project, subject, session, acquisition, analysis), detail the file metadata fields, clarify that.metadata.jsoncan also patch metadata on existing files (including inputs) in addition to output files, and add up-to-date examples. - Corrected
GearContextexamples:destination["type"]instead ofdestination.type,get_destination_container()instead ofget_destination(),modify_container_info(id, **info), and the note onclean_on_error(cleanup on error is opt in) (GEAR-34714). - Fixed broken
manifest.schema.jsonlinks and nested-list indentation in the Gear Spec. - Gear Spec: documented how
.metadata.jsonupdates containers (add only, existing values kept) and files (fields overwritten), which containers a gear can update, that input files are a queue-time snapshot and how to avoid losing changes, and when to use.metadata.jsonor the SDK (GEAR-25734). - Documented which containers
.metadata.jsoncan update in theGearContextguide, and the release flow inCONTRIBUTING.md(GEAR-34715).
0.3.7
Bug Fix:
- Fixed issue where
GearContextwould raise a missing key error when running with locally generated gear configs with no destination container.
0.3.6
Maintainence:
- Yanked
0.3.5
Maintenance:
- Moved
mikedocumentation versioning tool from runtime to dev dependencies since it's only needed for documentation builds, not at runtime
0.3.4
Maintenance:
- Added comprehensive contributor documentation:
- Created
CONTRIBUTING.mdwith development setup, testing, documentation contribution guidelines, and mike versioning instructions - Created
getting_started.mdtutorial with practical GearContext examples - Enhanced
README.mdwith features overview, quick start examples, and key concepts from getting_started guide - Added API Reference links throughout
context.mdandutils.mdfor all classes, methods, and functions to enable easy navigation to detailed API documentation - Fixed GitLab repository links in
index.mdfor LICENSE and CONTRIBUTING.md files - Added
__init__.pyfiles toutils.archive,utils.licenses, andutils.wrappermodules to enable proper API documentation generation via mkdocstrings - Enabled one-click code copying in documentation by adding
content.code.copyfeature to mkdocs configuration - Reformulated
context.mddocumentation for clarity and consistency: - Rewrote introduction to align with actual
GearContextimplementation - Streamlined Structure section with clearer component descriptions
- Improved Basic Usage section with explicit purpose statements
- Added descriptive titles to all code snippets for better usability
- Expanded
utils.mddocumentation to cover previously undocumented utilities: - Added comprehensive documentation for Context Utilities (SDK retry handlers, resource monitoring decorators)
- Added Archive/ZIP Management utilities documentation
- Added FreeSurfer License Utilities documentation
- Added Nipype Integration documentation with workflow examples
- Reformulated SDK Helpers and Command Execution sections for consistency
- Grouped wrapper submodule documentation (Command Execution and Nipype Integration) under unified Command Wrapper section
- Expanded API Reference to include all modules and submodules:
- Added File, Logging, and Invocation Schema to core modules
- Added all utils submodules (SDK Helpers, Context Utilities, Archive/ZIP, FreeSurfer License, Command Wrapper, Nipype, HPC)
- Fixed broken internal documentation link in
context.md - Fixed Type argument rendering issue in
update_file_metadatadocstring - Reorganized documentation navigation structure:
- Renamed "Specification" to "Gear Specification"
- Renamed "API" to "API Reference"
- Renamed "Migration Guide" to "Migration from flywheel-gear-toolkit"
- Moved "Overall Parity" under migration guide section
- Moved "API Reference" to bottom of navigation
0.3.2
Enhancement:
- Updated manifest schema to require and validate config property types, ensuring all config properties specify a type from the allowed set: string, integer, number, boolean, or array.
fw_gear.utils.wrapper.command.exec_command: added live streaming controls (stream+stream_mode) and optionallogfiletee; improved env merging and safer shell handling.
Breaking Changes:
- Removed
stdout_msgparameter fromfw_gear.utils.wrapper.command.exec_command. This parameter previously allowed logging a custom message instead of command output and disabled streaming when provided.
Maintainence:
- Addressed potential OS command injection vulnerability when running external commands.
Bug Fix:
- Fixed issue where
GearContextwould raise aFileNotFoundErrorwhen initialized without a manifest.json file. - Allow container type to be
Analysiswhen updating metadata. - Prevented pipe deadlocks in live streaming by merging
stderrintostdoutduring streaming forfw_gear.utils.wrapper.command.exec_command
0.3.1
Enhancement:
- Updated
psutilas optional dependency, allowing users to skip installation unless needed. - Update gear manifest schema to include Flywheel gear classification.
0.3.0
Enhancement:
- Rollback on
update_file_metadatato allow updating file metadata with file name and container_type inputs - Added warning when
fw_pathandlocal_pathis not available. - Added missing methods from flywheel-gear-toolkit -
get_input_file_objectandget_input_file_object_value - Improved error handling in
get_client()— now raisesGearContextErrorif the SDK is unavailable or the API key is invalid. - Introduced
is_fw_context()to explicitly check for Flywheel Gear runtime. - Added
setup_gear_run()to streamline gear setup and config handling.
MAINTENANCE:
-
Major refactor: core modules migrated from
flywheel_gear_toolkittofw_gear. -
GearToolkitContextrenamed and replaced byGearContext; config handling is now managed via a newConfigclass. -
Refactored utility methods and decorators under
fw_gear/utilsstructure. -
Metadataclass now validates container types more strictly and adds metadata size warnings (>16MB). -
New
add_qc_result_to_analysis()method to attach QC results to analysis containers.
DEPRECATIONS:
-
Removed
download_project_bids()anddownload_session_bids(). -
Removed
tempdirsupport fromGearContext. -
Deprecated
datatypes,curator,reporters, andwalker— now moved tofw-curation.