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

♻️ Splits models_library.services #5921

Merged
merged 27 commits into from
Jun 18, 2024

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Jun 6, 2024

What do these changes do?

  • ♻️ Splits models_library.services into more manageable sub-modules. This is the rationale
    • the module/submodules follow a structure similar to e.g. aiohttp
      • models_library.services acts as the main module API
      • models_library.services_* act as submodules. Can be either imported directly and/or some functionality is exposed to the main module API
    • highlights differences between different service metadata (SMD) models and how they are composed. We have SMD models for:
      1. image (static)
      2. database (user-defined, editable)
      3. webserver API schema ( GET/PATCH )
      4. catalog API schema ( GET/PATCH )
  • 🔨 new make doc-uml on any package to produce UML diagrams. Based in pyreverse which comes with pylint.

Related issue/s

How to test

  • Using doc-uml to trace code inhertance/composition relations between models
    • cd packages/models-library (or any other package/service)
    • make -n doc-uml
    • (export DOC_UML_PATH_SUFFIX="services*"; export DOC_UML_CLASS=models_library.api_schemas_catalog.services.ServiceGet; make doc-uml)
    • will produce a UML diagram

Dev-ops checklist

None

@pcrespov pcrespov self-assigned this Jun 6, 2024
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 93.02326% with 18 lines in your changes missing coverage. Please review.

Project coverage is 88.2%. Comparing base (cafbf96) to head (aa360be).
Report is 276 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5921      +/-   ##
=========================================
+ Coverage    84.5%   88.2%    +3.6%     
=========================================
  Files          10    1165    +1155     
  Lines         214   50810   +50596     
  Branches       25     573     +548     
=========================================
+ Hits          181   44827   +44646     
- Misses         23    5860    +5837     
- Partials       10     123     +113     
Flag Coverage Δ
integrationtests 63.1% <93.7%> (?)
unittests 86.1% <93.0%> (+1.5%) ⬆️

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

Files Coverage Δ
...src/dask_task_models_library/container_tasks/io.py 100.0% <100.0%> (ø)
...src/models_library/api_schemas_catalog/services.py 100.0% <100.0%> (ø)
...s/models-library/src/models_library/basic_regex.py 100.0% <100.0%> (ø)
...rc/models_library/function_services_catalog/api.py 100.0% <100.0%> (ø)
...y/function_services_catalog/services/demo_units.py 100.0% <100.0%> (ø)
.../function_services_catalog/services/file_picker.py 100.0% <100.0%> (ø)
...y/function_services_catalog/services/iter_range.py 82.3% <100.0%> (ø)
...tion_services_catalog/services/iter_sensitivity.py 51.7% <100.0%> (ø)
.../function_services_catalog/services/nodes_group.py 100.0% <100.0%> (ø)
...y/function_services_catalog/services/parameters.py 100.0% <100.0%> (ø)
... and 32 more

... and 1124 files with indirect coverage changes

@pcrespov pcrespov force-pushed the is1404/services-webserver-api branch from 218e2b5 to ad032a6 Compare June 6, 2024 14:45
@pcrespov pcrespov added the a:services-library issues on packages/service-libs label Jun 6, 2024
@pcrespov pcrespov changed the title WIP: Is1404/services webserver api ♻️ Split models_library.services Jun 6, 2024
@pcrespov pcrespov added this to the South Island Iced Tea milestone Jun 6, 2024
@pcrespov pcrespov force-pushed the is1404/services-webserver-api branch from b8d5813 to 128befa Compare June 6, 2024 17:07
Copy link

sonarqubecloud bot commented Jun 6, 2024

Quality Gate Passed Quality Gate passed

Issues
11 New issues
0 Accepted issues

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

See analysis details on SonarCloud

@pcrespov pcrespov force-pushed the is1404/services-webserver-api branch from 128befa to 40cf3ca Compare June 17, 2024 16:56
@pcrespov pcrespov marked this pull request as ready for review June 17, 2024 17:10
@pcrespov pcrespov requested a review from mguidon June 17, 2024 17:11
@pcrespov pcrespov changed the title ♻️ Split models_library.services ♻️ Splits models_library.services Jun 17, 2024
@pcrespov pcrespov enabled auto-merge (squash) June 17, 2024 18:58
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.

all good, you have a service_runtime.py that is empty

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.

👍

packages/models-library/src/models_library/services_io.py Outdated Show resolved Hide resolved
packages/models-library/src/models_library/services_io.py Outdated Show resolved Hide resolved
Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for the effort!

@pcrespov pcrespov merged commit 0bab157 into ITISFoundation:master Jun 18, 2024
56 checks passed
@pcrespov pcrespov deleted the is1404/services-webserver-api branch June 18, 2024 13:20
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jul 5, 2024
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:services-library issues on packages/service-libs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split models_library.services
4 participants