Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt Mia to populse_db V3 (#17) #18

Open
wants to merge 78 commits into
base: master
Choose a base branch
from
Open

Adapt Mia to populse_db V3 (#17) #18

wants to merge 78 commits into from

Conversation

servoz
Copy link
Contributor

@servoz servoz commented Feb 3, 2025

We are currently adapting Mia to the latest version of populse_db (V3). I am opening this pull request to merge the dv_v3 branch with the populse_mia master branch. As part of this adaptation, we are taking the opportunity to review and clean up the entire populse_mia codebase thoroughly. Naturally, this will take more time than simply adapting to populse_db V3. We will be regularly adding changes to the populse_mia dv_v3 branch.

The first major change involves the populse_mia.data_manager.database_mia module. This module provides the tools Mia needs to interact with populse_db V3. @sapetnioc , could you please review this new module and share your thoughts, especially regarding execution speed? Are there any suggestions to improve the performance of certain methods within this module?

We will make sure to merge the dv_v3 branch into the populse_mia master branch (this PR) at the same time as merging populsedb3 into the capsul master, 3.0 into the populse_db master, and db_v3 into the mia_processes master.

@servoz
Copy link
Contributor Author

servoz commented Feb 7, 2025

@sapetnioc , could you please review the populse_mia.data_manager.database_mia module and share your thoughts, especially regarding execution speed? Are there any suggestions to improve the performance of certain methods within this module?

I'd really appreciate your feedback on this module, ASAP, because depending on what you think, I may need to change the current modifications for the rest of populse_mia!

@sapetnioc
Copy link
Contributor

sapetnioc commented Feb 7, 2025 via email

@sapetnioc
Copy link
Contributor

I modified populse_db to make it possible to get a data context from a schema context (I used session instead of context in my previous message but the right name for object used in "with" statement is context). The optimization I propose is not a big change (except that all code using database has to be modified to add "with") for one who already knows how to deal with contexts. I may help if you think it is worth to to this optimization.

        - populse_mia/utils/__init__.py
	- populse_mia/utils/utils.py: in progress
@servoz
Copy link
Contributor Author

servoz commented Feb 7, 2025

Thank you for your reply @sapetnioc .
I haven't had time to look at it. I will do so ASAP, next Monday!

@servoz
Copy link
Contributor Author

servoz commented Feb 8, 2025

I understand the overall picture, but as the devil is in the detail, can we talk about this optimisation at the next meeting on Thursday?

@sapetnioc
Copy link
Contributor

No problem to talk about this. To try to make things clear, I implemented the API changes I have in mind in branch db_v3_optimize. I did this quickly without any test and without adapting the code to the API changes. I also probably messed up with comments since I moved methods.

I also added a primary_key() method to populse_db Storage API because it was missing for Mia.

@servoz
Copy link
Contributor Author

servoz commented Feb 11, 2025

Thank you very much @sapetnioc.
Indeed, the changes you've made to the db_v3_optimize branch make things much clearer.

I've currently only skimmed the change in the populse_mia.data_manager.database_mia module module, but I'll take the time to read through the changes carefully before the next meeting on Thursday.

	- populse_mia/software_properties.py: in progress
	- populse_mia/software_properties.py
	- cleaning the database_mia module
	- populse_mia/data_manager/project.py: in progress
	- populse_mia/data_manager/project.py: in progress
	- populse_mia/data_manager/project.py
	- populse_mia/data_manager/filter.py
	- populse_mia/data_manager/project_properties.py
	- populse_mia/data_manager/data_loader.py: in progress
	- populse_mia/data_manager/data_loader.py
servoz added 30 commits March 14, 2025 16:35
	- populse_mia/user_interface/pipeline_manager/type_editors.py
	- populse_mia/user_interface/pipeline_manager/process_mia.py: in progress
	- populse_mia/user_interface/pipeline_manager/process_mia.py: in progress
	- populse_mia/user_interface/pipeline_manager/process_mia.py: in progress
	- populse_mia/user_interface/pipeline_manager/process_mia.py:
	- populse_mia/user_interface/pipeline_manager/node_controller.py
	-
populse_mia/user_interface/pipeline_manager/process_library.py: in progress
	- populse_mia/user_interface/pipeline_manager/process_library.py: in progress
	- populse_mia/user_interface/pipeline_manager/process_library.py: in progress
	- populse_mia/user_interface/pipeline_manager/process_library.py: in progress
	- populse_mia/user_interface/pipeline_manager/process_library.py
	- populse_mia/user_interface/pipeline_manager/pipeline_editor.py
	- populse_mia/user_interface/data_viewer/__init__.py
	- populse_mia/user_interface/data_viewer/data_viewer.py
	- populse_mia/user_interface/data_viewer/data_viewer_tab.py
	- populse_mia/user_interface/data_viewer/anatomist/__init__.py
	- populse_mia/user_interface/data_viewer/anatomist/mia_anatomist.py
	- populse_mia/user_interface/data_viewer/anatomist_2/__init__.py
	- populse_mia/user_interface/data_viewer/anatomist_2/mia_anatomist.py
	- populse_mia/user_interface/data_viewer/anatomist_2/snd_window.py
	- populse_mia/user_interface/data_viewer/anatomist_2/anasimpleviewer2.py: in progress
	- populse_mia/user_interface/data_viewer/anatomist_2/anasimpleviewer2.py: in progress
	- populse_mia/user_interface/data_viewer/anatomist_2/anasimpleviewer2.py: in progress
	- populse_mia/user_interface/data_viewer/anatomist_2/anasimpleviewer2.py
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