#dev-log

1 messages ยท Page 19 of 1

night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
regal archBOT
#

Sentry Issue: SIR-LANCEBOT-BA

ValidationError: 1 validation error for RfcDocument
revisions
  Input should be a valid string [type=string_type, input_value=1, input_type=int]
    For further information visit https://errors.pydantic.dev/2.5/v/string_type
  File "bot/exts/utilities/rfc.py", line 69, in rfc
    document = await self.retrieve_data(rfc_id)
  File "bot/exts/utilities/rfc.py", line 52, in retrie...
#
[python-discord/sir-lancebot] New branch created: fix/1426
#

Solves #1426 Soves SIR-LANCEBOT-BA

This was causing a pydantic validation error, was it was being passed a string.

The only place this is used internaly casts it to a string anyway, so no further changes were needed.

Relevant Issues

Description

Did you:

  • [ ] Join the Python Discord Community?
  • [ ] Read all the comments in this template?
  • [ ] Ensure there is an issue open, or link relevant discord discussions?
  • [ ...
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: fix/1426
night lilyBOT
#
Sir Lancebot

Connected!

thin oysterBOT
#
Sir Robin

Connected!

odd spireBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#

https://www.pythondiscord.com/pages/tags/

IMG_0813

The descriptions are truncated off, possibly from some word or character limit. It would be helpful if we add a ellipsis or "Read more" link at the end.

Since this is such a trivial issue I intended to fix it myself, but after a few minutes of failing to find where the description is truncated, I decided to leave it for others or later ins...

odd spireBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

These colors were adjusted with accessibility in mind.

django-simple-bulma does not support including the default variables into per-theme variables, so those non-color related variables have to be repeated for dark theme.

It also doesn't support reusing of default Bulma variables, so we have to define it ourselves before using it (in which case I've copied Bulma's colors for it).

odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#

This is really good! This review is just from me playing around with the site in firefox, on desktop. I'll try an have a check in chrome and on mobile when I get a chance, and have a better look at the code changes, but honestly i'm not sure i'll have much else to say since this seems great to me already!


Regarding

There is a latency in applying the current theme on page load, because this operation is only done after the page is loaded.

which causes a small flash on the page ...

oak estuaryBOT
regal archBOT
#

Relevant erroring code is here:
https://github.com/python-discord/bot/blob/e33ec854c773f86be2b5bfb007bf87539616e9c4/bot/converters.py#L502-L519

The aim of it is to trick code editors into thinking the converters are the type they convert into so you get nicer auto completions and info on type hinting.

However, the trick only works in PyCharm last time I checked, and not VSCode, so it's not really that good.

I think we should change it to one of these options:

  1. Remove it complete...
regal archBOT
#

The length trimming logic is in listing.js.

https://github.com/python-discord/site/blob/f4f359c1b28163383246c07de0ea0c6742169f2f/pydis_site/static/js/content/listing.js#L4-L39

After spending some time debugging this in the browser, it seems it doesn't work properly in lines 20-23. Is it worth it to modify this script or would it be better to move the truncation to the backend?

regal archBOT
#

A bit like this: https://codepen.io/Nuke66/pen/LgzRLW. That may be more complicated though, i'm not sure.

It looks a bit overkill, but if we're opting for it why not change the read more to an expand instead? The tags are used in the server anyway so they can't be several pages long. Tag content in the listing can then be truncated with a "expand" link/button which could expand to display the entire tag.

After spending some time debugging this in the browser, it seems it doesn't wor...

odd spireBOT
regal archBOT
#

@wookie184

I think we can safely set the style sheets before the page is loaded by moving this code out of the DOMContentLoaded listener which should prevent flashing.

This is a great idea, I've applied the change, thanks!

The titles for projects in light mode are now lighter than they were before. I think this makes them harder to read as the contrast is lower.

This was actually the case for not just the project cards but almost all other box components throughout the site. ...

odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#

I couldn't reproduce the FOUC behaviour for my devices and browsers I used, even on slower networks. However while working on my dark theme PR I noticed a lot of opportunities to improve performance.

The main ones:

  • Minify large images, for smaller images the resolution can be reduced unnoticeably, and also the dimensions
    • Or opt for better image formats where applicable
    • This is especially problematic for images in the homepage hero. When a user visits a site for the first time ...
odd spireBOT
regal archBOT
#

It's a rather weird and annoying issue that I have been experiencing for a few years.

On my iPad I can't get the "More" navbar-link item to show the dropdown, unless I long-press the word, which selects the More text, then the dropdown displays. After it is shown I can only hide it again after pressing a link. (Tapping in an empty space also fails to close it.)

Since we use Bulma I've tested this with the same device and browser on their live demo:
https://bulma.io/documentation/co...

regal archBOT
#

Currently, the resources command allows to fetch certain resources with a specific topic.

The catch is: You need to know the different topics that we have.

This can be made easier by switching to a Slash command that allows auto completion whenever we input text.

Requirements
We'll need to expose an api that allows to fetch the resources and cache them, as they're not that prone to change.

If indeed we introduce a new resource to site, we can have a reload subc...

regal archBOT
#

Currently resources are loaded and parsed etc. in the __init__ of the resources view here:
https://github.com/python-discord/site/blob/4ce61bddff9fd459b769305f302dcd9eb8ded395/pydis_site/apps/resources/views.py#L28-L36

I assume the intention here is for this to be run once on application startup, but in reality it seems this is run every time the /resources view is accessed. This leads to non-ideal performance. From sentry:
![image](https://github.com/python-discord/site/assets/22353...

regal archBOT
#

If you look through the uses of the !resources command, it's very often used as a reply to someone, which is useful, especially in busy channels like #python-discussion where it wouldn't be obvious otherwise. Switching to a slash command would make this not work any more.

Using the topic arguments is less common and useful in less cases, since it's usually good enough to link someone to the overall page and let them decide what specifically they want to look for, so I don't think it's ...

odd spireBOT
oak estuaryBOT
regal archBOT
#

It looks a bit overkill, but if we're opting for it why not change the read more to an expand instead?

Yeah, I think the expand idea could work nicely, while keeping the individual tag pages. As for being overkill, I think it might actually be simpler to be able to replace the current listing.js logic that has to work out where to trim things with just some css to limit the size of the container so it doesn't all display.

night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

Yes, with Firefox using Regular 2G throttling I can reproduce this. However anything above Regular 2G it does not happen. With Chrome-based browsers using network conditions equivalent to that of Firefox's Regular 2G I cannot reproduce FOUC either.

I wonder if this is less about our site performance and more about a Firefox bug.
Locally I tried out this fix, and it worked:
https://stackoverflow.com/questions/21147149/flash-of-unstyled-content-fouc-in-firefox-only-is-ff-slow-renderer

odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: revert-1432-dependabot/pip/emoji-2.10.0
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
thin oysterBOT
#
Sir Robin

Connected!

odd spireBOT
regal archBOT
#

Someone leaking their bot token by accident in โ #python-discussion had gotten me thinking - would it be possible for the bot to automagically invalidate bot tokens, similar to GitHub's secret scanning, as a precautionary security measure? Putting myself in the shoes of a malicious actor, wouldn't it be trivial to run a self-bot in the server which awaits tokens, authenticates as them and performs automated malicious actions?

[Relevant discussion in #community-meta](https://discord.com/...

regal archBOT
#

Firstly I believe the overall frontend performance can be improved.

Now since this fix targets specifically for firefox users on an incredibly slow connection, it's a matter of comparing the user experience for this audience:

  1. Blank screen, shortly after, unstyled content loads first, then some time later the styles are loaded and applied. (if we don't include the fix)
  2. Blank screen, a long time later the entire page loads together. (if we include the fix)

If the overall fronten...

regal archBOT
#

If you have nothing set in localstorage and are on a system that prefers dark mode, the site will display in dark mode, but you have to click twice to change to light mode.

I believe this is because getCurrentTheme will return light here if there is nothing in local storage even if the current theme is dark mode because of system preference. Passing the systemPrefers argument here should fix it.

regal archBOT
#

This is a good catch.

Your suggested solution does fix it. However after implementing it I decided that it made the logic and integration with getCurrentTheme it little complicated.

In the switch toggle our intention is to toggle the current theme. Since the data-theme attribute is set for all of system preference changes, switch clicks, and page loads, why not check for that instead? It makes the code cleaner and more explicit IMO. And it cannot, ever, contradict what the user actu...

odd spireBOT
regal archBOT
#

By the way, I am observing flash of unstyled content when I change the system preference and have the site automatically adapt to the new theme. It might have been caused by me fixing FOUC for switch toggle clicks, and FOUC on page loads.

I will probably not be fixing this for two reasons:

  1. No idea how to fix for now
  2. This feature is probably used much less often than the switch toggle, I only implemented it for completeness

If anyone has a fix though, I would gladly apply it.

regal archBOT
#
[python-discord/site] New branch created: feat/events-redesign
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

#
Sir Lancebot

Connected!

oak estuaryBOT
thin oysterBOT
#
Sir Robin

Connected!

night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/snekbox] New branch created: bump-ci
regal archBOT
regal archBOT
#

I'm not 100% sure about this. In some cases a mod may want to ban the author of a thread (in the thread) and also issue infractions or send a message to others interacting in the thread.

Automatically closing the thread would make this sort of awkward. If a mod sends another message it will reopen the thread, and then it would never close unless reclosed manually. It's also a bit confusing to have messages after the thread closed message.

If this was a common enough issue I guess it m...

regal archBOT
#
[python-discord/snekbox] New branch created: bump-mem-max
#
[python-discord/snekbox] branch deleted: bump-mem-max
#
[python-discord/snekbox] branch deleted: bump-ci
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: fix-2895
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
oak estuaryBOT
regal archBOT
#

Description

We require Python 3.11.* now, Gitpod config should be updated to have pyenv install the correct version.

Steps to Reproduce

  • Initialize env using gitpod
  • Wait for poetry's incompatible version error to show.

Expected Behaviour

Successful initialization

Actual Behaviour

Incompatible version error

Known Impacted Platforms

n/a

Possible Solutions

Update .gitpod.yml to use the correct version during setup.

regal archBOT
#
[python-discord/bot] New branch created: swfarnsworth/is_spammer_flag
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Heya,

Can I suggest adding an interpreter embed. The amount of times we have to explain VSCode selecting interpreter / the right terminal python version activated is relatively high. All the threads "I pip installed it but the module is still not found" can be started with a link to this embed, it will explain the basics on how to set it up and pip install in the right environment. There are always a few cases where this won't be enough, but in that case we have to debug and find out more ...

regal archBOT
#

While I agree that it is a common issue, I think adding a tag for it might not be helpful because 1) the solution can vary a lot based on circumstance, and 2) many details would have to be cut for it to fit in a tag.

You could try guiding them to an external resource which goes into more detail since length is less of an issue (such as this one that I wrote a while back), but you should keep in mind that it won't cover e...

regal archBOT
#

Hi @hedyhli. This PR is absolutely beautiful work, and it's maybe one of the best PR descriptions I've ever seen in my entire career of managing software developers. Bravo. ๐Ÿ‘๐Ÿผ ๐Ÿ‘๐Ÿผ

The code is well documented, well implemented, and you've been extremely thorough. I have notes, but they are all cosmetic notes and everything in this PR is more or less perfectly implemented already.

The colors

My main complaint is simply that I'm not a big fan of the colors.

Darker background

...

regal archBOT
#

Really appreciate this @lemonsaurus. โค๏ธ

I agree on some of your points. I didn't have much confidence in the colors in this PR; partly due to it being my first time designing for dark mode and also due to the worry of the code being a bit too messy if I customize for dark mode too much (because of Bulma's limitations). However, I am glad you included suggested colors.

