hotosm / osm-fieldwork

Processing field data from ODK to OpenStreetMap format, and other field data collection utils.
GNU Affero General Public License v3.0
16 stars 79 forks source link

Added packages python-calamine and openpyxl #291

Closed Sujanadh closed 2 months ago

Sujanadh commented 3 months ago

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.
spwoodcock commented 3 months ago

Thanks Sujan!

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

Sujanadh commented 2 months ago

Updates:

Sujanadh commented 2 months ago

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

spwoodcock commented 2 months ago

Will check and merge today!

spwoodcock commented 2 months ago

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:

spwoodcock commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

I tested it. it is good to go