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

Allow direct orderbook export from degiro paexport to portfolio load command #2091

Merged
merged 14 commits into from
Jul 20, 2022

Conversation

montezdesousa
Copy link
Contributor

@montezdesousa montezdesousa commented Jul 15, 2022

Description

This PR will allow users to export their orderbook from degiro #2065 directly into portfolio/holdings default paexport_degiro.csv file. Then the user can immediately load his orderbook through portfolio load command choices prompt.

To allow loading from path with load portfolio\holdings\[not_default_file_name].csv.r I removed choices=self.DATA_HOLDINGS_FILES, on the parser argument --file. This fixes part of #2101 by allowing users to load files from arbitrary paths as well.

        parser.add_argument(
            "-f",
            "--file",
            type=str,
            choices=self.DATA_HOLDINGS_FILES,
            dest="file",
            required="-h" not in other_args,
            help="The file to be loaded",
        )
  • Summary of the change / bug fix.
  • Link # issue, if applicable.
  • Relevant motivation and context.

How has this been tested?

Fetch degiro transactions to csv through degiro paexport command
portfolio/bro/degiro/login
paexport -s 2018-01-01

Load previous file through portfolio load command
portfolio/load 20220719_224755_paexport_degiro.csv

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My code passes all the checks pylint, flake8, black, ... To speed up development you should run pre-commit install.
  • New and existing unit tests pass locally with my changes. You can test this locally using pytest tests/....

@montezdesousa montezdesousa added the do not merge Label to prevent pull request merge label Jul 19, 2022
@montezdesousa montezdesousa removed the do not merge Label to prevent pull request merge label Jul 19, 2022
@montezdesousa montezdesousa linked an issue Jul 19, 2022 that may be closed by this pull request
@montezdesousa montezdesousa marked this pull request as ready for review July 19, 2022 21:50
Copy link
Contributor

@Chavithra Chavithra left a comment

Choose a reason for hiding this comment

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

Working great on my side !

@montezdesousa montezdesousa merged commit d474bcc into main Jul 20, 2022
@montezdesousa montezdesousa deleted the portfolio_export branch July 20, 2022 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] (Portfolio) Loading external Portfolio files fail
2 participants