I think the background should be darker, and there should be more contrast between the background and the cards, for e...

odd spireBOT
regal archBOT
#

The site uses premium icons, but not all icons we use are premium.

Sometimes it is helpful for us to get a sense of how the icons look like, for free icons, when developing locally. This is especially so in PRs that involve colors or adding icons, such as #1210. My workaround is to change the fontawesome_token setting myself, but this is annoying when having to commit multiple changes together (especially when a change in settings.py is involved as well) -- to stage by-patch.

I propos...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Switch button in light mode

lemon pointed out in the initial dark theme PR that the background color for the switch in light mode doesn't really fit that well.
Although, I personally think it's not too bad, and I'm not sure what a better color could look like.

Timeline icon pastel colors

The icons in the timeline use pretty bright pastel background colors. We could adapt them for the dark mode, such as this example given by lemon:
![image](https://github.com/python-discord/...

regal archBOT
#
[python-discord/site] New branch created: docs/dark-theme
odd spireBOT
regal archBOT
#
[python-discord/sir-robin] New branch created: toggle-AoC-tasks
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

The changes you're making seem reasonable to me, but I the thing I don't understand is why the tests that were run in the CI here don't include this fixed one. I mean, you're not adding the test, it should've been running even on main, right? It just wasn't a good test yet. So what am I missing? Cause I looked at the CI run and I don't see it there.

I don't think CI outputs each test that was run, just some dots: https://github.com/python-discord/bot/actions/runs/7371282307/job/200584997...

regal archBOT
#
[python-discord/bot] branch deleted: fix-incorrect-test
odd spireBOT
regal archBOT
#

792163e Add 'n' alias and 'nom' root alias to 'nominate... - TizzySaurus
b37c18d Bump rapidfuzz from 3.0.0 to 3.1.1 (#2634) - dependabot[bot]
a5ee8de Bump pydis-core from 9.6.0 to 9.7.0 (#2638) - dependabot[bot]
0091e1e Bump pytest from 7.3.1 to 7.3.2 (#2636) - dependabot[bot]
4b3e42c Bump pydantic from 1.10.8 to 1.10.9 (#2635) - dependabot[bot]

oak estuaryBOT
regal archBOT
#
[python-discord/site] branch deleted: docs/dark-theme
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

Yeah, I think that would be good.

The behaviour of handle_forbidden_from_block is pretty confusing, so I think it would be good to clear things up with a comment.

    with contextlib.suppress(Forbidden):
        # Attempt to handle the error. This reraises the error if's not due to a block, 
        # in which case the error is suppressed and handled normally. Otherwise, it was
        # handled so return.
        await handle_forbidden_from_block(e_val, message)
       ...
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
oak estuaryBOT
regal archBOT
odd spireBOT
oak estuaryBOT
regal archBOT
#

I may be misremembering but I think our font awesome license is from a former staff member that hasnโ€˜t been on the server for a while.

I believe we switched to using the free plan so we control the token now.

The site uses premium icons, but not all icons we use are premium.

Are you sure? I thought we only have the free plan.

Anyway, this proposal sounds sensible, though I don't really understand how fontawesome works. Currently icons seem to display normally in development fo...

regal archBOT
#

Are you sure? I thought we only have the free plan.

Ah, I asked this question in dev-contrib ~years ago~ and Scale told me we use premium icons. I guess this is no longer the case.

Ref: #dev-contrib message (turns out it's just last year)

Currently icons seem to display normally in development for me, so would this be for when you want to use an icon that the site doesn't use already, and it's then that it would b...

regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#

Okay, so:

  • I have access to the kit, and can make changes to it.
  • But, there's no domain restriction for testing domains like localhost, they are always allowed by default.
  • The reason it works on our website and not locally is probably because we are way over the included usage limits. we're at almost 20,000 views, only 10,000 are allowed, so then it's gonna fail "some of the time" according to FontAwesome. That explains the flakeyness we've seen in this thread.

My proposal for a ...

odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
regal archBOT
#
[python-discord/bot-core] branch deleted: botcore-settings
#
[python-discord/bot-core] branch deleted: migrate-common-checks
#
[python-discord/bot-core] branch deleted: interaction-check-function
regal archBOT
#
[python-discord/bot-core] New branch created: update-deps
regal archBOT
#
[python-discord/bot-core] branch deleted: update-deps
#
[python-discord/bot-core] branch deleted: add-lock-utils
regal archBOT
#

If the role from the loaded in config can't be found, then the &aoc ct to do the initial toggle-on fails. I think it would be better to output the error somewhere visible for admins/the Event Runner to see if this occurs. It does get logged, but it wouldn't be obvious for a few minutes that something was wrong and to check the logs. I think outputting to devlog like we do for leaderboard errors makes sense.

Otherwise everything works well and as expected. I wasn't able to test the schedu...

odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: fix/gitpod
#

Relevant Issues

  • Closes #1437 and #916.

Description

  • Use python 3.11 as required by poetry
  • Fix poetry install error on workspace refresh

All relevant info is detailed in the linked issues.

Testing

  1. Open gitpod workspace using this repo
  2. Ensure auto-setup finishes successfully
  3. Close workspace and wait for it to reset (not sure if there's a faster way, but this means wait for about 1hr before reopening)
  4. Reopen workspace
  5. Ensure auto-se...
odd spireBOT
regal archBOT
#

If the role from the loaded in config can't be found, then the &aoc ct to do the initial toggle-on fails. I think it would be better to output the error somewhere visible for admins/the Event Runner to see if this occurs. It does get logged, but it wouldn't be obvious for a few minutes that something was wrong and to check the logs. I think outputting to devlog like we do for leaderboard errors makes sense.

Otherwise everything works well and as expected. I wasn't able to test the ...

odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
oak estuaryBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: use-botcore-paginator
oak estuaryBOT
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-robin] New branch created: add-sentry-integration
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
#
[python-discord/sir-robin] branch deleted: add-sentry-integration
thin oysterBOT
#
Sir Robin

Connected!

odd spireBOT
thin oysterBOT
#
Sir Robin

Connected!

#
Sir Robin

Connected!

#
Sir Robin

Connected!

odd spireBOT
regal archBOT
#

I don't think this is an issue any more, as all the clients used are guaranteed to be created before they are used:

odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: use-botcore-paginator
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-robin] branch deleted: toggle-AoC-tasks
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
#
[python-discord/bot-core] New branch created: correct-version
#
[python-discord/bot-core] branch deleted: correct-version
odd spireBOT
regal archBOT
#

@ChrisLovering I started working on this, and one thing I'm wondering is how'd we want to register handlers ?
Do we want to do it a la discord.py ? Where we walk some modules/packages look for some method to register them ?
Or do we just register them by hand, one by one ?

If we go with option 1, I think the loading can be done synchronously since they're simple classes to setup with no equivalent of cog_load, and it's not like we'll be having millions of handlers.

regal archBOT
#

That way cogs can register error handlers,

Do you mean like we have a cog that's responsible for registering these handlers ?

or in the setup_hook of bots we can register generic handlers.

The way I have it write now, is that the container class needs to have a default handler passed to it upon instantiation, to ensure we'll always fallback to it.

It's also there because the container exposes a register_handler method to register handlers, and I didn't want to do any non-...

regal archBOT
#

I'm not sure I fully understand the proposal in this issue, but i'm not sure what the benefit of being able to have lots of error handler classes is.

The benefit is to be able to

  1. Deflate the error cog and extract each specific logic to its own class, making it easier to change/extend
  2. Being able to use the same instance of the error handling for both text command & app commands, as that's not currently possible.
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: move-url-regex-to-constants
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/metricity] New branch created: bump-versions
#
[python-discord/metricity] branch deleted: bump-versions
regal archBOT
#
[python-discord/king-arthur] New branch created: bump-versions
#
[python-discord/king-arthur] branch deleted: bump-versions
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: new-mailing-list-schema
odd spireBOT
regal archBOT
oak estuaryBOT
regal archBOT
#
[python-discord/site] branch deleted: mailing-list-model
odd spireBOT
oak estuaryBOT
regal archBOT
odd spireBOT
regal archBOT
#

Description

I'd like to propose that the heart emoticon currently used for Valentines be expanded to include the many other colourful hearts available.

Reasoning

Fun and a thrilling sense of risk; never knowing which heart will be used.

Proposed Implementation

It looks like the random selection of an emoticon is already implemented in the logic. This change would include simply adding the additional choices to the list.

https://github.com/python-discord/sir-lancebot...

regal archBOT
#

Sentry Issue: BOT-3FF

KeyError: AtomicList(id=4, created_at=, updated_at=, name='domain', list_type=, defaults=Defaults(actions={'remove_context': RemoveContext(remove_context=True), 'send_alert': SendAlert(send_alert=True), 'infraction_and_notification': InfractionAndNotification(dm_content='Your message has been removed because it contained a blocked domain: `{domain}`.', dm_embed='', infraction_type=, i...
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: bug/2464/truncate-snekbox-blocked-exts
odd spireBOT
regal archBOT
regal archBOT
#

Add the thrill of never knowing which heart might be used during Valentines holiday event reactions.

Relevant Issues

Closes #1447

Description

Did you:

odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-robin] New branch created: bump-versions
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#

Steps to Reproduce

  1. Run a help command in DM
  2. Click on the trash emoji

If we have the emoji there, users would expect it to delete the help embed, however it does not do anything currently.

Known Impacted Platforms

It's probably the same, but I only tested on iOS for now.

  • Web
  • Desktop
  • Android App
  • โญ•๏ธ iOS App

Possible Solutions

If it's not possible or infeasible to actually implement this, there shouldn't be a trashcan reaction there at all. It c...

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

A little update on this issue since the dark theme has been merged.

Hacky filtering to turn logos into white logos

We now have dark versions of logos for django and linode in our static assets made by lemon. It should be relatively easy to add one for Bulma.

Sponsor logos are arbitrarily sized

This issue is now fixed IMO. All sponsor logos in the first two rows take up the same height and 1/3 of the total width. Netlify and Cloudflare use the same width as others but share the...

odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: docs/suggest-resources
#

Closes #497.

Added:

  • A link to open an issue in the meta repo, with appropriate issue template, for viewers.
  • Docs in the readme with guidelines for the YAML files, for contributors.

Third point from the issue:

The review process for a new resource. Who reviews and approves these suggestions?

Is this necessary? Is there a review process we should document here?

odd spireBOT
odd spireBOT
regal archBOT
#

Currently, under somewhat specific circumstances the bot might result in few Cogs/Extensions not being loaded if site will drop the connection or otherwise will fail to return relevant information to the bot. Most notably the bot will not load filters cog, superstarify, reminders and python_news.

This issue happens with no indication of a failure to moderators as such bot might end up in a state where filters will be disabled and mods will be none the wiser.

The bot should:

  • Alert mo...
#

The cogs won't have been loaded because there was an unhandled error in the async cog_load function.

We should update cogs that rely on site being availalble during cog load to handle errors like this, and retry a few times, with some backoff logic, to be resiliant to temporary site outages.

If the bot still can't load the cogs after a number of attempts, we should then raise an error so that it appears in sentry and can be actioned.

odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: fix/2910
odd spireBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
regal archBOT
#
[python-discord/bot] New branch created: feat/2172/show-new-reminder-timestamp
odd spireBOT
regal archBOT
#

Here, again there are groups which aren't the same in the new constant (I think there might be an unrelated bug here anyway, this might benefit from a named group). Additionally, there are trailing slashes here because this pattern is used in a fullmatch, rather than a search or a finditer. There might be a saner way to do what this currently does, but I don't think it's handled by the change.

regal archBOT
regal archBOT
#

I'd like to note that for the linked issue, the bug would happen even if we used Context. The bug happened because we tried to issue an infraction from a type of channel that was unaccounted for.

I'm ok with trying to clean this up. This was a hack I wrote because I didn't always have a Context to work with, such as in the case of on_voice_state_update. If you have a better idea I'm happy to discuss it, but the current solution is the least hacky thing I could come up with.

regal archBOT
#
[python-discord/bot] branch deleted: feat/2172/show-new-reminder-timestamp
oak estuaryBOT
regal archBOT
regal archBOT
#
[python-discord/site] New branch created: resources_config_ready
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: resources_config_ready
regal archBOT
oak estuaryBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#

Relevant Issues

Closes #707 if approved.

Description

  • Added 4 commands to fun.py to output a string in different cases to add to the already existing .randomcase
    pascalCase, CamelCase, snake_case, SCREAMING_SNAKE_CASE
    .pascalcase aliases [.pascal .pcase]
    .camelcase aliases [.camel .ccase]
    .snakecase alias [.scase]
    .screamingsnakecase aliases [.screamsnake .ssnake .screamingsnake]
  • Added a helper function in utils/helpers.py to attempt to strip a ...
odd spireBOT
odd spireBOT
regal archBOT
#

All these functions are following the exact same rules to convert the text, with the exception to the conversion_func.

This counts as them all duplicating the knowledge of text cleanup/conversion, which is something we don't want to have.

You could make a private function to the cog, that takes in the ctxt, text, conversion_func as parameters, and just call it in the command callbacks with the separate conversion definitions.

odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/king-arthur] New branch created: grafana-team-sync
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/site] New branch created: docs/dark-theme-dev
#

Discord discussion:
#dev-contrib message

The addition of dark mode prompted the need for some notes on the best practices in adding/updating colors and CSS styles in the future. This includes:

  • Images for content pages (#1215)
  • Resources images (#1226)
  • Making use of bulma classes so light/dark mode colors can be applied based on the theme (see settings.py and CSS directory readme)
  • Image assets (images directory re...
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/site] New branch created: feat/font-awesome-plugin
odd spireBOT
regal archBOT
#

In previous version of voice verification, users had to run a command which then would be deleted by the bot in order to get a voice verification. Deletion of said message would be logged in a channel, as a side effect that allowed moderators to later tell apart people that spammed in the server for sake of spamming from those that spammed to get voice verified and allowed them to take more appropriate actions.

With new implementation of voice verification, this process is silent (cannot ...

regal archBOT
#

There is one more resource, PyCharm which also only contains an icon image:
<img width="784" alt="image" src="https://github.com/python-discord/site/assets/50042066/c9ed6fd2-343e-469b-954e-165e1043b764">

A curious thing I noticed was that for the jetbrains_videos item, we included another image as icon:

https://github.com/python-discord/site/blob/88f2c27e8fd760f12e7b94854cf60c12047ea1d4/pydis_site/apps/resources/resources/jetbrains_videos.yaml#L6-L9

But the image is no longer avai...

odd spireBOT
regal archBOT
#

This looks good, but I couldn't test it the way it exactly is due to some setup limitations.

However I think there are improvements that can be done to the error handling.

What would you think about making exceptions for cases like a team isn't found, etc,
Then raise & handle those in the task's body ?

Because I tried this at first where a team in GH wasn't present in grafana, and it ended up with this
![image](https://github.com/python-discord/king-arthur/assets/48383734/87008525-...

regal archBOT
regal archBOT
#

This seems to make collecting static files quite slow for me. I think this is because a bunch of stuff is being bundled that we don't need.

Before:

  • python manage.py collectstatic --no-input with no staticfiles directory: ~3 seconds
  • python manage.py collectstatic --no-input with existing staticfiles directory: ~3 seconds
  • Size of staticfiles directory: 12MB from ~300 files

After:

  • python manage.py collectstatic --no-input with no staticfiles directory: ~12 seconds
  • `pyt...
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

02b249f Add grafana and github secrets to config class - ChrisLovering
5e1ca0d Add API wrappers for github and grafana APIs - ChrisLovering
c53fa0a Add a cog to sync github teams to grafana teams - ChrisLovering
6ddb24d Ensure errors any are bubbled up when hitting G... - ChrisLovering
6422a01 Refactor adding members to Grafana team to its ... - ChrisLovering

#
[python-discord/king-arthur] branch deleted: grafana-team-sync
odd spireBOT
regal archBOT
#
[python-discord/king-arthur] New branch created: integrate-sentry
regal archBOT
#

Hmm, I hadn't noticed such a huge difference in startup for me. But having thousands of files that we don't need this way should probably be fixed - most of them are individual SVG files of the icons.

Looks like the only advantage of using this plugin as compared to copying files ourselves is to have automatic upgrades of Font Awesome through poetry/dependabot.

It would've been best if the plugin allows specifying which files to copy, unless there is a way to run scripts automatically e...

oak estuaryBOT