agusalex / ghostfolio-sync

Sync Ghostfolio with IBKR
34 stars 9 forks source link

Make IBKRCATEGORY an environment variable for self-hosting #22

Closed Trefex closed 4 months ago

Trefex commented 4 months ago

Summary by Sourcery

This pull request introduces the ability to configure the IBKRCATEGORY via an environment variable (GHOST_IBKR_PLATFORM) for self-hosting setups. It also updates the README with instructions on how to retrieve and set this platform ID.

sourcery-ai[bot] commented 4 months ago

Reviewer's Guide by Sourcery

This pull request refactors the code to make the IBKR platform ID configurable via an environment variable, which is particularly useful for self-hosting scenarios. The changes include updates to the README.md to provide setup instructions, modifications to the SyncIBKR class to accept and use the new environment variable, and adjustments in main.py to pass the environment variable to the SyncIBKR class.

File-Level Changes

Files Changes
SyncIBKR.py
main.py
Refactored the code to use an environment variable for the IBKR platform ID instead of a hardcoded value, enhancing configurability for self-hosting.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.