Evidence stats page
This is the initial rewrite I threw together yesterday(emphasis on how quick this was to set up and get hacking on).
I pulled the database off mysql and tossed it in motherduck(This could also probably be a csv on hugging face or S3 if MotherDuckd wants to get greedy) Scripts and some data: https://huggingface.co/datasets/nf-core/stats/blob/main/db/README.md(this was the hardest part getting connected to the DB :sweat_smile:)
Threw the credentials in the Evidence template and it was off to the races.
https://nf-core-stats.evidence.app/
Some questions answered
-
At first I started out with a separate repo because I couldn't get it to
npm run devwhen I tossed it in the website repo. It's kinda of a Evidence bug, kinda an issue with npm workspaces. I tried switching to pnpm, and it just worked. That's definately a seperate debate, but just calling it out, so bear with me if that's a blocker this is a PoC. -
Just deployed it with their cloud offering because it was a click. They have netlify instructions or you just build it yourself.
-
It runs as a static site generator. I think we just stick with that while I prove out recreating the current stats page. I'm hoping there's some way to just injest the charts or components, but I think worst case scenario, we can just wrap the html in Astro, like what's happening with the old site currently. Just need to pull in the theming.
Main point is it's the kind of dev workflow that I think will let the community hack on it. It's simple, and quick to get up to speed, and I'll be excited to see what people build with it!
Closes #570 #571
### Out standing Tasks and Decissions
- [ ] Reproduce Community Plots
- [ ] Reproduce Code Plots
- [ ] Switch to pnpm
- [ ] Set up Netlify(and change the iframe)
- [ ] Set up theming
- [ ] Can we use remote csvs with the "duckdb" source instead of the csv source?
- [ ] #2063
- [x] Create a data pipeline to get the stats stored somewhere(whole seperate project)
Deploy Preview for nf-core-main-site ready!
| Name | Link |
|---|---|
| Latest commit | 5b7d797b48f71b0b54ebcee1cc8255ceac69b8fd |
| Latest deploy log | https://app.netlify.com/sites/nf-core-main-site/deploys/67a0e1358af62400083487eb |
| Deploy Preview | https://deploy-preview-2695--nf-core-main-site.netlify.app/stats |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Argument for why this isn't in nf-core/website
- Evidence is a completely different build system, not using Astro
- Just going to wrap it as an iframe
- There's also the whole data-engineering side. That could live in the nf-core/ops monorepo, but it might be better to just start yet another monorepo.
Tbh i don't think this is in a state to replace the current stats page. Too many placeholders, too little different stats and it will feel quite out of place with the current styling.
[!CAUTION] Refused to display 'https://nf-core-stats.evidence.app/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
This may be a problem..?
The latest deployment seems to work @ewels!
Tbh i don't think this is in a state to replace the current stats page. Too many placeholders, too little different stats and it will feel quite out of place with the current styling.
@mashehu I imported all the static data from the current stats page into some CSVs and recreated the plots. Feels way less half-finished now.
As for styling, I'd love some help on that; the docs cover it. I don't know how the website styling works here. https://docs.evidence.dev/reference/themes-and-layouts/
Can we change the dark mode background colour to
Hex code: #212529