Skip to content

Dev bilayers#17

Open
TorecLuik wants to merge 15 commits into
mainfrom
dev-bilayers
Open

Dev bilayers#17
TorecLuik wants to merge 15 commits into
mainfrom
dev-bilayers

Conversation

@TorecLuik
Copy link
Copy Markdown
Contributor

This pull request introduces several improvements and fixes across both the backend (Python/OMERO) and frontend (React) parts of the project. The main focus is on more robust workflow parameter handling, improved GitHub descriptor parsing and caching, enhanced model card UX (including container image detection), and dependency updates for better reproducibility and compatibility.

Backend improvements:

Workflow parameter handling and metadata fetching:

  • Replaces usage of pull_descriptor_from_github with the more general generic_descriptor_from_github throughout the backend, ensuring consistent descriptor parsing for all workflow types. [1] [2] [3]
  • Refactors prepare_workflow_parameters to coerce numeric parameters to the correct Python types based on the descriptor's declared type, improving robustness for numeric input handling. The logic now directly checks the declared type and converts accordingly, handling string representations of numbers (e.g., "1.0" to 1). [1] [2]

Dependency management:

  • Updates the biomero dependency to use a specific GitHub branch (dev-bilayers) for both the Docker install and setup.py, ensuring consistent and up-to-date code across environments. [1] [2]

Frontend improvements:

GitHub descriptor parsing and caching:

  • Adds a robust, in-memory caching system for descriptor parsing in apiService.js, reducing redundant network requests and supporting both JSON and YAML descriptor formats. This enables extraction of both the workflow name and container image reference from a variety of descriptor layouts.
  • Exposes a new fetchContainerImage function to retrieve the container image reference for a given GitHub repo URL, with fallback logic for different descriptor formats.

Model card UX enhancements:

  • Updates the ModelCard component to automatically fetch and display the container image (with Docker icon) for versioned GitHub URLs, both on mount and when the repo field loses focus. Provides user feedback and guidance for unversioned or invalid URLs. [1] [2] [3] [4] [5]
  • Improves version status logic and user feedback for outdated, unknown, or unversioned models in both ModelCard and ConfigSection components, making it clearer when action is needed. [1] [2] [3] [4]

File tree and thumbnail loading:

  • Optimizes image fetching in the file tree by flushing each page of results into state immediately, allowing thumbnails to load incrementally as data arrives, improving perceived performance. [1] [2]
  • Removes unnecessary loading state toggling in loadThumbnails, preventing UI flicker. [1] [2]

Other updates:

  • Updates the asset manifest for the latest frontend build.

Key backend changes:

  • Workflow metadata and parameter handling:

    • Switched to generic_descriptor_from_github for fetching workflow descriptors, enabling broader format support and consistent metadata access. [1] [2] [3]
    • Improved numeric parameter coercion in prepare_workflow_parameters, ensuring correct types are used for workflow execution. [1] [2]
  • Dependency management:

    • Updated biomero dependency to a specific GitHub branch in both Docker and setup.py for reproducibility. [1] [2]

Key frontend changes:

  • Descriptor parsing and caching:

    • Implemented a cache-backed, multi-format descriptor parser in apiService.js, supporting both name and container image extraction.
    • Added fetchContainerImage utility for use in model components.
  • Model card and config UI:

    • Enhanced ModelCard to display container image info and provide clearer guidance for unversioned or invalid GitHub URLs. [1] [2] [3] [4] [5]
    • Improved version status logic and feedback in ConfigSection. [1] [2]
  • File tree performance:

    • Optimized image fetching and thumbnail loading for better user experience. [1] [2] [3] [4]
  • Miscellaneous:

    • Updated asset manifest for new frontend build.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants