Replies: 6 comments 11 replies
-
And all tests have also been split in their dedicated package with all of them passing! I also ran a DAQ_Scan and explored the data so no obvious bug so far... |
Beta Was this translation helpful? Give feedback.
-
I think it is a good idea to split a large project into several smaller ones, especially separating GUI-less logic (if it is useful without the GUI) from the GUI itself. yaq also is separated in different parts. In order to facilitate working with these separate repositories, you could create a "meta-repository", which contains all the other (main) repositories as submodules. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone! In general, I think it is a good idea. Even if I consider not so competent to grasp the full consequences of such a modification. If you think it is a good choice to improve the stability and readability of the code on the long run, go for it! I still have a few concerns:
As for the problem of dealing with multiple packages for developers, as mentioned by @BenediktBurger, I am not so worried. |
Beta Was this translation helpful? Give feedback.
-
Should i try to generate an exhaustive list of the displacement of classes and functions ? |
Beta Was this translation helpful? Give feedback.
-
that would actually help a lot and give a clearer view of the whole thing! |
Beta Was this translation helpful? Give feedback.
-
this discussion has been validated for the next release |
Beta Was this translation helpful? Give feedback.
-
Since I introduced data management in pymodaq 4.0.0 and completing its features, I was more and more thinking that it would be great to be able to use those data objects independently of pymodaq (especially because it can take a while to import pymodaq because of the plugins).
So I went into this, but while trying to extract things specific to data from other bits, I started to realize that both data, GUI and higher features all requires basic functionalities such as logging, configuration management, mathematical tools... So I needed to first extract the basic things that are used everywhere. That is making a lightweight package I called pymodaq_utils.
From there, it was easier to put the things exclusive to data management together. But one of the nice features of my new data management is the interplay between python Data objects and their hdf5 file couter-part. So obviously I included the necessary things for this in the data package that I called pymodaq_data. But then I bumped into another issue. The other nice thing about data management is the ability to plot data in high level data viewers which are GUI using Qt (see https://github.com/PyMoDAQ/notebooks/blob/main/notebooks/plotting_data.ipynb). BUT data management doesn't have to have this explicitly to work, and some people would maybe just prefer use matplotlib and nothing from Qt. Moreover browsing data is done using the H5Browser but it is not mandatory either... So I removed everything from Qt from the pymodaq_data package and moved them into a dedicated pymodaq_gui one. In there are defined the qt data viewers, h5 browser, navigator.... This package can be used to build custom GUI independent from pymodaq instruments and data acquisition.
Finally I simplified the initial pymodaq package to have only high level module in there such as the control modules, extensions and some bits specific to this.
So to summarize, there could be:
used by:
everything is then used by
I'd like to know what users would think of this as it makes advanced usage a bit more complex as the developer has to deal with 4 packages. It is fully transparent for the pymodaq user. It is much simpler for the user interested only in data management.
I tried also to make it transparent on the plugins side (by keeping some modules in pymodaq only dedicated to importing things from the other packages) but I expect some bugs still that would need at the end to work a bit again on the plugins to adapt them. By the way I found a solution to use only pyproject.toml in the plugins while keeping the use of the plugin_info.toml simpler file.
I created all this by:
pymodaq_utils: forked from pymodaq (to keep history) but renamed. I released version 0.0.1 (and 0.0.2) on pypi already
pymodaq_data : forked from pymodaq (to keep history) but renamed. I released version 0.0.1 (and 0.0.2) on pypi already
pymodaq_gui : forked from pymodaq (to keep history) but renamed. I released version 0.0.1 on pypi already
pymodaq: created the 5.0.x_dev branch using the subpackages. Published as 5.0.0 on pypi (but somehow hidden from pip otherwise explicitly required)
pymodaq_plugins_mock: created the 5.0.x_dev branch
So I'd like to here, you users and developers, your opinion about all this and eventually try it out. THere is a branch in the data plotting notebook : (see https://github.com/PyMoDAQ/notebooks/blob/main/notebooks/plotting_data.ipynb) dedicated to try this branch pmd_5.x.y
Beta Was this translation helpful? Give feedback.
All reactions