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

Add "Peer Reviewed" badge #428

Merged
merged 3 commits into from
Jul 14, 2024
Merged

Add "Peer Reviewed" badge #428

merged 3 commits into from
Jul 14, 2024

Conversation

sneakers-the-rat
Copy link
Contributor

See pyOpenSci/software-peer-review#293 - rather than using tinyurl and shields.io, we can just host our own badge :). this is just a directly saved version of the existing logo.

ideally we would have it just at /badges/peer-reviewed.svg but

a) i didn't want to add another top-level directory when there is already a top-level images directory, and

b) this site is using the old style github-pages gem build method rather than a github actions build, so I wrote a quick plugin to be able to specify copying from one location in the source directory to another in the built site, but you can't use custom plugins with the old style gh pages build :(.

@sneakers-the-rat
Copy link
Contributor Author

lol I love how the pre-commit hook is bouncing the file ending of an svg that rocks

@lwasser
Copy link
Member

lwasser commented Jun 28, 2024

Somehow you aren't on our editorial team @sneakers-the-rat as i was wondering why the CI didn't kick off for you here. i just invited you to our org and the team! I'm confused how this happened!!!

Should we make some changes to our CI build? this site was setup 5 years ago.

I love serving this badge. we've thought about it before!
rOpenSci has a slightly different process with their badge - the package gets the badge at the very beginning and the status of the badge updates over time as it moves through review. What's cool about that is it would allow us to flag a package that say hasn't been updated in (as an example) 1+ years.

@sneakers-the-rat
Copy link
Contributor Author

Hmm hmm hmm I think you could do that with a static page and JS but im not sure, let me try.

lwasser
lwasser previously approved these changes Jul 11, 2024
Copy link
Member

@lwasser lwasser left a comment

Choose a reason for hiding this comment

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

ok no rush on that. @sneakers-the-rat

  1. you should be able to merge things here. If you can't please let me now. Please feel free to merge pr's as it makes sense! 🚀
  2. If you'd prefer to add a badges directory we could do that. i wasn't sure above if you added it to images/ given that's what the website uses. But if you think it would be better to have pyopensci.org/badges/ let's create that url path for now.

I suppose the last option would be a new repo called badges where we store all things badges.

i am probably overthinking this. So if you are comfortable with things being in images/badges let's merge. If not, we could start with a top level badges dir here and then reconsider in the future moving to a badges repo that is designed to host images / badges. and i can talk with rOpenSci about how their badging infra is setup.

thank you for this pr and my apologies for taking so long to get back to you!

@sneakers-the-rat
Copy link
Contributor Author

lets see if a page with nothing but this in it works on github.

const params = new URLSearchParams(window.location.search);

let img_param = params.get('img');
if (img_param === 'sheep') {
  img = 'sheep.jpg';
} else if (img_param === 'snake'){
  img = 'snake.jpg';
} else {
  img = 'blemmye.jpg';
}
let url = new URL(img, window.location);
window.location.replace(url.href);

no params:
https://hackers.piracy.solutions/dynamic_img/

base image

sheep:
https://hackers.piracy.solutions/dynamic_img/?img=sheep

sheep image

snake:
https://hackers.piracy.solutions/dynamic_img/?img=snake

snake image

@sneakers-the-rat
Copy link
Contributor Author

sneakers-the-rat commented Jul 11, 2024

ok so the only way we could do that dynamically (so eg one would add a link like https://pyopensci/badge.svg?package=my_package ) would be to have some serverside logic. it would be super simple to do but it would be something we would need to have a running server to do.

alternatively, we could just do the static site generator thing and when building the page we read the package.yaml thing and just generate a literal .svg for each package that literally would be at https://pyopensci.org/badges/mypackage.svg

for now i say we just do it like this since we don't even have badges for the other stages of the review process yet anyway, and it's not clear that someone would want to have a undergoing peer review badge anyway yno? we can save dynamic badging for another time :)

if we think we're gonna want more badges in the future, let's make a top level /badges directory, otherwise let's just keep it in images. lmk on that and i'll handle the merge and update either way

@lwasser
Copy link
Member

lwasser commented Jul 11, 2024

@sneakers-the-rat

✔️ I love the idea of having a package specific badge - that is what rOpenSci does.
✔️ lets start it as a static site badge as you suggest - easier for us to maintain now! start simple
✔️ based on the above let's create a badges/ dir. this will allow us in the future to retain the same url if we need a new repo with more infra pyopensci.org/badges
✔️ Soon we will have a new yaml file that tracks packages in review. Once we have that we can update a badge for a package according to it's state in review AND also if we suspect a package is unmaintained we can update the badge color for that too? But for now we can keep things simple and just host the badge as a single image here in badges/

Does that sounds good to you? make sense?

@sneakers-the-rat
Copy link
Contributor Author

Def same page. Ok ill move the image and merge when I get to desk

@sneakers-the-rat
Copy link
Contributor Author

Fwiw I love SSG hacking to do serverlike things. The low fi web way

@lwasser
Copy link
Member

lwasser commented Jul 12, 2024

Amazing. 🚀 and 😆 it's pretty awesome how much we can make static sites do 🙃

just say the word if you don't have enough permissions!!

@sneakers-the-rat
Copy link
Contributor Author

sneakers-the-rat commented Jul 13, 2024

so this can get merged because it's additive (the old image isn't going away), but i think just so we make the switch clean and have it done, it might be good to do all these at once: pyOpenSci/software-peer-review#293

made a checklist there, i appreciate the invitation to become a merger but this time why don't u merge those so they all get deployed together? <3

@lwasser lwasser merged commit 44807a3 into pyOpenSci:main Jul 14, 2024
4 checks passed
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.

2 participants