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

Fixing forecast 2025 #97

Merged
merged 8 commits into from
Jan 7, 2025
Merged

Conversation

ElemarJR
Copy link
Contributor

@ElemarJR ElemarJR commented Jan 7, 2025

No description provided.

- Commented out unused revenue tracking calculations in `yearly_forecast.py` to streamline the forecasting process.
- Replaced `compute_revenue_tracking` with `compute_forecast` for improved accuracy in revenue predictions.
- Updated the handling of global variables in `globals.py` to ensure they are initialized only if not already defined, enhancing code robustness.
- Removed unnecessary updates to global variables in `app.py` to simplify application startup.

These changes enhance the clarity and efficiency of the revenue forecasting functionality.
…or handling

- Added a check to ensure the DataFrame is not empty before applying date filters in the TimesheetDataset class, preventing potential errors.
- Implemented a retry mechanism for handling rate limit errors (HTTP 429) in the Pipedrive API client, allowing for up to three retries with a delay, improving robustness against temporary API restrictions.
- Updated caching behavior for the fetch_people method to include a remember parameter, enhancing data retrieval efficiency.

These changes improve data handling and API interaction reliability.
…parisons

- Enhanced the `_compute_revenue_tracking_base` function to ensure active cases are accurately determined based on contract dates, improving the reliability of revenue calculations.
- Updated the `compute_pre_contracted_revenue_tracking` function to handle date comparisons more robustly, accommodating various date formats for project creation and due dates.
- These changes enhance the accuracy of revenue tracking and ensure that only relevant cases are considered in calculations.
…ulations

- Updated the `compute_pre_contracted_revenue_tracking` function to improve date comparisons for project creation and due dates, ensuring accurate fee calculations.
- Removed redundant checks for empty project DataFrames and streamlined logic to handle cases where no timesheet entries exist.
- These changes enhance the reliability of revenue tracking by ensuring only relevant projects are considered based on their dates.
…g modules

- Updated the `compute_forecast` function to improve date handling by ensuring `due_on` is correctly assigned based on the presence of a date attribute.
- Enhanced the `_compute_revenue_tracking_base` function to streamline contract date checks for active cases, improving the accuracy of revenue calculations.
- Simplified the case handling logic in `CasesRepository` by removing redundant checks for project kinds when determining due dates for archived projects.

These changes enhance the reliability and clarity of date management across the forecasting and revenue tracking functionalities.
…ulations

- Updated the `resolve_yearly_forecast` function to ensure accurate goal calculations by handling cases where the month is equal to the current month, setting the goal to zero when necessary.
- Enhanced the `compute_pre_contracted_revenue_tracking` function to prevent errors by ensuring the project DataFrame is only processed if it contains entries, improving robustness in revenue tracking.

These changes enhance the accuracy and reliability of forecasting and revenue calculations.
…eamline calculations

- Updated the `_compute_revenue_tracking_base`, `compute_regular_revenue_tracking`, and `compute_pre_contracted_revenue_tracking` functions to ensure DataFrames are only processed when they contain entries, preventing potential errors.
- Simplified conditional checks for empty DataFrames, enhancing the robustness of revenue calculations.
- These changes improve the reliability and accuracy of revenue tracking by ensuring only relevant data is considered in calculations.
- Updated the `resolve_yearly_forecast` function to correctly handle actual revenue tracking for the current month, ensuring accurate goal calculations.
- Introduced a new variable `month_actual` to store realized revenue, enhancing the clarity of the calculations.
- Adjusted the logic for discount calculations to reflect the actual revenue, improving the reliability of the forecasting process.

These changes enhance the accuracy and reliability of yearly forecasting and revenue tracking.
@ElemarJR ElemarJR merged commit 61dfd9d into eximiaco-labs:main Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant