Pptx generation
Created by: john525
Hello,
This is a PR for PPTX generation endpoint. To test on dev server: http://dev.bloclink.blocpower.io/buildings/2001/pna/generatepna
To test locally:
make sure you have latest bpengine changes (I had to change the return type of a function in bpeng which can be pulled from master)
docker-compose rm -fs bloclink && docker-compose up -d
docker-compose exec bloclink mkdir /app_lib
docker cp ~/blocpower/libraries/bpengine/ development_bloclink_1:/app_lib/bpengine
Then run a bash inside bloclink container:
cp /app_lib/dev-templates/ashp.pptx /app/bloclink/apps/pna/
pip install -e file:///app_lib/bpengine
The reason you have to cp it is because the BPEng library loads that .pptx template using relative path (which was path of least resistance for BPEng dev, but which makes the workflow annoying for Bloclink dev). Ideally we can just put the file in an S3 bucket or something and then change the dockerfile so it gets downloaded to the container filesystem and change the BPEng code to use an absolute path
Then docker-compose restart bloclink
Now go visit http://0.0.0.0:5410/buildings/666/pna/generatepna/
You should get a PPTX downloaded. Check if the formatting looks correct, look at the graphs and make sure that "heating fuel type" says "no information provided" on page 4. Also obviously check if any textboxes are empty or data missing
If all that looks good, then check out the actual View code and change some of the hardcoded values to make sure everything still works. Then approve, or comment with the error you got