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

✨ Is686/apiserver api 0.4.2: studies ports #3623

Merged
merged 19 commits into from
Dec 1, 2022

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Nov 30, 2022

What do these changes do?

Exposes ports of a study in the public-api.

New collection studies: roughly equivalent to a project.

  • exposes list_study_ports: GET studies/{study_id}/ports -> list[StudyPort]
  • pre-released in 0.4.2 as a dev-feature (only available with API_SERVER_DEV_FEATURES_ENABLED=1)
  • will be released in 0.5.0

image

Related issue/s

How to test

make devenv
source .venv/bin/activate
cd services/api-server
make install-dev
pytest -vv tests/**/test*studies*.py```

Checklist

  • make version-*
  • make openapi.json
  • cd packages/postgres-database, make setup-commit, sc-pg review -m "my changes"
  • Unit tests for the changes exist
  • Runs in the swarm
  • Documentation reflects the changes
  • New module? Add your github username to .github/CODEOWNERS

@pcrespov pcrespov self-assigned this Nov 30, 2022
@codecov
Copy link

codecov bot commented Nov 30, 2022

Codecov Report

Merging #3623 (41548f6) into master (c1d30ff) will increase coverage by 7.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #3623     +/-   ##
========================================
+ Coverage    78.5%   85.7%   +7.1%     
========================================
  Files         788     515    -273     
  Lines       32577   24686   -7891     
  Branches      782     411    -371     
========================================
- Hits        25598   21163   -4435     
+ Misses       6772    3400   -3372     
+ Partials      207     123     -84     
Flag Coverage Δ
integrationtests 62.3% <100.0%> (-5.1%) ⬇️
unittests 83.8% <100.0%> (+8.1%) ⬆️

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

Impacted Files Coverage Δ
...vice_webserver/projects/projects_ports_handlers.py 94.1% <100.0%> (ø)
...k/src/simcore_sdk/node_ports_v2/port_validation.py 47.9% <0.0%> (-48.0%) ⬇️
...tor_v2/modules/dynamic_sidecar/scheduler/events.py 49.7% <0.0%> (-46.3%) ⬇️
...ules/dynamic_sidecar/docker_service_specs/proxy.py 53.8% <0.0%> (-46.2%) ⬇️
...tor_v2/modules/dynamic_sidecar/scheduler/_utils.py 64.3% <0.0%> (-26.8%) ⬇️
...r_v2/modules/dynamic_sidecar/api_client/_public.py 70.0% <0.0%> (-22.7%) ⬇️
...s/dynamic_sidecar/docker_service_specs/settings.py 41.5% <0.0%> (-22.7%) ⬇️
...v2/modules/dynamic_sidecar/docker_compose_specs.py 71.7% <0.0%> (-22.3%) ⬇️
.../simcore-sdk/src/simcore_sdk/node_ports_v2/port.py 61.1% <0.0%> (-19.2%) ⬇️
...or_v2/modules/db/repositories/projects_networks.py 52.1% <0.0%> (-17.4%) ⬇️
... and 535 more

@pcrespov pcrespov added the a:apiserver api-server service label Nov 30, 2022
@pcrespov pcrespov changed the title WIP: ✨ Is686/api server ports api ✨ Is686/apiserver api 0.4.2: studies ports Nov 30, 2022
@pcrespov pcrespov changed the title ✨ Is686/apiserver api 0.4.2: studies ports ✨ Is686/apiserver api 0.4.2: studies ports Nov 30, 2022
@pcrespov pcrespov changed the title ✨ Is686/apiserver api 0.4.2: studies ports ✨ Is686/apiserver api 0.4.2: studies ports Nov 30, 2022
@pcrespov pcrespov added this to the Athena milestone Nov 30, 2022
@pcrespov pcrespov marked this pull request as ready for review November 30, 2022 15:48
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.

looking good but I am confused with the NodeID type of the study port.

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.

Ok, all clear. just the format name is confusing.

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.

👍 Nice, have some questions below.

@sonarcloud
Copy link

sonarcloud bot commented Dec 1, 2022

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

@pcrespov pcrespov enabled auto-merge (squash) December 1, 2022 07:28
@pcrespov pcrespov merged commit 51d6df3 into ITISFoundation:master Dec 1, 2022
@pcrespov pcrespov deleted the is686/apiserver-ports-api branch December 1, 2022 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:apiserver api-server service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants