Commit graph

21 commits

Author SHA1 Message Date
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
003fa03811
feat(init-data): add p2pool and daily data updates
Some checks are pending
Docker / build (push) Waiting to run
Enhanced the data initialization process to include p2pool and daily data updates, improving the comprehensiveness of data management. With this change, more data components are maintained accurately, addressing potential omissions in daily operations. This helps ensure up-to-date information is available for analysis.
2024-11-13 14:45:53 +01:00
8c779ba5e5
feat(management): add command to initialize chart data
Some checks are pending
Docker / build (push) Waiting to run
Introduced a new management command to initialize the database with current data for specified cryptocurrencies (`xmr`, `btc`, `dash`, `zec`, `grin`). This process involves deleting existing data entries and fetching updated historical and market data. This enhancement ensures the application starts with the most recent information, improving data accuracy and reliability.
2024-11-13 14:26:15 +01:00
cf9779b827
Merge remote-tracking branch 'github/main' 2024-11-13 14:26:01 +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
f95782b093
refactor: switch from Google Sheets to ODS file output
Some checks are pending
Docker / build (push) Waiting to run
Replaced the integration with Google Sheets for data storage with using locally managed ODS files. This change simplifies data handling by leveraging Pandas to read and write the ODS format, reducing dependencies such as pygsheets. This transition enhances maintainability and autonomy of the data management processes.
2024-11-13 12:16:21 +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
fa5c3aaa7b
refactor: switch to pandas for data extraction
Some checks are pending
Docker / build (push) Waiting to run
Replaced pygsheets with pandas and removed dependency on Google Sheets for data extraction, leveraging local spreadsheet files instead. This improves reliability and simplifies setup by avoiding external API dependencies. Updated code to handle data conversion and string checks ensuring data consistency. Adjusted settings to accommodate new input file.
2024-11-13 10:08:39 +01:00
w
dee00a514a serve static files in production 2024-11-13 00:06:16 +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
ef2875d81f
fix(settings): prevent redundant DB move during setup
Some checks are pending
Docker / build (push) Waiting to run
Ensures database move only occurs if the target does not exist, preventing unnecessary overwrites and potential data loss.
2024-11-12 14:25:33 +01:00
9d99063846
refactor(settings): use shutil.move for file relocation
Some checks are pending
Docker / build (push) Waiting to run
Replaced `Path.rename` with `shutil.move` to handle the database file relocation. This change accommodates cross-filesystem moves, improving robustness in environments where the source and destination may reside on different filesystems. No changes to database access or usage logic have been made.
2024-11-12 14:13:52 +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
7cc291d758
fix: address formatting and configuration inconsistencies
Some checks are pending
Docker / build (push) Waiting to run
- Add '.vscode/' to '.gitignore' to exclude editor settings.
- Improve readability by converting single quotes to double quotes and reformatting long lines in Django settings and URLs.
- Relocate the SQLite database path to a more standard location.
- Enhance environment flexibility by adding dynamic handling for allowed hosts.
- Remove deprecated database dependency in requirements.

These updates enhance code clarity and maintainability, and prepare the codebase for potential migration to a more dynamic server configuration setup.
2024-11-12 13:45:40 +01:00
7012c1a2b1
feat(admin): expand model registrations
Some checks are pending
Docker / build (push) Waiting to run
Added several additional models to the Django admin interface, enhancing manageability and oversight for admins. This allows for streamlined administration of Dominance, P2Pool, Rank, Sfmodel, Social, and Withdrawal models. This update supports improved efficiency in monitoring and editing these entities.
2024-11-12 10:33:47 +01:00
7ada7f9d26
refactor(auth): use is_superuser check for admin actions
Some checks are pending
Docker / build (push) Waiting to run
Replaced specific username checks for "Administrator" with `is_superuser`
attribute to determine admin access. This improves security and flexibility
by leveraging Django's built-in permissions and roles system, facilitating
maintenance and potential role adjustments without code changes.
2024-11-12 08:32:48 +01:00
d87ed7bccc
feat(admin): register Coin model in admin site
Some checks are pending
Docker / build (push) Waiting to run
Add the Coin model to the Django admin interface for easier management of coin data through the admin panel. This provides administrators with a graphical interface to directly view, edit, and maintain instances of the Coin model within the application.
2024-11-12 08:15:19 +01:00
w
e35c85dac4 fix spacing and typos 2024-11-12 01:19:52 +01:00
w
bec3f6095b organize files to use with Docker 2024-11-11 23:58:39 +01:00