website icon indicating copy to clipboard operation
website copied to clipboard

Evidence stats page

Open edmundmiller opened this issue 1 year ago • 1 comments

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

  1. At first I started out with a separate repo because I couldn't get it to npm run dev when 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.

  2. Just deployed it with their cloud offering because it was a click. They have netlify instructions or you just build it yourself.

  3. 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)

edmundmiller avatar Aug 21 '24 16:08 edmundmiller

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Aug 21 '24 16:08 netlify[bot]

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.

edmundmiller avatar Oct 30 '24 16:10 edmundmiller

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 avatar Dec 05 '24 18:12 mashehu

[!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..?

ewels avatar Dec 08 '24 22:12 ewels

The latest deployment seems to work @ewels! image

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/

edmundmiller avatar Dec 09 '24 20:12 edmundmiller

Can we change the dark mode background colour to

CleanShot 2025-02-03 at 14 09 22@2x

ewels avatar Feb 03 '25 13:02 ewels

Hex code: #212529

ewels avatar Feb 03 '25 13:02 ewels