-
Notifications
You must be signed in to change notification settings - Fork 29
♻️ webserver: Refactor projects
Domain to Align with Standardized Module Structure
#7409
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
♻️ webserver: Refactor projects
Domain to Align with Standardized Module Structure
#7409
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7409 +/- ##
==========================================
+ Coverage 87.31% 88.03% +0.71%
==========================================
Files 1713 1697 -16
Lines 66601 65572 -1029
Branches 1131 1131
==========================================
- Hits 58152 57724 -428
+ Misses 8127 7526 -601
Partials 322 322
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
projects
Domain to Align with Standardized Module Structure
027a517
to
ee96fc3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making order in the webserver!
so if I get that right:
- handlers --> controllers
- _api --> service
- _db --> repository
I am personally not convinced at all by "controller" part. but well that is just a name. Also CRUD does not really contain special calls. Also I still find not good that the domain trash spills into the projects one. For me that is an additional function and projects should not be polluted by it.
services/web/server/src/simcore_service_webserver/director_v2/director_v2_service.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/_rest_utils.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/comments_rest.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the heroic effort!
This is really great! As I mention below I think it is unfortunate that we have different conventions about the prefix/suffix depending on which layer in our architecture code is. But ok, that's a detail.
services/web/server/src/simcore_service_webserver/projects/_controller/folders_rest.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/groups_rest.py
Outdated
Show resolved
Hide resolved
2550848
to
8fecbb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good, please check my one comment about the remove lined of code
services/web/server/src/simcore_service_webserver/projects/_groups_models.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/projects_service.py
Show resolved
Hide resolved
Based on the discussion with @GitHK , here some idea on how to start a new domain that is then transformed into a separate uservice |
8fecbb1
to
fa0002e
Compare
@Mergifyio queue |
🟠 Waiting for conditions to match
|
e9fb914
to
4e4e780
Compare
|
What do these changes do?
This is the first in a series of (very noisy) PRs aimed at refactoring the
projects
domain to align interfaces with the standardized module structure introduced in #7294. The goal is to bring consistency and improve maintainability by following a well-defined convention which follows this pattern:In this structure,
$(component)
refers to a logical section of the domain. Components can be internal (e.g.comments
) or integration stubs to other domains (e.g.trash
which has its own domain outside).One of the advantages of this layout is that it cleanly reveals the coupling between modules. After this PR, "bad couplings" already are surfarcing. Nonetheless, those will be resolve in coming PRs. Moreover several components will be further refactored in coming PRs for the following reasons:
→ Solution: introduce abstract interfaces and reduce cross-imports
The following modules are especially high in coupling and will be refactored in later PRs:
_crud_api_*.py
→ to be integrated into_projects_*_service.py
_nodes_utils.py
_projects_service*.py
,api.py
→ to be merged into_projects_*_service.py
nodes_utils.py
utils.py
This PR establishes the initial structural foundation and introduces a consistent module layout.
This is the first several PRs that refactors the
projects
domain. This step aligns with the standardized module structure introduced in #7294, which follows the following convention:A
$(component)
refer to a section of the domain's design. It can be internal (e.g. project'scomments
) or a stub used to interact with another domain (e.g. project'strash
).Some of these components will be further refactoring. These are the main reasons:
To keep changes minimal and reduce risk, the following high-coupling modules will be addressed in subsequent PRs:
_crud_api_*.py
→ to be merged into_projects_*_service.py
_nodes_utils.py
_projects_service*.py
,api.py
→ to be merged into_projects_*_service.py
nodes_utils.py
utils.py
This is the current view of the skeleton

Related issue/s
How to test
Dev-ops
None