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

degiro updates #48

Merged
merged 6 commits into from
Nov 11, 2023
Merged

degiro updates #48

merged 6 commits into from
Nov 11, 2023

Conversation

Joren-vanGoethem
Copy link
Contributor

added 'sell' detection
and make GetQuantity and GetUnitPrice currency agnostic and buy/sell agnostic

@VibeNL
Copy link
Owner

VibeNL commented Nov 7, 2023

Thanks for the contribution. I will have a closer look tomorrow, but could you at least add a testcase for the sell activity?

See https://github.com/VibeNL/GhostfolioSidekick/blob/master/GhostfolioSidekick.UnitTests/FileImporter/DeGiro/DeGiroParserTests.cs

@Joren-vanGoethem
Copy link
Contributor Author

will do, btw add some labels for PR's like feature/bug/enhancement/... ;)

@Joren-vanGoethem
Copy link
Contributor Author

Joren-vanGoethem commented Nov 7, 2023

i added a few unit tests, i think the 'example' naming you used for directories of csv files is quite useless to be honest
'example' doesn't tell you anything about the files in that directory
i added very small and simple unit tests that only test one simple thing like buy euro order, sell euro order, ...

@VibeNL VibeNL added the enhancement New feature or request label Nov 8, 2023
VibeNL
VibeNL previously approved these changes Nov 8, 2023
Copy link
Owner

@VibeNL VibeNL left a comment

Choose a reason for hiding this comment

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

Just a single unused parameter, nothing major :) . Looks good!

return decimal.Parse(quantity, GetCultureForParsingNumbers());
}

private decimal GetUnitPrice(DeGiroRecord record)
private decimal GetUnitPrice(DeGiroRecord record, bool buy = true)
Copy link
Owner

Choose a reason for hiding this comment

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

not sure why there is an unused parameter 👼

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yes because i had other plans on how to check for buy and sell but changed my mind :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you'll have to approve the new changes

@VibeNL
Copy link
Owner

VibeNL commented Nov 8, 2023

i added a few unit tests, i think the 'example' naming you used for directories of csv files is quite useless to be honest 'example' doesn't tell you anything about the files in that directory i added very small and simple unit tests that only test one simple thing like buy euro order, sell euro order, ...

IT is a work in progress, I like the suggestion 👍 . BTW, the build fails, likely on a culture problem

@VibeNL VibeNL merged commit e35f51b into VibeNL:master Nov 11, 2023
1 check failed
@VibeNL
Copy link
Owner

VibeNL commented Nov 11, 2023

I will merge it and fix it in master. Need this code for another change :)

VibeNL added a commit that referenced this pull request Nov 11, 2023
Thanks to #48 we got DeGiro sells
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants