wjs018

joined 4 weeks ago
[–] wjs018@piefed.wjs018.xyz 3 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Ok, I was able to reproduce this and made a PR for a fix. This issue only pops up when a user has instance blocks and works fine otherwise, which is why others in this thread (and myself when I was testing) aren't running into issues.

The root cause really is that I was creating schema for input and output validation to match the manually created swagger docs, but the output for instance_blocks was different than specified (and I marked it as a required field, likely from a copy/paste error). So, thanks for helping us as we are going through endpoints and making them self-documenting.

[–] wjs018@piefed.wjs018.xyz 5 points 2 weeks ago* (last edited 2 weeks ago)

This is actually a known issue: https://codeberg.org/rimu/pyfedi/issues/1018

The basic takeaway is that you must have already enabled notifications by clicking the enable button that shows up in that box. Then, since they are enabled, the button doesn't show up any more, so there is just an empty box left. To disable notification, you need to do that through your browser. It's on the list to make this UI a bit clearer at some point.

Edit: This is what it looks like if you don't have notifications enabled

[–] wjs018@piefed.wjs018.xyz 13 points 2 weeks ago (1 children)

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

[–] wjs018@piefed.wjs018.xyz 7 points 3 weeks ago* (last edited 3 weeks ago)

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@piefed.wjs018.xyz 3 points 3 weeks ago (1 children)

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.

[–] wjs018@piefed.wjs018.xyz 7 points 3 weeks ago

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.

[–] wjs018@piefed.wjs018.xyz 8 points 3 weeks ago (2 children)

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!

view more: ‹ prev next ›