Fix DataPoint & Ratio Calculations; Improve Output & Test Coverage #849
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 PR addresses incorrect calculations in the getDataPoint and getRatio functions, improves output formatting in client3.py, adds proper .gitignore rules, and updates tests for more reliable verification.
Fix: Corrected logic in getDataPoint to ensure accurate tuple returns for stock data.
Fix: Resolved division handling in getRatio to avoid incorrect or undefined results.
Improvement: Updated client3.py with better print statements and fixed missing newline issues for cleaner console output.
Maintenance: Added .gitignore to exclude untracked/temporary files from version control.
Testing: Adjusted unit tests to align with updated function logic, ensuring better accuracy and stability.
Ran all updated tests — all pass successfully.
Manually verified output from client3.py matches expected format and values.
These fixes ensure more accurate calculations, cleaner outputs, and a more maintainable codebase. Recommended for merge to maintain correctness across modules.