Comments (8)
Note: Main data files (JSON) are already served from GCS storage, which scales extremely well. We can upload assets too, I guess?
from covid.
@jez4 I just realized that I did something in the past (it's not in master anymore): https://github.com/epidemics/covid/pull/122/files
^ you IMO want to take this and move it to the deploy branch only (so it's iterated only on deploy) and in addition of setting that public access and cache control actually uploading everything gzipped.
from covid.
I have managed to upload static files to the bucket gzipped. Now the templates.
from covid.
@hnykda I am checking the deploy action in pythonapp.yml. I should add the gsutil cp there? I will need some more description :)
from covid.
Yes, it should be there on a deploy step. The command is IMO equivalent to the `push_to_bucket
The hard part seems to be actually rendering templates with different static URL paths for static files (I asked about it here encode/starlette#884).
In the first case, I propose to use something like:
APP_DEBUG = True # local dev
STATIC_URL= "/static" if APP_DEBUG else "https://storage.googleapis.com/static-covid/static/"
...
def someview():
return Template("<template>.html", {STATIC_URL: STATIC_URL}) # using e.g. `{{STATIC_URL}}/js/lines.js`
from covid.
I should use {{ STATIC_URL }} for templates
from covid.
The templates are done. Now just to perfect the workflow. I will ask for review afterwards.
from covid.
Closed via #333
from covid.
Related Issues (20)
- Add Messaging Targeting Pharma Companies, IGOs, Govts for Paid Consulting, while being Oxford-aware HOT 3
- Change the text on the banner that lives at the top of the "models", "mitigation scenarios" and "mitigation" pages
- Improve uncertainty visualization on /calc page
- For small screen sizes (e.g. mobile phone portrait width), remove the sliders (or otherwise fix the UX) on the "Mitigation Calculator" Page
- Improve display of the "Country Rt Estimates" page
- Calculate latest data for countermeasures plot
- Upload .csv with R estimates to the webpage
- Revert coloring in mitigation calculator
- Improve the short-term models
- Show logscale in short term forecast
- Use new data to prepare GLEAMviz model view
- Display the results of GLEAM in the model view
- Distinguish between extrapolated values in the NPI model view
- Gather data from different sources for NPI model HOT 1
- Improvements for GLEAM and NPI before publishing
- UI Improvements before publishing
- Add NPI activation triggers to Gleam simulations HOT 1
- BUG: The "country-scenarios" link to Neherlab does not work HOT 1
- Gleamviz install on Linux
- BUG: Channel selection not preserved in web menu HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from covid.