Urban-Analytics-Technology-Platform / web-app-template

https://urban-analytics-technology-platform.github.io/web-app-template/
4 stars 0 forks source link

Expand Python backend to a full package #26

Open penelopeysm opened 4 months ago

penelopeysm commented 4 months ago

Followup from #16.

Things to include:

If it's helpful, our previous work on DemoLand:

penelopeysm commented 4 months ago

27 generated a very simple Python package, see https://github.com/Urban-Analytics-Technology-Platform/web-app-template/tree/main/packages/create-web/template/python_backend

However the problem remains that the name of the wheel file is hardcoded in the TypeScript code. A simple thing like changing the name of the package or the version number will cause the code to break

https://github.com/Urban-Analytics-Technology-Platform/web-app-template/blob/48225ef5ccfc67002c37dbbb69f1244016a37dd6/packages/create-web/template/web/src/lib/python_worker.ts#L29-L33

It's not possible to query the filesystem from a frontend (you need a real backend server — not our fake WASM backends to do that) so we can't do the equivalent of ls *.whl and take the output of that.

My current best idea is: