Commit graph

10 commits

Author SHA1 Message Date
b80cba1d1f
fix: standardize log messages in update functions
Some checks failed
Docker / build (push) Has been cancelled
Updated the log messages within the `update_p2pool` function to use consistent, English-language messages. This improves readability and consistency across logging outputs. No functional behavior was altered.
2024-11-13 16:20:51 +01:00
831867dfb1
fix: handle exceptions in xmr data logging
Some checks are pending
Docker / build (push) Waiting to run
Added a try-except block when printing XMR-related data to handle potential exceptions such as missing social data or uninitialized variables. This prevents the application from crashing due to `Social.DoesNotExist` or `UnboundLocalError`, enhancing robustness and ensuring smoother operation.
2024-11-13 16:18:33 +01:00
250061876c
fix(error-handling): catch UnboundLocalError on update
Some checks are pending
Docker / build (push) Waiting to run
Ensure robustness in `update_database` by catching and handling `UnboundLocalError` to avoid potential crashes during data processing. This change mitigates risks where an uninitialized variable might lead to exceptions, thus enhancing application stability. Also includes minor whitespace corrections for improved code readability.
2024-11-13 16:17:46 +01:00
e7864eeaa1
fix: correct date calculation logic in update_database
Some checks are pending
Docker / build (push) Waiting to run
Ensure proper date subtraction by converting `date_zero` to a date object before calculating the `amount`. This prevents potential errors in date operations and ensures accurate date range handling.
2024-11-13 16:10:27 +01:00
06794c3cea
refactor: replace Google Sheets with ODS processing
Some checks are pending
Docker / build (push) Waiting to run
Replaced the use of Google Sheets (pygsheets and related
dependencies) with local .ods file processing using Pandas.
This simplifies the data handling by removing external
dependencies and streamlining updates directly within .ods files.

Fixes issues related to reliance on Google API and enhances
performance by processing data locally.
2024-11-13 12:55:17 +01:00
a9f1a887e9
fix(config): use BASE_DIR for file paths
Some checks are pending
Docker / build (push) Waiting to run
Updated file paths to use `BASE_DIR` from Django settings instead of hardcoded paths. This change enhances flexibility and simplifies configuration management as file paths are now dynamically resolved relative to the project base directory.
2024-11-13 12:06:31 +01:00
302c590f1c
refactor(sync): switch to local excel file for updates
Some checks are pending
Docker / build (push) Waiting to run
Replaced pygsheets-based Google Sheets handling with pandas to read and write to local Excel files. Updated exception handling to include `TypeError`. This change enhances performance and reliability by avoiding network dependencies and directly interacting with local files.

Fixes issues with unauthorized access and inefficient data handling.
2024-11-13 12:05:11 +01:00
1fbcf79441
fix(charts): add TODO for Reddit API placeholder
Some checks are pending
Docker / build (push) Waiting to run
Introduced a TODO comment indicating the need to fix the current use of the Reddit API in `synchronous.py`. The placeholder set due to the unavailability of `PushshiftAPI` ensures the application avoids runtime errors. This change communicates the need for further attention to this part of the codebase.
2024-11-12 14:40:05 +01:00
8e48bce180
refactor: apply consistent string styling and error handling
Some checks are pending
Docker / build (push) Waiting to run
Applied consistent use of double quotes for strings across the codebase to improve readability and maintain consistency. Updated exception handling to explicitly catch specific exceptions for better error management. Refactored context and view functions for cleaner and more structured output. Removed unused imports and unnecessary comments to streamline the code.
2024-11-12 14:09:33 +01:00
w
bec3f6095b organize files to use with Docker 2024-11-11 23:58:39 +01:00
Renamed from charts/synchronous.py (Browse further)