EmbarkStudios / opensource-template

🌻 Template for creating new repositories
https://github.com/EmbarkStudios
Apache License 2.0
89 stars 20 forks source link

Add deps.rs & Discord badges to all Rust repos? #20

Closed repi closed 3 years ago

repi commented 3 years ago

Tested adding the recently revived https://deps.rs badge as well as our Ark Discord badge to the README in rust-gpu as well as in physx-rs (https://github.com/EmbarkStudios/physx-rs/pull/97) and does look quite nice.

image

Thinking we should have both for all of our Rust crates and in this template, thoughts?

It will keep a bit of pressure to make sure dependencies are up to date and secure, but that we are doing quite well anyway I think.

My only concern would be that I don't want the README badge line to be so long so it always gets split out to multiple lines. But maybe one can shorten some of the badges, esp. the contributor covenant text is very long. Or change some other wording or combine?

Thoughts @Jake-Shadle @XAMPPRocky @arirawr @lpil ?

Not high priority, but nice :)

lpil commented 3 years ago

For me a README is a tool for users rather than maintainers, so I think there's less value in a badge for deps. As a user I tend not to care so much that the deps are on the latest versions, though I would definitely find the Discord badge useful.

Is it possible to alter the wording on these badges? The word "adopted" seems kinda redunant as we wouldn't be showing a badge if we were not using it.

repi commented 3 years ago

For me a README is a tool for users rather than maintainers, so I think there's less value in a badge for deps. As a user I tend not to care so much that the deps are on the latest versions

I do agree in general that it is for the users primarily, but seeing a repo with 5/30 dependencies out of date or one with everything up-to-date is a sign of quality and that it is well maintained, and that I do as a user of a library crate or a binary crate really appreciate.

Is it possible to alter the wording on these badges? The word "adopted" seems kinda redunant as we wouldn't be showing a badge if we were not using it.

Agreed, "adopted" and even the version feels a bit redundant, likely can shorten it

Jake-Shadle commented 3 years ago

I kind of disagree, I generally look at the crates repo before I use it, having a badge that says all the dependencies are up to date would make the decision whether or not to use it easier.

lpil commented 3 years ago

Oh I do look at the repo, just I normally look at issues + open PRs + the code. For me how a project is being maintained is more important than whether deps are at the latest version unless there's a security vulnerability, and vulnerability scanning handles that for me.

Seems it's a matter of personal taste! If people find it useful I would be in favour of including it for sure. Best to support everyone's needs

repi commented 3 years ago

This also does show directly in the readme if there is a vulnerability in any dependency. Which is nice and a complement to our CI scanning and validation which only runs on pushes and PRs.

XAMPPRocky commented 3 years ago

Yeah, I think those can be helpful. I would also consider adding a "docs" badge https://docs.rs/<crate>/badge.svg as that's the badge I probably most frequently click on in rust repositories, and maybe the "downloads" badge from crates.io, since I never really go to check the download tracker on crates.io itself (from shields.io).

repi commented 3 years ago

@XAMPPRocky we do also have a crates.io and docs.rs badges but only for the crate repos, so sub-directories in physx-rs case like here.

so this is physx-rs/physx/README.md

image

Could have the "main" crates docs linked in the top folder in the repo also though when there is such a clear one (which there is in physx-rs), but it also does list it in the crates later down in the README

arirawr commented 3 years ago

I really like the Discord one! Let's make sure to add that to all repos.

@lpil I just grabbed the one from here but we can certainly change the text if needed, or even design a new one.

arirawr commented 3 years ago

My proposed contents and order would be:

repi commented 3 years ago

One can PR this repo and update the template here to try out and see how it looks like with our new "standard" set of badges and in the order.

Then once merged, it will be a lot of copy'n'paste and pushes to other repos :) but great to do

lpil commented 3 years ago

Banging. Shall I pick this up @arirawr ?

arirawr commented 3 years ago

Go for it @lpil !

lpil commented 3 years ago

OK I think we're done. If you find one I've missed let me know :)

lpil commented 3 years ago

Oops, rust-gpu left

lpil commented 3 years ago

giphy

arirawr commented 3 years ago

Well done @lpil !