Skip to content

Switch from abstract classes to protocols with generic types#4797

Draft
mogmi wants to merge 2 commits intomasterfrom
post_processing_protocols
Draft

Switch from abstract classes to protocols with generic types#4797
mogmi wants to merge 2 commits intomasterfrom
post_processing_protocols

Conversation

@mogmi
Copy link
Contributor

@mogmi mogmi commented Dec 22, 2025

Description

Added

Changed

Fixed

How to prepare for test

  • Ssh to relevant server (depending on type of change)
  • Use stage: us
  • Paxa the environment: paxa
  • Install on stage (example for Hasta):
    bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_cg -t cg -b [THIS-BRANCH-NAME] -a

How to test

  • Do ...

Expected test outcome

  • Check that ...
  • Take a screenshot and attach or copy/paste the output.

Review

  • Tests executed by
  • "Merge and deploy" approved by
    Thanks for filling in who performed the code review and the test!

This version is a

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Document in ...
  • Deploy this branch on ...
  • Inform to ...

@sonarqubecloud
Copy link

Comment on lines +13 to +17
RunDataT_contra = TypeVar("RunDataT_contra", bound=RunData, contravariant=True)
RunDataT_co = TypeVar("RunDataT_co", bound=RunData, covariant=True)

class RunDataGenerator(ABC):
RunMetricsT_co = TypeVar("RunMetricsT_co", bound=RunMetrics, covariant=True)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not clear to me, could we discuss it in coding guidelines if there is time?

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