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

Pyclient: added filename option to export method #4183

Merged
merged 21 commits into from
Sep 16, 2024
Merged

Conversation

YpeZ
Copy link
Contributor

@YpeZ YpeZ commented Sep 5, 2024

What are the main changes you did:

  • added option to the Pyclient's export method to specify the filename, including location, to which the data is exported
  • without specifying a filename, the export is not stored to a file anymore
  • the as_excel option is added to specify whether the export is to be generated from the EMX2 Excel API if no filename is given
  • the fmt parameter is removed
  • the method returns the exported data as a BytesIO object

how to test:

  • In the dev script, specify the filename in the export calls

todo:

  • add return value in method
  • updated docs in case of new feature
  • added/updated tests

@YpeZ YpeZ self-assigned this Sep 5, 2024
@YpeZ YpeZ marked this pull request as ready for review September 12, 2024 06:53
Copy link
Contributor

@dtroelofsprins dtroelofsprins left a comment

Choose a reason for hiding this comment

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

  • table with filename, zip, xlsx or csv
  • table without filename (or as_excel=True) => doesn't work!
  • whole schema without filename => DOES NOTHING, only when filename is included
  • whole schema with filename.xlsx

=> as_excel seems to do nothing is set to true

docs/molgenis/use_usingpyclient.md Outdated Show resolved Hide resolved
tools/pyclient/README.md Show resolved Hide resolved
Copy link
Contributor

@dtroelofsprins dtroelofsprins left a comment

Choose a reason for hiding this comment

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

After discussing it, it turned out that I've interpreted the as_excel not OK.
With the right perception, all things are running fine :-)

Documentation is now also more clear.

@YpeZ YpeZ merged commit 282b6e5 into master Sep 16, 2024
1 of 4 checks passed
@YpeZ YpeZ deleted the pyclient/export-filename branch September 16, 2024 08:23
Copy link

sonarcloud bot commented Sep 16, 2024

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.

Pyclient: add filename/path to export method and add possibility to return exported data in memory
2 participants