Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented Feb 13, 2025

What do these changes do?

To streamline the review process for upcoming PRs, this update includes refactoring within the webserver's projects domain. Key details:

  • ♻️ Removed request dependency from _crud_api_read functions
    • The _crud_api_read function previously mixed service layer logic with REST utilities. Since the service layer should not depend on request, all dependencies on web.Request have been removed. Instead, a utility function now handles these dependencies within the REST controller.
  • ♻️ New projects_permalink_service
    • uses new naming convention for service layer
    • exposes functionality exclusively of the project permalinks outside the project's domain
    • a reduced version of projects.api that reduces coupling with other submodules
  • 🔨 Updated deprecated ruff.lint.args in .vscode/settings.json

Related issue/s

How to test

cd services/web/server
make install-dev
pytest -vv tests/unit/with_dbs/**/test_*project*.py

Dev-ops

None

@pcrespov pcrespov self-assigned this Feb 13, 2025
@pcrespov pcrespov added a:webserver webserver's codebase. Assigning the area is particularly useful for bugs t:maintenance Some planned maintenance work labels Feb 13, 2025
@pcrespov pcrespov added this to the Singularity milestone Feb 13, 2025
@pcrespov pcrespov changed the title Is468/mai project domain ♻️ Refactor webserver projects: drops request dependency on service layer functions Feb 13, 2025
@codecov
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 96.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 83.54%. Comparing base (5ac65f7) to head (8b9db79).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7228      +/-   ##
==========================================
- Coverage   87.02%   83.54%   -3.49%     
==========================================
  Files        1664      646    -1018     
  Lines       64666    31205   -33461     
  Branches     1096      168     -928     
==========================================
- Hits        56278    26069   -30209     
+ Misses       8075     5078    -2997     
+ Partials      313       58     -255     
Flag Coverage Δ
integrationtests 65.32% <50.00%> (-0.01%) ⬇️
unittests 85.77% <96.42%> (-0.25%) ⬇️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration ∅ <ø> (∅)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 77.31% <ø> (-8.16%) ⬇️
agent ∅ <ø> (∅)
api_server ∅ <ø> (∅)
autoscaling ∅ <ø> (∅)
catalog ∅ <ø> (∅)
clusters_keeper ∅ <ø> (∅)
dask_sidecar ∅ <ø> (∅)
datcore_adapter ∅ <ø> (∅)
director ∅ <ø> (∅)
director_v2 78.61% <ø> (-12.69%) ⬇️
dynamic_scheduler ∅ <ø> (∅)
dynamic_sidecar 89.77% <ø> (ø)
efs_guardian ∅ <ø> (∅)
invitations ∅ <ø> (∅)
osparc_gateway_server ∅ <ø> (∅)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage ∅ <ø> (∅)
webclient ∅ <ø> (∅)
webserver 84.83% <96.42%> (-0.03%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ac65f7...8b9db79. Read the comment docs.

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good! thanks

Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! At some point, can you please explain to me how the permalink works?

Copy link
Contributor

@giancarloromeo giancarloromeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@sonarqubecloud
Copy link

@pcrespov pcrespov merged commit 4ca666e into ITISFoundation:master Feb 14, 2025
92 of 95 checks passed
@pcrespov pcrespov deleted the is468/mai-project-domain branch February 14, 2025 13:43
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Mar 6, 2025
63 tasks
mrnicegyu11 pushed a commit to mrnicegyu11/osparc-simcore that referenced this pull request Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:webserver webserver's codebase. Assigning the area is particularly useful for bugs t:maintenance Some planned maintenance work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants