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

Fix wrongly formatted values on stocks/fa/cash #4211

Merged
merged 11 commits into from
Feb 10, 2023
Merged

Conversation

hjoaquim
Copy link
Contributor

@hjoaquim hjoaquim commented Feb 10, 2023

Description

  • Summary of the change / bug fix.
  1. Enhance the lambda_long_number_format by adding to more check to str types:
    a. starts with "0" -> if yes, most likely is some kind of ID
    b. is a valid date (Y-M-D)
  2. Convert str dates to actual datetime objects on fmp_model.clean_metrics_df

How has this been tested?

stocks/load aapl/fa/income
stocks/load aapl/fa/cash
stocks/load aapl/fa/balance

  • Please describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • Please also list any relevant details for your test configuration.
  • Make sure affected commands still run in terminal
  • Ensure the SDK still works
  • Check any related reports

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.

@hjoaquim hjoaquim added the bug Fix bug label Feb 10, 2023
@reviewpad reviewpad bot added the feat XS Extra small feature label Feb 10, 2023
@hjoaquim hjoaquim changed the title Fix wrongly formatted values on stocks/load aapl/fa/cash Fix wrongly formatted values on stocks/fa/cash Feb 10, 2023
@jmaslek
Copy link
Collaborator

jmaslek commented Feb 10, 2023

Does this also need to be applied to some of the other commands (i.e balance/income)

@hjoaquim
Copy link
Contributor Author

@jmaslek already being applied as the 3 of them use fmp_model.clean_metrics_df

@jmaslek
Copy link
Collaborator

jmaslek commented Feb 10, 2023

@jmaslek already being applied as the 3 of them use fmp_model.clean_metrics_df

nice. sorry was being proactive and havent looked yet

Copy link
Collaborator

@jmaslek jmaslek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my end!

@jmaslek jmaslek added this pull request to the merge queue Feb 10, 2023
Merged via the queue into develop with commit 84da1cf Feb 10, 2023
@hjoaquim
Copy link
Contributor Author

@jmaslek thanks for fixing the tests and reviewing!

@hjoaquim hjoaquim deleted the hotfix/fix-4203 branch February 10, 2023 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug feat XS Extra small feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Stocks/FA/Cash - Value for CIK number and Calendar Year is X.XXX M/K
2 participants