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

Move caches to an injected singleton #107

Merged
merged 7 commits into from
Mar 26, 2024
Merged

Conversation

george-zubrienko
Copy link
Contributor

@george-zubrienko george-zubrienko commented Mar 22, 2024

Closes #103
Closes #104

Scope

Implemented:

  • Added InputCache to host data caches for readers and processors
  • Removed resolve_readers boilerplate. All inputs are now natively integrated into each other

Additional changes:

  • Added InputObject to specialise input processors a bit
  • Changed aliases to be snake_case to ensure input processors/readers are passed as Python-friendly kwargs

Checklist

  • GitHub issue exists for this change.
  • Pylint 10.0/10.0 without bloating .pylintrc with exceptions.

@george-zubrienko george-zubrienko requested a review from a team as a code owner March 22, 2024 20:19
Copy link

github-actions bot commented Mar 22, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
esd_services_api_client/beast/v3
   _connector.py1078025%58–74, 81, 93, 101–119, 139–174, 187–218, 226, 251–254, 261–264, 275–292, 302–308, 317–323
   _models.py1002080%46–50, 107–110, 119–127, 137–145, 153–156
esd_services_api_client/boxer
   _auth.py861780%42–43, 52–61, 70–76, 87
   _connector.py895044%54–58, 64–68, 74–76, 82–84, 92–99, 107–113, 121–128, 136–144, 179, 189–195, 209–218, 228–233
   _models.py27293%49–50
esd_services_api_client/crystal
   _connector.py1185256%54–66, 75, 147, 150, 169–196, 208, 217, 238, 243–254, 273–292, 320, 332–342
esd_services_api_client/nexus/abstractions
   input_object.py14140%20–60
   logger_factory.py16160%20–58
   nexus_object.py33330%20–95
   socket_provider.py15150%20–55
esd_services_api_client/nexus/algorithms
   __init__.py440%20–23
   _baseline_algorithm.py24240%21–82
   _remote_algorithm.py36360%21–112
   distributed.py14140%21–56
   forked_algorithm.py32320%20–124
   minimalistic.py12120%20–47
   recursive.py19190%21–63
esd_services_api_client/nexus/configurations
   algorithm_configuration.py880%4–34
esd_services_api_client/nexus/core
   app_dependencies.py87870%20–241
esd_services_api_client/nexus/exceptions
   __init__.py110%20
   _nexus_error.py220%21–27
   cache_errors.py13130%20–49
   input_reader_error.py15150%20–51
   startup_error.py22220%4–63
esd_services_api_client/nexus/input
   __init__.py220%21–22
   input_processor.py33330%20–97
   input_reader.py36360%20–105
   payload_reader.py33330%20–83
tests
   test_crystal_connector.py88199%51
TOTAL120769343% 

Tests Skipped Failures Errors Time
18 0 💤 0 ❌ 0 🔥 14.408s ⏱️

Copy link

github-actions bot commented Mar 22, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
esd_services_api_client/beast/v3
   _connector.py1078025%58–74, 81, 93, 101–119, 139–174, 187–218, 226, 251–254, 261–264, 275–292, 302–308, 317–323
   _models.py1002080%46–50, 107–110, 119–127, 137–145, 153–156
esd_services_api_client/boxer
   _auth.py861780%42–43, 52–61, 70–76, 87
   _connector.py895044%54–58, 64–68, 74–76, 82–84, 92–99, 107–113, 121–128, 136–144, 179, 189–195, 209–218, 228–233
   _models.py27293%49–50
esd_services_api_client/crystal
   _connector.py1195256%54–66, 75, 147, 150, 169–196, 208, 217, 238, 243–254, 273–292, 320, 332–342
esd_services_api_client/nexus/abstractions
   algrorithm_cache.py37370%20–98
   input_object.py14140%20–60
   logger_factory.py16160%20–58
   nexus_object.py33330%20–95
   socket_provider.py15150%20–55
esd_services_api_client/nexus/algorithms
   __init__.py440%20–23
   _baseline_algorithm.py24240%21–82
   _remote_algorithm.py36360%21–112
   distributed.py14140%21–56
   forked_algorithm.py32320%20–124
   minimalistic.py12120%20–47
   recursive.py19190%21–63
esd_services_api_client/nexus/configurations
   algorithm_configuration.py880%4–34
esd_services_api_client/nexus/core
   app_core.py1131130%20–279
   app_dependencies.py87870%20–241
esd_services_api_client/nexus/exceptions
   __init__.py110%20
   _nexus_error.py220%21–27
   cache_errors.py13130%20–49
   input_reader_error.py15150%20–51
   startup_error.py22220%4–63
esd_services_api_client/nexus/input
   __init__.py220%21–22
   input_processor.py33330%20–97
   input_reader.py36360%20–105
   payload_reader.py33330%20–83
tests
   test_crystal_connector.py88199%51
TOTAL135884338% 

Tests Skipped Failures Errors Time
18 0 💤 0 ❌ 0 🔥 14.126s ⏱️

@george-zubrienko george-zubrienko merged commit 4e328ec into main Mar 26, 2024
3 checks passed
@george-zubrienko george-zubrienko deleted the refactor-caches branch March 26, 2024 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants