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

Added packages python-calamine and openpyxl #291

Merged
merged 10 commits into from
Sep 5, 2024

Conversation

Sujanadh
Copy link
Contributor

Updates

python-calamine and xlsxwriter are added as packages. These packages are required to be used as an engine with pandas for reading and writing xlsx files.

What I encountered?

Got this dependency error from psycopg2 , I don't think it is related with these packages, I guess we can ignore it?

pdm.exceptions.BuildError: Build backend raised error: Showing the last 10 lines of the build output:
It appears you are missing some prerequisite to build the package from source.

You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.

@Sujanadh Sujanadh requested a review from spwoodcock August 28, 2024 04:56
@Sujanadh Sujanadh self-assigned this Aug 28, 2024
@github-actions github-actions bot added enhancement New feature or request dependency Includes a dependency change labels Aug 28, 2024
@spwoodcock
Copy link
Member

Thanks Sujan!

You are right the psycopg error can ignored 👍
It's fixed by installing libpq

@Sujanadh
Copy link
Contributor Author

Sujanadh commented Sep 3, 2024

Updates:

  • added building_exists condition (yes/no) , aborting survey form if it is equal to 'no'
  • created a group to include every other survey questions in order to abort form based on building_exists value

@Sujanadh
Copy link
Contributor Author

Sujanadh commented Sep 3, 2024

@spwoodcock it is good to merge, but a test with these changes would be appreciated.

@spwoodcock
Copy link
Member

Will check and merge today!

@spwoodcock
Copy link
Member

I updated to remove xlsxwriter and replace with openpyxl as we don't need the precise editing capability of xlsxwriter - sorry for the initial confusion on this.

However I kept calamine as the xlsx/xls reader, as it's a fantastic library:

  • Extremely fast reading of large spreadsheets - not as useful for use, but still good.
  • More importantly, support for a wide array of data formats, including xls which openpyxl does not support!

@spwoodcock
Copy link
Member

I started writing a very basic test for this.

@Sujanadh could you possibly finish this off?
Perhaps it's best to test with a form other than the included buildings.xls as that already includes the mandatory fields!
(I just used it as an example)

@spwoodcock
Copy link
Member

I made a few small changes!

Also added some tests - let me know if this works / you agree with the edits & I will merge 👍

@Sujanadh
Copy link
Contributor Author

Sujanadh commented Sep 5, 2024

I tested it. it is good to go

@spwoodcock spwoodcock merged commit 17278e0 into main Sep 5, 2024
3 of 5 checks passed
@spwoodcock spwoodcock deleted the feat/calamine-xlsxwriter branch September 5, 2024 13:05
@spwoodcock spwoodcock changed the title Added packages python-calamine and xlsxwriter Added packages python-calamine and openpyxl Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Includes a dependency change enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants