generated from PrivateAIM/python-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Canary #9
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
…timeout for log streaming Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
…timeout for log streaming Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
…ialization Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
…g method Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
… updating error handling Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
…ting POAPI interaction Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Co-authored-by: antidodo <albin2993@gmail.com>
… errors Co-authored-by: Nightknight3000 <alexander.roehl@uni-tuebingen.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the
FlameCoreSDKclass to streamline logging, improve error handling, and integrate a new PO service connection. It removes thesilentparameter from many methods, consolidates logging through the newFlameLoggerclass, and adds robust startup checks. Additionally, it ensures all service APIs receive the logger for consistent output and error management.Logging and error handling improvements:
flame_loganddeclare_log_typesfunctions with the newFlameLoggerclass, updating all logging calls to use the instance logger and removing thesilentparameter throughout the codebase. Improved error reporting now usesraise_errorand logs exceptions withrepr(e)for clarity. ([[1]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aR13-L81),[[2]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL221-R271))MessageBrokerAPI,StorageAPI,DataAPI) to accept and use the new logger, ensuring consistent logging across services. ([flamesdk/flame_core.pyR13-L81](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aR13-L81))silentparameter from methods such assend_message,save_intermediate_data,submit_final_result, and others, simplifying the method signatures and internal logic. ([[1]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL156-R173),[[2]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL208-R224),[[3]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL276-L285),[[4]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL321-R329),[[5]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL331-R345),[[6]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL393-R396),[[7]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL405-R446),[[8]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL487-R476),[[9]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL505),[[10]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL523-L524),[[11]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL538-R523))Service connection and startup logic:
POAPI), including error handling and logger integration. Startup now explicitly checks that all services are connected before setting the SDK status as ready, otherwise logs a startup failure. ([flamesdk/flame_core.pyR13-L81](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aR13-L81))[flamesdk/flame_core.pyR13-L81](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aR13-L81))Data conversion and API integration:
fhir_to_csvmethod to use the logger and check for the presence of the data API before attempting conversion, logging a warning if unavailable and returningNone. ([[1]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL276-L285),[[2]](https://github.com/PrivateAIM/python-sdk/pull/9/files#diff-fac0746a70b997ed1b8e7d22e3ef66aa87bf4afab673175da0e7a6d8fa8bdc6aL296-R320))These changes improve maintainability, error visibility, and reliability of the SDK during initialization and runtime.