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

✨ web-api: exposes project's icon as an ui attribute #7204

Merged
merged 20 commits into from
Feb 11, 2025

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Feb 10, 2025

What do these changes do?

ReDoc

This PR introduces project icons. As outlined in #7158, the project icon is managed by the front end and is included in the ui field (credits to @giancarloromeo). This ensures transparency for the backend, which only validates and stores the data. It also simplifies implementation by avoiding the need for an additional database column, unlike services—though services could also potentially use a ui column.

Some details of the implementation

  • ✨ web-api allows front-end to
    • create or update an icon in a project via create_project or patch_project
      image
  • 📝 improves web-api openapi doc and fixes wrong status response for create_project
  • ♻️ refactor on projects.ui models
    • these models are part of the schema, not the domain models
    • added more realistic testing examples
    • added fakes
  • ♻️ minor cleanup of project model names
    • e.g. ProjectDB -> ProjectDBGet to stress that it is a model that reads from the db

Related issue/s

How to test

Driving test: ``

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

Dev-ops

@pcrespov pcrespov added a:webserver issue related to the webserver service a:models-library labels Feb 10, 2025
@pcrespov pcrespov self-assigned this Feb 10, 2025
@pcrespov pcrespov added this to the Singularity milestone Feb 10, 2025
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 91.93548% with 5 lines in your changes missing coverage. Please review.

Project coverage is 87.05%. Comparing base (d432c6c) to head (8709527).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7204      +/-   ##
==========================================
- Coverage   87.06%   87.05%   -0.01%     
==========================================
  Files        1646     1646              
  Lines       64297    64312      +15     
  Branches     1186     1186              
==========================================
+ Hits        55977    55990      +13     
- Misses       8008     8010       +2     
  Partials      312      312              
Flag Coverage Δ
integrationtests 65.30% <75.00%> (+1.95%) ⬆️
unittests 86.05% <91.93%> (+0.69%) ⬆️
Components Coverage Δ
api 76.84% <ø> (ø)
pkg_aws_library 94.02% <ø> (ø)
pkg_dask_task_models_library 97.09% <ø> (ø)
pkg_models_library 91.53% <92.00%> (-0.04%) ⬇️
pkg_notifications_library 84.57% <ø> (ø)
pkg_postgres_database 88.25% <ø> (ø)
pkg_service_integration 70.03% <ø> (ø)
pkg_service_library 72.94% <ø> (ø)
pkg_settings_library 90.71% <ø> (ø)
pkg_simcore_sdk 85.51% <ø> (ø)
agent 96.46% <ø> (ø)
api_server 90.55% <ø> (ø)
autoscaling 96.08% <ø> (ø)
catalog 91.71% <ø> (ø)
clusters_keeper 99.24% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.19% <ø> (ø)
director 76.59% <ø> (-0.10%) ⬇️
director_v2 91.30% <ø> (ø)
dynamic_scheduler 97.17% <ø> (ø)
dynamic_sidecar 89.78% <ø> (ø)
efs_guardian 90.25% <ø> (ø)
invitations 93.28% <ø> (ø)
osparc_gateway_server ∅ <ø> (∅)
payments 92.66% <ø> (ø)
resource_usage_tracker 88.95% <ø> (+0.05%) ⬆️
storage 86.22% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 84.79% <91.66%> (+<0.01%) ⬆️

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 d432c6c...8709527. Read the comment docs.

@pcrespov pcrespov force-pushed the is7158/projects-icon branch from f4ede14 to 64599ef Compare February 11, 2025 10:17
@pcrespov pcrespov changed the title WIP: ✨ Is7158/projects icon ✨ web-api: exposes project's icon as an ui attribute Feb 11, 2025
@pcrespov pcrespov marked this pull request as ready for review February 11, 2025 10:25
@pcrespov pcrespov enabled auto-merge (squash) February 11, 2025 11:16
@pcrespov pcrespov merged commit 89cee2f into ITISFoundation:master Feb 11, 2025
93 checks passed
@pcrespov pcrespov deleted the is7158/projects-icon branch February 11, 2025 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:models-library a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Projects and service have an icon field
5 participants