wjs018 - a contributor to piefed, mainly doing UI/UX stuff for the web interface rather than the api. I am not a dev by trade, instead I do biophysics, like at a lab bench in a lab coat and all that. My first foray into programming was when I was in grad school and I had to learn enough IDL and python to rewrite a bunch of IDL scripts into python so that any of us knew what the hell they did. Then, I changed the whole direction of my PhD thesis and didn't need any of that...however, I did stick with python as a bit of a hobby, and the rest is history.
wjs018
Specifically, from looking at the code, it counts the most recent 50 votes on posts and the most recent 50 votes on comments for the calculation.
When you don't have too many votes cast, it doesn't take much to cause a big swing. There is a section in the code where it doesn't actually calculate the attitude until after 3 votes are cast, but perhaps that should be increased.
Attitude, like others have mentioned is given by:
(upvotes cast - downvotes cast) / (upvotes + downvotes)
If you want to see exactly how it is done, here is the code reference. Basically, it is just a number between -1 and 1 (-100% to 100%) based on the votes you have made. It can be different on different instances depending on what has federated to where. For example, on instances with downvotes disabled, everybody has a 100% attitude!
Yep! Absolutely. Here is the relevant portion of the docs.
I am using R2 for my instance and I set up those environment variables in my
.env
file before building the docker container for the first time, and everything just worked. The specifics of different S3 providers can vary a bit. There is a special set of instructions for using Wasabi S3 for example (I think this was contributed by Jerry of feddit.online).