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

Adding order.get_filled_price() and enabling pytest coverage #267

Merged
merged 3 commits into from
Aug 3, 2023

Conversation

davidlatte
Copy link
Collaborator

Main purpose is to add a new function to lumibot.entities.order and provide the testing. As per our agreement, I also added some additional tests to TradingFee to incrementally improve coverage in some other area of the repository.


Side note on coverage

To run coverage:

- Install requirements file:
  pip install -r requirements_dev.txt
- 3 step command to generate a full coverage report
  coverage run
  coverage report
  coverage html
- open the generated ".coverage.html_report/index.html" file in your browser

You will get a coverage report in the terminal that looks like:
image

And the same data in a nice HTML version:
image


Back to My code changes

image
image

+ New code is all Green -- Fully Covered!

Incremental Coverage Improvement

Sorted by the coverage column!
image
We now have a fully covered module!! 🎉 🥳

@davidlatte davidlatte linked an issue Aug 3, 2023 that may be closed by this pull request
@davidlatte davidlatte requested a review from grzesir August 3, 2023 22:11
Copy link
Contributor

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

The Korbit AI Mentor has reviewed your code. To discuss an issue, reply using the tag @korbit-ai-mentor.

lumibot/entities/order.py Outdated Show resolved Hide resolved
tests/test_order.py Outdated Show resolved Hide resolved
lumibot/entities/trading_fee.py Outdated Show resolved Hide resolved
lumibot/entities/trading_fee.py Outdated Show resolved Hide resolved
@grzesir grzesir merged commit 2ea4335 into dev Aug 3, 2023
@davidlatte davidlatte deleted the 266-order-object-needs-get_filled_price-function branch August 16, 2023 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Order object needs get_filled_price() function.
2 participants