You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2025. It is now read-only.
The utils.py file could be modified to contain functions that are not really related but may be useful in other files and to be safely imported without circular dependencies. For the moment, it depends on 4 other pymodaq_utils modules:
logger, but nothing is logged (so it could be removed)
warnings.deprecation_msg, this modules doesn't include anything from pymodaq_utils so it is safe to include
serialization module for ThreadCommand but they could be moved to their own file
config using as a default parameter in PlotColors (to move to their own file) and get_new_file_name that is never used (so it could be deleted)
Here is an example of how it is troublesome:
I'm modifying config.py to change the config folder name. I would like this folder name to be computed once, so I defined it as a global formatted string. To build it I need two functions, one to guess the environment name and one to compute a hash depending on the version number.
The hash function could be defined in config.py, but doing so prevents its import in anything config depends on and is not "semantically" correct, so I would like to define it in utils.py but it is not importable in config.
The environment guessing function already exists and is in environment.py, bug environment.py includes config, so I can't import the function.