Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evidence stats page #2695

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Evidence stats page #2695

wants to merge 2 commits into from

Conversation

edmundmiller
Copy link
Contributor

@edmundmiller edmundmiller commented Aug 21, 2024

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 😅)

Threw the credentials in the Evidence template and it was off to the races.

https://nf-core-stats.netlify.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

  1. enhancement

@netlify /stats

@edmundmiller edmundmiller requested review from ewels and mashehu August 21, 2024 16:01
@edmundmiller edmundmiller self-assigned this Aug 21, 2024
@edmundmiller edmundmiller marked this pull request as ready for review August 21, 2024 16:01
Copy link

netlify bot commented Aug 21, 2024

Deploy Preview for nf-core-main-site ready!

Name Link
🔨 Latest commit db8d3d7
🔍 Latest deploy log https://app.netlify.com/sites/nf-core-main-site/deploys/675756581cdd8200087d5d73
😎 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.

@github-actions github-actions bot deleted a comment from netlify bot Oct 30, 2024
@apeltzer apeltzer self-requested a review October 30, 2024 16:22
@edmundmiller
Copy link
Contributor Author

edmundmiller commented Oct 30, 2024

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.

Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given how badly outdated the current one now is, happy to merge this and incrementally improve 👍🏻

Copy link
Contributor

@mashehu mashehu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to use nf-core styling, incl. dark theme 😎

@mashehu
Copy link
Contributor

mashehu commented Dec 5, 2024

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.

Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some stuff that'd be good to sort before merging:

  • Side navbar is missing on mobile
  • Links on home don't correspond to side nav
  • Home > Views is the same as Code Stats > Repository Traffic? Delete Home > Views.
  • Add note to empty pages explaining that we know they're empty.

@edmundmiller edmundmiller mentioned this pull request Dec 6, 2024
4 tasks
@edmundmiller edmundmiller requested a review from ewels December 7, 2024 18:27
@ewels
Copy link
Member

ewels commented Dec 8, 2024

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

@edmundmiller
Copy link
Contributor Author

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a database for statistics
3 participants