Skip to content

Conversation

@oerc0122
Copy link
Collaborator

@oerc0122 oerc0122 commented Nov 26, 2025

Description of work

  • Replace SubclassFactory with a classic RegisterFactory to avoid metaclass magic, allow effective ABCs and explicit inclusion (i.e. not including Converter as an IJob and thus making a non-instantiable object a key) and naming (including multiple names for the same thing).
  • Add UCDict class for case-insensitive dictionary keys.
  • Add Dummy IJob child to account for ABC working properly.

PR is broken down since it is a large number of files touched (though small changes):

  • First commit implements the factory and UCDict
  • Middle commits affect each historic SubclassFactory
  • Last commit makes changes necessary for code to function

NB. Converters are registered in both IJob and Converter as was historical.

Fixes
Part of the motivation for this is to support a factory-like mechanism for GUI Widgets from Descriptor types.

To test
Standard tests should run.

@oerc0122 oerc0122 self-assigned this Nov 26, 2025
@oerc0122 oerc0122 added enhancement New feature or request Technical Debt Legacy code which should be cleaned up. labels Nov 26, 2025
@oerc0122 oerc0122 force-pushed the full-register-factory branch from 48272be to 4786078 Compare November 26, 2025 21:00
@MBartkowiakSTFC
Copy link
Collaborator

The changes did not affect anything major, as far as I can tell. However, the way the class names have been converted to uppercase characters has been interfering with combo boxes.

Screenshot 2025-11-28 at 13 40 50

So far, I have found the following problems:

  1. The instrument definitions used to set the q vector generator type to "SphericalLatticeQVectors". As this has been replaced with "SPHERICALLATTICEQVECTORS", the combo box remains set to "CIRCULARLATTICEQVECTORS" when an instrument profile has been selected.
  2. When a new plot is created, the plotter type used for the plot is "Single", but the combo box shows "GRID". Also, it is possible to switch the plotter type to "TEXT" or "VECTORS", which should normally be disabled.

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

Labels

enhancement New feature or request Technical Debt Legacy code which should be cleaned up.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants