Skip to content

✨ Node previews for project homepage #4379

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

Merged
merged 41 commits into from
Jun 20, 2023

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Jun 16, 2023

What do these changes do?

Creates an API to get node's preview files (i.e. pairs thumnails+file url). Current implementation produces fake screenshots (see how to test)

  • ✨ extends webserver API 0.21.0 → 0.22.0. See openapi.json specs
    • GET projects/{project_id}/nodes/{node_id}/preview to get a node's preview
    • GET projects/{project_id}/nodes/-/preview to get a list of all results above . i.e. for all node_ids in the project
    • NOTE: with WEBSERVER_DEV_FEATURES_ENABLED=1 it will return fake homepage info
  • ♻️ error handling and used helper function for envelope_response

Related issue/s

How to test

Manual tests:

  • Start stack with WEBSERVER_DEV_FEATURES_ENABLED=1
  • Create a project w/ nodes
    • Have at least one dynamic service
    • Drop e.g. this glb file and name the file-picker such that it includes the word fake in the label. Them it will be presented as a fake screenshot file_url
  • In swagger, just GET projects/*/nodes/*/preview and GET projects/*/nodes/-/preview

DevOps

None

@pcrespov pcrespov self-assigned this Jun 16, 2023
@pcrespov pcrespov added the a:webserver issue related to the webserver service label Jun 16, 2023
@pcrespov pcrespov added this to the Watermelon milestone Jun 16, 2023
@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #4379 (bd957e4) into master (1fdda53) will decrease coverage by 0.8%.
The diff coverage is 79.2%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #4379      +/-   ##
=========================================
- Coverage    85.2%   84.5%    -0.8%     
=========================================
  Files         929     429     -500     
  Lines       39194   22273   -16921     
  Branches     1006     173     -833     
=========================================
- Hits        33427   18822   -14605     
+ Misses       5536    3402    -2134     
+ Partials      231      49     -182     
Flag Coverage Δ
integrationtests 66.3% <42.8%> (-11.7%) ⬇️
unittests 86.7% <78.5%> (+3.4%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rage/src/simcore_service_storage/handlers_files.py 99.1% <ø> (ø)
...erver/src/simcore_service_webserver/storage/api.py 44.3% <37.5%> (+8.5%) ⬆️
...core_service_webserver/projects/_nodes_previews.py 69.0% <69.0%> (ø)
...vice_webserver/projects/_handlers_project_nodes.py 89.1% <92.5%> (+5.5%) ⬆️
...server/src/simcore_service_webserver/_constants.py 100.0% <100.0%> (ø)

... and 597 files with indirect coverage changes

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 nice, please consider my comments.

@pcrespov pcrespov changed the title WIP: Is4370/project node homepage Node previews for project homepage Jun 19, 2023
@pcrespov pcrespov changed the title Node previews for project homepage ✨ Node previews for project homepage Jun 19, 2023
@pcrespov pcrespov requested review from GitHK and odeimaiz June 19, 2023 09:15
@pcrespov pcrespov force-pushed the is4370/project-node-homepage branch from 79e7178 to 105acf0 Compare June 19, 2023 09:20
@odeimaiz
Copy link
Member

odeimaiz commented Jun 19, 2023

GET projects/*/preview

For the project wide call, instead of providing a flat list, could you please provide one flat list per node?

Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

👍 merci

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

All fine, just check out my comment

@pcrespov pcrespov force-pushed the is4370/project-node-homepage branch from 9366014 to 448070f Compare June 20, 2023 08:12
@pcrespov pcrespov enabled auto-merge (squash) June 20, 2023 08:12
@codeclimate
Copy link

codeclimate bot commented Jun 20, 2023

Code Climate has analyzed commit bd957e4 and detected 0 issues on this pull request.

View more on Code Climate.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@GitHK
Copy link
Contributor

GitHK commented Jun 20, 2023

@pcrespov pcrespov merged commit 0424ad5 into ITISFoundation:master Jun 20, 2023
@pcrespov pcrespov deleted the is4370/project-node-homepage branch June 20, 2023 12:38
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 22, 2023
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: get screenshots per node for project
5 participants