ITISFoundation / osparc-simcore

🐼 osparc-simcore simulation framework
https://osparc.io
MIT License
44 stars 26 forks source link

♻️ project & project node PATCH 🚨 #5802

Closed matusdrobuliak66 closed 2 months ago

matusdrobuliak66 commented 2 months ago

What do these changes do?

General comment for devs:

In the controller/service/repository architectural pattern, it's generally recommended to manage access control and permissions at the service layer, rather than at the database (repository) layer. Here’s why and how to implement it effectively:

Related issue/s

How to test

cd services/web/server
make install-dev
pytest tests/unit/with_dbs/02/test_projects_crud_handlers__patch.py
pytest tests/unit/with_dbs/02/test_projects_nodes_handlers__patch.py

Dev-ops checklist

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 93.33333% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 88.2%. Comparing base (cafbf96) to head (71e2e70). Report is 196 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802/graphs/tree.svg?width=650&height=150&src=pr&token=h1rOE8q7ic&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation)](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) ```diff @@ Coverage Diff @@ ## master #5802 +/- ## ========================================= + Coverage 84.5% 88.2% +3.6% ========================================= Files 10 1125 +1115 Lines 214 49995 +49781 Branches 25 565 +540 ========================================= + Hits 181 44116 +43935 - Misses 23 5757 +5734 - Partials 10 122 +112 ``` | [Flag](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) | Coverage Δ | | |---|---|---| | [integrationtests](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) | `65.1% <51.9%> (?)` | | | [unittests](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) | `85.9% <93.3%> (+1.3%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation) | Coverage Δ | | |---|---|---| | [...c/models\_library/api\_schemas\_webserver/projects.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&filepath=packages%2Fmodels-library%2Fsrc%2Fmodels_library%2Fapi_schemas_webserver%2Fprojects.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-cGFja2FnZXMvbW9kZWxzLWxpYnJhcnkvc3JjL21vZGVsc19saWJyYXJ5L2FwaV9zY2hlbWFzX3dlYnNlcnZlci9wcm9qZWN0cy5weQ==) | `100.0% <100.0%> (ø)` | | | [...ls\_library/api\_schemas\_webserver/projects\_nodes.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&filepath=packages%2Fmodels-library%2Fsrc%2Fmodels_library%2Fapi_schemas_webserver%2Fprojects_nodes.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-cGFja2FnZXMvbW9kZWxzLWxpYnJhcnkvc3JjL21vZGVsc19saWJyYXJ5L2FwaV9zY2hlbWFzX3dlYnNlcnZlci9wcm9qZWN0c19ub2Rlcy5weQ==) | `96.8% <100.0%> (ø)` | | | [.../projects/\_projects\_nodes\_pricing\_unit\_handlers.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&filepath=services%2Fweb%2Fserver%2Fsrc%2Fsimcore_service_webserver%2Fprojects%2F_projects_nodes_pricing_unit_handlers.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvd2ViL3NlcnZlci9zcmMvc2ltY29yZV9zZXJ2aWNlX3dlYnNlcnZlci9wcm9qZWN0cy9fcHJvamVjdHNfbm9kZXNfcHJpY2luZ191bml0X2hhbmRsZXJzLnB5) | `96.0% <100.0%> (ø)` | | | [...c/simcore\_service\_webserver/projects/exceptions.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&filepath=services%2Fweb%2Fserver%2Fsrc%2Fsimcore_service_webserver%2Fprojects%2Fexceptions.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvd2ViL3NlcnZlci9zcmMvc2ltY29yZV9zZXJ2aWNlX3dlYnNlcnZlci9wcm9qZWN0cy9leGNlcHRpb25zLnB5) | `92.5% <100.0%> (ø)` | | | [...r/src/simcore\_service\_webserver/projects/models.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&filepath=services%2Fweb%2Fserver%2Fsrc%2Fsimcore_service_webserver%2Fprojects%2Fmodels.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvd2ViL3NlcnZlci9zcmMvc2ltY29yZV9zZXJ2aWNlX3dlYnNlcnZlci9wcm9qZWN0cy9tb2RlbHMucHk=) | `100.0% <100.0%> (ø)` | | | [...r/src/simcore\_service\_webserver/projects/plugin.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&filepath=services%2Fweb%2Fserver%2Fsrc%2Fsimcore_service_webserver%2Fprojects%2Fplugin.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvd2ViL3NlcnZlci9zcmMvc2ltY29yZV9zZXJ2aWNlX3dlYnNlcnZlci9wcm9qZWN0cy9wbHVnaW4ucHk=) | `100.0% <100.0%> (ø)` | | | [...core\_service\_webserver/projects/\_nodes\_handlers.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&filepath=services%2Fweb%2Fserver%2Fsrc%2Fsimcore_service_webserver%2Fprojects%2F_nodes_handlers.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvd2ViL3NlcnZlci9zcmMvc2ltY29yZV9zZXJ2aWNlX3dlYnNlcnZlci9wcm9qZWN0cy9fbm9kZXNfaGFuZGxlcnMucHk=) | `91.3% <91.6%> (ø)` | | | [...mcore\_service\_webserver/projects/\_crud\_handlers.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&filepath=services%2Fweb%2Fserver%2Fsrc%2Fsimcore_service_webserver%2Fprojects%2F_crud_handlers.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvd2ViL3NlcnZlci9zcmMvc2ltY29yZV9zZXJ2aWNlX3dlYnNlcnZlci9wcm9qZWN0cy9fY3J1ZF9oYW5kbGVycy5weQ==) | `91.2% <90.0%> (ø)` | | | [...erver/src/simcore\_service\_webserver/projects/db.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&filepath=services%2Fweb%2Fserver%2Fsrc%2Fsimcore_service_webserver%2Fprojects%2Fdb.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvd2ViL3NlcnZlci9zcmMvc2ltY29yZV9zZXJ2aWNlX3dlYnNlcnZlci9wcm9qZWN0cy9kYi5weQ==) | `97.3% <87.5%> (ø)` | | | [...simcore\_service\_webserver/projects/projects\_api.py](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802?src=pr&el=tree&filepath=services%2Fweb%2Fserver%2Fsrc%2Fsimcore_service_webserver%2Fprojects%2Fprojects_api.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation#diff-c2VydmljZXMvd2ViL3NlcnZlci9zcmMvc2ltY29yZV9zZXJ2aWNlX3dlYnNlcnZlci9wcm9qZWN0cy9wcm9qZWN0c19hcGkucHk=) | `84.1% <86.6%> (ø)` | | ... and [1116 files with indirect coverage changes](https://app.codecov.io/gh/ITISFoundation/osparc-simcore/pull/5802/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ITISFoundation)
sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud