#dev-contrib

1 messages Β· Page 114 of 1

gritty wind
#

looks like the codeowners was missed

#

I'll check out the PR and give it a whirl

vale ibex
#
# Extensions groups
bot/exts/christmas/**                   @ks129
bot/exts/halloween/**                   @ks129

# CI & Docker
.github/workflows/**                    @Akarys42 @SebastiaanZ @Den4200
Dockerfile                              @Akarys42 @Den4200
docker-compose.yml                      @Akarys42 @Den4200

# Tools
Pipfile*                                @Akarys42
gritty wind
#

Should hopefully be able to review now

vale ibex
#

What's missing?

#

I'll change it, so your review counts lol

gritty wind
#

Pipfile is no longer a thing

vale ibex
#

ah yis

gritty wind
#

Have to manually add the pyproject and lock

vale ibex
#

Done

gritty wind
#

noice

vale ibex
#

This'll need some site changes too

gritty wind
#

btw we'll probably be switching around over the next few days

#

you may find pipenv --rm to be a useful command πŸ‘€

sleek steppe
#

yes

vale ibex
#

hah true

#

I'm heading out for a few hours before the staff meeting now

gritty wind
#

now if someone knows the poetry equivalent

#

that would just be

#

πŸ‘Œ

placid ermine
#

uh pipenv loads env variables automatically when i do pipenv run, that won't happen with poetry will it

vale ibex
#

I'll raise a site PR if someone doesn't by then

gritty wind
#

should be in the constants file iirc

vale ibex
gritty wind
#

shweet

#

thanks

vale ibex
placid ermine
sleek steppe
gritty wind
#

dew it

#

Actually, while you're at it

#

can you make sure the page is up to date

#

just look for any env vars in the project

sleek steppe
#

will do

vocal prairie
#

Oh, did I forget that one yesterday? My bad

gritty wind
#

I just ran into it for the first time

#

I don't think it's linked anywhere

#

I found it in the repo

#

I think I'll just delete it

green oriole
#

It used to be linked somewhere

gritty wind
#

huh

#

it is actually about halfway down on the guides

#

alright, I'll fix the page

#

do you happen to know it on other systems?

#

right, so what's the shortcut on mac?

#

there's only one shortcut in the guide

#

settings

#

Now I just need a linux dev

#

probably still ctrl + shift +s

sleek steppe
#

What description should I put for this one πŸ€” (and I'm assuming it goes in the debug section)

gritty wind
#

GIT_SHA may actually be better left out

#

it's mostly a CI thing

sleek steppe
#

ah ok

#

I added IGDB_CLIENT_ID, IGDB_CLIENT_SECRET, AOC_COMMANDS_CHANNEL_ID, AOC_SESSION_COOKIE, and CHANNEL_REDDIT

gritty wind
#

those should already all be there

sleek steppe
gritty wind
#

linux and windows probably have the shortcuts

lunar hull
#

Hey, so I'm trying to contribute a feature to Python, but am a little unclear on what the steps to do it are based on the Devguide posted. The devguide says that my branch should be named with the issue number (and to create it if it doesn't exist). From what I understand I need to do this before I create my branch, commit and make a pull request. However on the New Issue page on the issue tracker it also asks me for a link to the PR, so I'm not quite sure which order to be doing things in

gritty wind
#

Hi, could you send a link to the page asking for the PR link?

gritty wind
#

ye

vale ibex
#

Do we want to update this to have both (poetry and pipenv) right now, or should we wait until we migrate site and bot?

gritty wind
#

I don't know if site will be migrated

#

I already updated the guide to both

#

check dev-log lol

vale ibex
#

oh lol, I won't update then lmfao

#

LOL I've also fixed the images

#

smh

#

guess i should have checked when i got back

#

oh well

gritty wind
#

I wonder if we have more broken images like that elsewhere

vale ibex
#

joe should have 404 logs

#

would be easier to look via those

lunar hull
gritty wind
#

Oh

#

You are looking at bug.python.org, which is for the python language itself

#

this is not for our projects

lunar hull
#

oh LOL

#

sorry

gritty wind
#

no worries

gritty wind
#

damn we are so close I can taste it

sleek steppe
#

site#501 if anyone wants to review

dusky shoreBOT
vale ibex
gritty wind
#

that is indeed true

#

I redid the screenshots

#

to add poetry

vale ibex
#

ahhhh kewl

gritty wind
#

you can see image diffs on git

#

just select the rich diff

dusky shoreBOT
short snow
gritty wind
#

in that screenshot, in the top right

#

there are two side by side buttons

#

click the one on the right

short snow
#

Oo, lemme see

#

Nice, tyy

patent pivot
#

bot#1582 looks good

dusky shoreBOT
gritty wind
#

I think we're ready to merge, but we probably want to get the guides ready first

patent pivot
#

Yeah

gritty wind
#

PR is ready for that, but it upgrades both sir-lance and python

patent pivot
#

What's the plan for lancebot? My PR bumps to 3.9 and poetry but I see there is another PR just for the py version bump

gritty wind
#

We'll merge yours, and I think the plan was to just close the 3.9 upgrade

#

it bumped a lot of dependencies for no real reason

patent pivot
#

gotcha

gritty wind
#

Main selling point was 3.9 anyways

patent pivot
#

yep

#

cc <@&409416496733880320> approval needed on sir-lancebot#623

dusky shoreBOT
vale ibex
#

Need a staff on site#502 too

dusky shoreBOT
patent pivot
#

I'll give that a look

#

yeah all looks fine there

#

alright dope

gritty wind
#

One more approval on sir-lance and all 3 can be merged

patent pivot
#

yeah

#

@green oriole are you around to sign off on sir-lancebot#623

dusky shoreBOT
green oriole
#

yessir

#

watch it all go down in flames now

patent pivot
#

lmfao

#

if someone can write up a dev announce as well that'd be pretty dope, otherwise I can write one up later/tomorrow

#

good work everybody

green oriole
#

I could do that although that'd be pretty unfair lol

patent pivot
#

scaleios is typing lol

gritty wind
#

you saw nothing

green oriole
#

so we are all migrated to poetry?

gritty wind
#

site is still pipenv

#

amongst a few other projects

#

but for python and sir-lance, we're all migrated

green oriole
#

Noice

vale ibex
#

πŸŽ‰

green oriole
#

!help

#

It is running πŸ‘€

vale ibex
#

We should write up a migration guide for contribs

#

and announce

green oriole
#

oh wait, not this one

gritty wind
#

Waaaay ahead of y'all lol

green oriole
#

.help

dusky shoreBOT
#
Command Help

AdventOfCode
.adventofcode
All of the Advent of Code commands.

AprilFoolVideos
.fool
Get a random April Fools' video from Youtube.

AvatarModify
.8bitify
Pixelates your avatar and changes the palette to an 8bit one.
.avatar_modify
Groups all of the pfp modifying commands to allow a single concurrency limit.
.avatareasterify [colours...]
This "Easterifies" the user's avatar.
.mosaic [squares=16]
Splits your avatar into x squares, randomizes them and stitches them back into a new image!
.prideavatar [option=lgbt] [pixels=64]
This surrounds an avatar with a border of a specified LGBT flag.
.spookyavatar [member]
Spookify an user's avatar.

green oriole
#

Uh oh @gritty wind

#

It failed

gritty wind
#

hmmm

#

reviewing now

#

we need git

#

ughhhh

#

or do we

#

I'll run some tests

patent pivot
#

uh

#

don't think we do

gritty wind
#

why does prod not exist

#

this is hell

patent pivot
#

hmmm

gritty wind
#

CI is hell

#

it's --no-dev

#

why was I using prod

#

I'm so confused what's happening ugghhhh

patent pivot
#

ohhh

#

was it uhhh

#

isn't that yarn

#

lol

gritty wind
#

uhhhh

patent pivot
#

hahahahaha yeah

gritty wind
#

I can neither confirm nor deny

#

but the docker file works fine locally

#

hmm

patent pivot
#

huh

#

old version of poetry?

vale ibex
#

lol

stable mountainBOT
#

Dockerfile line 16

RUN poetry install --prod```
gritty wind
#

I'll just update it and stop asking questions

vale ibex
#

oh yea, it's in the lint ci it doesn't

#

mb

sleek steppe
#

site#501 needs 1 staff/contrib review

dusky shoreBOT
gritty wind
#

did I not test the docker file

#

I'm so confused

#

I tested it with the compose

#

which may or may not have not actually rebuilt the image

vale ibex
#

docker-compose up

#

missed off --build

#

so it just used my old image

gritty wind
#

alright, tested it again

#

this time correctly

#

all things seem fine

#

hotfix incoming

vale ibex
#

When writing the PR takes longer than the fix

sleek steppe
#

lol

gritty wind
#

alright

#

1589

#

go do things

sleek steppe
#

Is there gonna be a dev announcement for the migration πŸ‘€

gritty wind
sleek steppe
#

ah ic

gritty wind
#

does git pull --all update forks

#

hmm

vale ibex
#

<@&409416496733880320> bot#1589 pls

dusky shoreBOT
patent pivot
#

lookin

vale ibex
patent pivot
#

donezo

vale ibex
gritty wind
#

I tested with an origin

#

that does work

vale ibex
#

cool

gritty wind
#

Please do if you've got a minute

vale ibex
#

mhmm

sleek steppe
#

@fervent sage we've upgraded to 1.7.2, so feel free to make the changes in your PR

gritty wind
#

nice

patent pivot
#

rock solid

gritty wind
#

We're a go for the announcement once we confirm the git pull works lol

vale ibex
#

had to do git pull upstream main

gritty wind
#

Hmm alright

#

That's fine too

#

thank you

vale ibex
#

!ping

stable mountainBOT
#
Pong!
Command processing time

75.362 ms

Python Discord website latency

0.843 ms

Discord API latency

116.167 ms

vale ibex
#

Nice

patent pivot
#

winner

eager fable
#

@patent pivot I'm sure you already know that we hit 200k members, when will the announcement come out?

gritty wind
#

I looked through the PRs again

#

did I miss anyone in the pings at the end

patent pivot
vocal wolf
#

@cold moon Hello, I hope you've been well. What's the status of bot#1487?

dusky shoreBOT
fallen patrol
#

@gritty wind smh

#

You have two tldrs in the same message

gritty wind
#

it's a complex topic

fallen patrol
vocal wolf
#

don't need it

gritty wind
#

have you ever stopped to consider how sane it would be to read every single message sent by a user for months

patent pivot
#

lul

vale ibex
sleek steppe
#

I'd say sir-lancebot#683 can be closed right?

dusky shoreBOT
fallen patrol
vale ibex
#

Yea, i think an issue should be made for bumping the versions of the deps though

gritty wind
#

i don't use big brother either

#

some do

fallen patrol
#

Or do people who get watched often get removed from it shortly?

#

Either by ban or by improved behavior

thorny obsidian
#

Big brother is used differently. I do use big brother and the goal is that a user's behavior either improves enough that we remove them or their behavior is poor enough that we remove them from the community.

vale ibex
#

I'm just making @vocal wolf's job harder

#

you better have an upto date list of merged PRs lul

vocal wolf
#

y u do dis

vale ibex
#

❀️

vocal wolf
#

what did you do

vale ibex
#

some bot, site and lance prs

fervent sage
#

oops i totally forgot about my async await tag creation kek

vocal wolf
#

oh snap

#

13 PRs on bot

fallen patrol
#

πŸ€”

#

pipx 0.16.1.0 has requirement importlib-metadata>=3.3.0; python_version < "3.8", but you'll have importlib-metadata 1.7.0 which is incompatible.

sleek steppe
#

Could we get sir-lancebot to 16 πŸ‘€? sir-lancebot#733

dusky shoreBOT
fallen patrol
#

trying to upgrade lance to poetry

sleek steppe
#

Are you using python 3.9?

fallen patrol
#

no

#

3.7 is my system python

sleek steppe
#

Well then, time to upgrade

fallen patrol
#

so i have to install poetry on the 3.9 python?

sleek steppe
#

yes

fallen patrol
gritty wind
#

you don't need to do that

#

as long as you can install the dep manager

#

if you can't install the dep manager at all, and it's a supported python version

#

it's a bug that should be raised with poetry

fallen patrol
#

ay now i know my path got fucked up

gritty wind
#

as for having python 3.9 on your system, that's the first thing in the announcement

sleek steppe
#

ah I thought it said somewhere that poetry has trouble with using a different version of python that it isn't installed with

gritty wind
#

Yeah, I said that

#

But that's a bit more complex than that

#

If you're on a system that supports pipx at all, poetry should actually be able to handle itself fine

#

if you can't install poetry at all

#

that's a completely different matter

vale ibex
vocal wolf
#

Yes of course hyperlemon

fallen patrol
#

works fine

#

@sleek steppe@gritty wind had to fix my path. I changed shells and fix it as it happens and pyenv wasn't on it

gritty wind
#

@vocal wolf two possible solutions. We change the commands that have time units (such as mute) to a more sane formatting, or we close the PR)

vocal wolf
#

You have 1 hour remaining hyperlemon

sleek steppe
#

I feel like we can just add \s to the eval help command

vale ibex
#

I think it's across a few commands

vocal wolf
vale ibex
#

eval was just used as an example

sleek steppe
#

ah

vale ibex
#

So we wanted a bot wide approach

gritty wind
#

Basically it currently uses something like

\u2003\`h\` - hours

The suggestion is to switch that format into regular line breaks around the units, so they'd look like:

\`y\` - years

\`m\` - monthsβˆ—

\`w\` - weeks

...

or an even better solution would be to add a <br> character, that is treated differently, so you'd get:

\`y\` - years<br>
\`m\` - monthsβˆ—<br>
\`w\` - weeks<br>
...
vocal wolf
#

oh jeez

placid ermine
#

formatting ok_handbutflipped

fervent sage
#

hahaha

gritty wind
#

idk man

sleek steppe
#

that looks bad lol

vocal wolf
#

That does look like more sane formatting (as far as I can tell)

gritty wind
#

fixed it for all you haters

vocal wolf
#

lmao

gritty wind
#

ima do that right now

sleek steppe
vocal wolf
gritty wind
#

well that's easy enough to do now

vocal wolf
#

With any new command we'd have to test if it doesn't explode within the help command

fervent sage
#

idk i think its more fun to play blind help command roulette mmLol

sleek steppe
#

!int e [await ctx.send_help(cmd) for cmd in bot.walk_commands()]

vale ibex
stable mountainBOT
#

bot/exts/moderation/voice_gate.py line 148

await ctx.author.send(embed=embed)```
vale ibex
#

Thanks πŸ˜„

sleek steppe
#

spring cleanup for bot when? πŸ‘€

vale ibex
#

IG on fail, send it to the voice channel and schedule delete

eternal owl
#

what do we want to do if dm is off

#

alright

vale ibex
#

lol had the same thought

eternal owl
fervent sage
#

haha

#

ha

#

ha.

vale ibex
#

1 more and you would have been auto-muted πŸ‘€

#

lol

fervent sage
#

ik

#

:)

#

my sarcastic has were carefully designed by complete accident

vale ibex
#

So, when using the docker-compose setup on the bot, it doesn't run the metabase migrations on the db

#

Has anyone solved this locally already?

patent pivot
#

you mean docker-compose?

#

wait

#

you mean metricity

#

brain moment

#

hmmm

#

yeah, we don't have the init script on bot

eternal owl
#

can you add a try-except inside an except block?

fervent sage
#

yep

eternal owl
#

thought so, but kinda looks weird, lol

clever wraith
vale ibex
clever wraith
eternal owl
#

I'm gonna make some code changes to avoid code redundancy/repeated code

#

@vale ibex

clever wraith
vale ibex
patent pivot
#

hmm yeah

vocal wolf
#

Look at them merge conflicts

vale ibex
#

Close + make issue to bump deps?

#

I think now is a good time to update them

vocal wolf
eternal owl
#

why are we doing this await self.bot.http.delete_message(Channels.voice_gate, message_id) instead of await message.delete()

#

in voice gate

gritty wind
#

probably something to do with reliability

fervent sage
#

doesnt require a msg object i assume

sleek steppe
#

yes, the delete_message endpoint only needs ID while Message.delete needs the object

eternal owl
#

should I be using that to delete trival messages?

fervent sage
#

if you have a msg object use message.delete()

fallen patrol
#

U can create an object with discord.Object tho

gritty wind
#

isn't there a partial message

sleek steppe
#

yes

eternal owl
#

I mean, if you have message_id, you can get the message object 😬

fervent sage
sleek steppe
#

!d discord.PartialMessage.delete

stable mountainBOT
#

await delete(*, delay=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Deletes the message.

Your own messages could be deleted without any proper permissions. However to delete other people’s messages, you need the [`manage_messages`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission.

Changed in version 1.1: Added the new `delay` keyword-only parameter.
fervent sage
#

huh

eternal owl
#

ah

#

so

#

we are avoiding an extra api call

#

smart

tough imp
#

its bc the ID comes from the cache

#

so you dont have the obj

#

and dont need it either

eternal owl
#

cool cool

sleek steppe
fervent sage
#

a discord.Object() is literally just a thing with a snowflake

#

nothing more nothing less

tough imp
#

be careful with the cog, its prone to race conditions due to having to check the cache often and relying on voice events which sometimes fire a few times in succession

tough imp
#

thats why the helpers enforce atomicity

eternal owl
#

I just made a simple change instead of changing the _delete_ping func to handle message IDs as well, as it would not make much of a diff

#

@vale ibex

vale ibex
#

Nice, I'll give it a look after this admin call

eternal owl
#

oki dokies

#

yes?

stable mountainBOT
#

if __name__ == '__main__'

This is a statement that is only true if the module (your source code) it appears in is being run directly, as opposed to being imported into another module. When you run your module, the __name__ special variable is automatically set to the string '__main__'. Conversely, when you import that same module into a different one, and run that, __name__ is instead set to the filename of your module minus the .py extension.

Example

# foo.py

print('spam')

if __name__ == '__main__':
    print('eggs')

If you run the above module foo.py directly, both 'spam'and 'eggs' will be printed. Now consider this next example:

# bar.py

import foo

If you run this module named bar.py, it will execute the code in foo.py. First it will print 'spam', and then the if statement will fail, because __name__ will now be the string 'foo'.

Why would I do this?

β€’ Your module is a library, but also has a special case where it can be run directly
β€’ Your module is a library and you want to safeguard it against people running it directly (like what pip does)
β€’ Your module is the main program, but has unit tests and the testing framework works by importing your module, and you want to avoid having your main code run during the test

vocal wolf
#

@clever wraith I think the PR may no longer be a draft, what do you think?

#

also ty for updating

sleek steppe
#

I think the tag should be updated to talk more about blocking, since that's what the tag is about

vocal wolf
#

it still be a draft

#

thank

fervent sage
#

poetry is love poetry is life

fallen patrol
#

faster.

#

Much faster.

fervent sage
gritty wind
#

if the tag isn't loaded during tests, it's an increase in line count without an increase in lines hit

fallen patrol
#

the coverage rating is how much of the code was covered by the tests

dry folio
#

hey, does anyone know what do these "conflicts" mean and how should i resolve them? thanks!

gritty wind
#

one branch has the content above the =====, and another branch has the content below

#

Git can't figure out how to merge these differences by itself

#

so you are expected to solve it yourself

#

imports are usually the easiest

dry folio
gritty wind
#

No,

#

you want to merge the content of both

dry folio
gritty wind
#

in this case, it's just going to be:

from bot.bot import Bot
from bot.constant import Colours, NEGATIVE_REPLIES, Roles```
gritty wind
#

that way the imports satisfy the code from both branches

dry folio
dry folio
sleek steppe
#

whatever change actually works

gritty wind
#

Yeah ^

#

Did you try updating your branch or something?

fallen patrol
dry folio
#

back to waiting for the last approval lol

fallen patrol
#

.source help

#

Sounds about right

sleek steppe
#

oh no

#

ah I see it

vocal wolf
#

@dry folio merged.

#

Thank you for the very large contribution!

fallen patrol
#

πŸ€”

fallen patrol
vocal wolf
#

no idea

patent pivot
#

lol

#

it's good

#

but ya prob should have policy of squashing if there are lint or fmting commits

sleek steppe
#

.source help

dusky shoreBOT
#
Help Command

A discord.ext.commands.Command subclass which supports root aliases.

Source Code
sleek steppe
#

^ It's getting the docstring for bot.command.Command, can I make a fix or it?

fallen patrol
fallen patrol
patent pivot
brazen charm
patent pivot
sleek steppe
#

I can write a fix for that one too

remote wigeon
#

laughs in rust

#

more like sadkek tho

brazen charm
#

!d inspect.unwrap

stable mountainBOT
#

inspect.unwrap(func, *, stop=None)```
Get the object wrapped by *func*. It follows the chain of `__wrapped__` attributes returning the last object in the chain.

*stop* is an optional callback accepting an object in the wrapper chain as its sole argument that allows the unwrapping to be terminated early if the callback returns a true value. If the callback never returns a true value, the last object in the chain is returned as usual. For example, [`signature()`](https://docs.python.org/3/library/inspect.html#inspect.signature "inspect.signature") uses this to stop unwrapping if any object in the chain has a `__signature__` attribute defined.

[`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError "ValueError") is raised if a cycle is encountered.

New in version 3.4.
brazen charm
#

When decorators (with inspect.update_wrapper) are used on the function object itself, it'll fetch the source of that instead of the actual command function. If you unwrap it it'll get to the right function through __wrapped__. I'm not sure if there's any deco present in lancebot that behaves like that now but it can't hurt when you're working around in the cog

sleek steppe
#

ah, maybe we could just use Command.short_doc?

brazen charm
stable mountainBOT
#

bot/exts/info/source.py lines 72 to 74

source_item = inspect.unwrap(source_item.callback)
src = source_item.__code__
filename = src.co_filename```
sleek steppe
#

ah that's what you mean

vale ibex
#

!remind 30M iceman's PR

stable mountainBOT
#
Yeah okay.

Your reminder will arrive in 30 minutes!

brazen charm
sleek steppe
#

I think it just wasn't changed when porting the source command, because it's using splitlines[1] when the doc string for the help command is one line

#

I think I'll remove the check since this looks fine

dry folio
dry folio
stable mountainBOT
#

@vale ibex

It has arrived!

Here's your reminder: iceman's PR.
[Jump back to when you created the reminder](#dev-contrib message)

eternal owl
#

I am still around if you need any more changes, chris

#

haha it was always like that until it melted for a short time

thorny obsidian
#

@eternal owlbtw not ignoring your DM, just getting my thoughts together so it's coherent

eternal owl
#

πŸ‘

eternal owl
#

hey @patent pivot, can I get an approval on this. It is regarding the soft delete of the off topic names. Implementation mentioned in the PR. Just making sure before I start working on it

patent pivot
#

having a look

eternal owl
#

ty

patent pivot
eternal owl
#

alright, will edit the issue description

vale ibex
#

Hmmm, how can I shove data into metricity for testing this command

#

Since I'm in docker, not sure how I can get the metricity bot to hook into it

#

might need to run it on the host

#

Think I'm just gonna manually insert into db

#

probably easier

patent pivot
tough imp
vale ibex
#

Yea, that's what I'm doing now πŸ˜„

tough imp
#

😌

#

theres also an init script in the site repo

patent pivot
vale ibex
patent pivot
#

easter egg in site#503 checks lol

dusky shoreBOT
vocal prairie
sleek steppe
#

How did I get rickrolled by clicking "Show all checks" Sadge

patent pivot
#

LMFAO

sleek steppe
#

I'm never clicking links again

patent pivot
#

my magnum opus, inserting rickrolls into our review requirement compliance checks

vale ibex
#

...

#

too powerful

fervent sage
patent pivot
#

lmfao

fervent sage
#

ive legit run links you sent before crosslink before to check

#

but now that ive told you that my technique will no longer work

sleek steppe
#

it literally said "check overridden by joe" I should've listened πŸ˜”

patent pivot
#

lmfao

fervent sage
#

12 prs on bot

vale ibex
#

8 of which are stalled/deferred/waiting on author/WIP

vocal prairie
#

Maybe we can get site to 0.

#

It's at 4 right now

vale ibex
#

hmmm site#474 and site#477 seem to be duplicates

vocal prairie
#

Opened by the same person too

vale ibex
#

or at least 477 is a subset

#

ahhh, their fork is deleted too

#

@patent pivot @gritty wind I see you both commented on the two above PRs, should we close them now that the fork has been deleted?

#

Yea, it doesn't really help that they lose order too

stable mountainBOT
#

bot/exts/evergreen/issues.py line 246

issues = set(issues)```
vale ibex
#

simple change really

fallen patrol
#

it used to note which was one

#

but it stopped noting which was which

fallen patrol
#

that format was better

vale ibex
#

Feel free to open an issue to solve the ordering and formatting

brazen charm
vale ibex
#

And could be useful elsewhere

#

Sure πŸ™‚

fervent sage
#

btw are you planning to implement the issue too?

#

pensivewobble kk

#

!d dict.fromkeys

stable mountainBOT
#

classmethod fromkeys(iterable[, value])```
Create a new dictionary with keys from *iterable* and values set to *value*.

[`fromkeys()`](https://docs.python.org/3/library/stdtypes.html#dict.fromkeys "dict.fromkeys") is a class method that returns a new dictionary. *value* defaults to `None`. All of the values refer to just a single instance, so it generally doesn’t make sense for *value* to be a mutable object such as an empty list. To get distinct values, use a [dict comprehension](https://docs.python.org/3/reference/expressions.html#dict) instead.
#

@clever wraith :white_check_mark: Your eval job has completed with return code 0.

['a', 'b']
fervent sage
#

so basically the dict is acting like an ordered set

#

since a dict can only have 1 value per key, setting it multiple times doesnt add new keys

#

and since iirc 3.6 dicts retain item order

#

when you call list you get the (ordered) keys of the dict, which are all unique

vale ibex
fervent sage
#

what're the chances of me making a PR that makes everything into a standard storage format, by which i mean:

  • turning the 3 yaml files and 1 txt file into json files like every other file
  • making the indentation in the json files consistent 😩
vale ibex
fervent sage
#

we dont have more_itertools

#

but if we did there's other places i can think of using it to shorten things

vale ibex
#

Yea it's a small package, I wouldn't mind having it

#

Could be useful

fervent sage
#

more itertools is one of those tiny things that so many people who need it dont know about

#

specificially more_itertools.chunked()

vale ibex
#

Oh yes

fervent sage
#

@patent pivot as of the no-opt-out pr metricity no longer has any commands, given that, is it cool if I make a PR:

  • removing bot_commands_channel config option, it's now redundent
  • removing command_prefix config option, there are no commands, prefix now set to ""
  • adding help_command=None to the contructor, else you just get this:
patent pivot
#

eventually

#

we might like

#

add commands to metricity to pull out charts

#

but for now, that sounds wise

fervent sage
#

tfw you make a quick commit and it takes 10x longer because you accidentally spell import as impoty and have to fix it blob_pain

patent pivot
#

lmfao

sleek steppe
#

Shouldn't we just use discord.Client if we aren't using the commands extension?

patent pivot
#

toxic making more work πŸ˜”

fervent sage
#

can you think of that 5 minutes ago please :)

patent pivot
#

eventually we will use commands

fervent sage
#

thats a good enough reason for me, no point changing it again mmLol

short snow
dry folio
patent pivot
#

hmmmm interesting

dry folio
#

but also, WE GOT MERGED BEFORE 200! WOOHOO

patent pivot
#

next time you are playing with bot, try run poetry install and poetry run task precommit

short snow
#

So i want to run this command before loading all the extensions, which is the best way I can do that?

#

umm, like htis?

fallen patrol
#

πŸ‘€ apparently I'll be continuing progress on the colors issue very soon

#

sorry i've been distracted and also trying to graduate from high school

vocal prairie
patent pivot
#

yeah, migrated as of a few hours ago

dry folio
#

Lol prolly won't be too long tbh

#

I'll do it tmr

patent pivot
#

yeah it's not too big of a task

vocal prairie
patent pivot
#

yeah

dry folio
#

WAIT WAT IT'S THAT SIMPLE?!

#

Wow, i really overestimated the complexity

#

I thought I'd have to do a lot of manual crap

#

Thanks @vocal prairie and @patent pivot

patent pivot
#

πŸ‘

vocal prairie
stable mountainBOT
#

@short snow

It has arrived!

Here's your reminder: do it.
[Jump back to when you created the reminder](#dev-contrib message)

patent pivot
#

hmmm

#

is that the dependencies PR

fervent sage
#

sleep schedules SadCatThumb

short snow
#

according to the discussions did yesterday

patent pivot
#

yeah I don't think we should pursue dependency upgrades like that

short snow
#

(for me)

#

alright, close the pr?

patent pivot
#

I'll get a consensus from core devs and then close based on that or let you know otherwise

subtle kraken
vocal wolf
#

Thank you for the update

#

good luck with school

subtle kraken
#

how do you answer so fast

#

wow

vocal wolf
#

am writing boring essay

subtle kraken
#

good luck friend

vocal wolf
#

u2

dry folio
#

nightmarish

clever wraith
#

yo guys

#

i opened a issue about a anagrams minigame but no explicit approval / denial

gritty wind
#

damn chris

vale ibex
#

ah lol, you got in there just a few seconds before me

gritty wind
#

We should really consider just pinning all these ideas in one place so they can stop being suggested

#

Ask tag, OSS channel

#

Probably 90% of suggestions for the help channels

vale ibex
mellow hare
#

@vale ibex I'm trying to understand what change you wanted on bot#1587

vale ibex
#

delete the two lines I marked, since the message is already being deleted in the lines I linked

#

otherwise the bot errors out, since 2 parts of the code try to delete the same message

#

Sorry if that wasn't clear in the comment

mellow hare
#

Gotcha, okay

#

That's what I figured

vale ibex
#

I've update the comment anyway

#

hopefully it's more clear now

#

I did test further after making that change locally and it all looks good

clever wraith
#

@sleek steppe , regarding your review, bot.Bot and bot.bot.Bot both fail, should i keep as commands.Bot?

sleek steppe
#

What do you mean by "fail"?

#
from bot.bot import Bot
clever wraith
#

shit

#

im super dumb

sleek steppe
#

Also since we migrated to poetry, I think you need to run poetry lock since you updated dependancies

clever wraith
#

i did

#

i made sure

sleek steppe
#

Well, it isn't in your changed files

clever wraith
#

I havent committed that yet

#

also @sleek steppe Commands.BadArgument does not accept an embed

sleek steppe
#

I said that the error handler catches it

clever wraith
#

it catches but it wont let me use the embed

#

oh wait nvm

clever wraith
#

any changes you asked for have been made toxic

green oriole
#

don’t make toxic changes D:

vale ibex
#

lol

clever wraith
fervent sage
vale ibex
#

Looks like the git actions concurrency change is working nicely πŸ˜„

sleek steppe
#

ah I was interested what that colour was about lol

vale ibex
#

I made a change on Saturday, so git actions are cancelled if a new commit on the same PR comes in

#

since we don't care about that action any more, we only care about whether the new action passes/fails

#

limited to lance right now, just to test the waters

stable mountainBOT
#

.github/workflows/build.yaml lines 11 to 13

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true```
clever wraith
#

Alright @sleek steppe , finished review(again)

sleek steppe
#

It's still gonna raise Exception if you pass an empty string, so maybe you should change it to if not text.strip()

granite plaza
#

Do i need to change anything from my recent pull request because of the recent change in #dev-announcements?

sleek steppe
#

Nah, you're good

granite plaza
#

K that's what i thought but wanted to make sure.

sleek steppe
#

But you still need to resolve merge conflicts

granite plaza
#

I dont understand how to read the conflict log thing.
This is what was highlighted

<<<<<<< http_status_command_randomness
=======
from bot.bot import Bot
from bot.utils.extensions import invoke_help_command

>>>>>>> main
clever wraith
#

@sleek steppe actually no, if there isnt any body given, it sends a default message

clever wraith
sleek steppe
granite plaza
#

ok πŸ‘

clever wraith
#

thanks toxic, can people review sir-lancebot#699

dusky shoreBOT
mellow hare
#

I swear to god, I can never figure out how to properly make a multi-line review comment work

clever wraith
#

you have to drag click

sleek steppe
#

You drag down on the side of the line where the + is

clever wraith
#

why cant you use ctrl+click to select multiple lines

mellow hare
#

Right and that works within the GitHub one

#

But it doesn't work quite right in the PyCharm integration

short snow
#

Yeah, on pycharm it is not supported ig, never figured it out

sleek steppe
#

Doesn't work for me on the vscode github extension either

short snow
#

Oo, I need to complete my review on cowsay

stable mountainBOT
#
Missing required argument

content

short snow
#

!remind 11h do now

stable mountainBOT
#
Absolutely!

Your reminder will arrive in 11 hours!

green oriole
#

Hey, that’s a good first start

fervent sage
#

Yesterday I was setting up metricity for my server and I found some stuff in metricity that didn't need to be there while doing config so I made a pr to remove it and totally forgot to keep setting it up for my server KEKW

green oriole
#

Hah

vocal prairie
#

Hey, at least it was a good contribution

#

That's a good thing

gritty wind
#

Yeah

short snow
#

Yes

gritty wind
#

We never really discussed it

vale ibex
#

I don't see any reason not to

gritty wind
#

The conversation was always in the context of the btos

#

but yeah, what chris said

vale ibex
#

It'll simplify the contrib guide too

gritty wind
#

yuuuup

vocal prairie
#

Setting up the site with Docker is so easy, but with pipenv it can be a little more complicated, so this would be nice.

sleek steppe
#
snekbox/nsjail.py:181:101: E501 line too long (113 > 100 characters)

πŸ˜”

#

why is it even 100?

short snow
#

up and then -d

#

I think so

vocal prairie
#

docker-compose up -d

#

You need to modify your hosts file first though

short snow
#

0.0.0.0:8080 mapped to pythondiscord.local

#

it’s on the site docs iirc

gritty wind
#

You don't actually need to do that for the site

sleek steppe
#
snekbox/nsjail.py:181:101: E501 line too long (101 > 100 characters)

πŸ˜”

gritty wind
#

It's more for the bots

vocal prairie
#

Going to 0.0.0.0:8000 doesn't work for me

gritty wind
#

the bots can't access something like api.localhost, but your browser should be able to

sleek steppe
gritty wind
#

Yeah ^

#

or localhost

vocal prairie
#

Oh, I should do that

gritty wind
#

Anyways, it's easy enough to do and get out of the way

sleek steppe
short snow
#

No /etc/hosts

vocal prairie
#

You don't even need it if you're running with Docker apparently

short snow
#

Or something similar, don’t remember the file name

gritty wind
#

It's linked in all the contributing guides

#

That should be it

#

yeah

short snow
#

Yeah just write it towards the end

stable mountainBOT
#

.flake8 line 7

max-line-length = 100```
gritty wind
#

the other projects do use 120

sleek steppe
#

yeah, I was wondering why it isn't 120 like the other projects

gritty wind
#

hit save and you're good

vale ibex
#

There may be more to it, since we want to move to 3.9 at the same time

#

the site was previously on 3.9, but we had to downgrade

#

I'd prefer if you leave that to us for now

#

It was a hotfix, rather than linked to a PR, so we're still trying to figure out why it was needed

#

since it was done a few months ago

#

So we're just going to look into why the downgrade was needed, and if its still an issue

vocal prairie
#

If you want something to do something on the site Rick, site#459 would be nice to have

dusky shoreBOT
gritty wind
#

Could you take a screenshot?

#

Can't say I've run into that

#

Have you tried the support forums?

#

what address did you go to, and what's the output of docker container ps

vocal prairie
sleek steppe
#

yes

vocal prairie
sleek steppe
#

ah

gritty wind
#

πŸ₯³

vocal prairie
#

Depends on what you want to do in the site

#

But probably not, most of what you need shouldn't be much more than the template language and knowledge of html/bulma

short snow
#

Then not really, but you should know have basic django knowledge

vocal prairie
#

Yeah, but the thing where it renders the markdown is what you want

#

Why do you need it for admins only?

#

That button should appear for everyone

#

Not everyone has write access

#

See ya Rick

sleek steppe
#

@vale ibex shouldn't we update the site in this PR to say poetry intead of pipenv in the guides?

stable mountainBOT
#

pydis_site/apps/content/resources/guides/pydis-guides/contributing/installing-project-dependencies.md line 23

5. If installing dependencies for the site, click `​Pipenv Environment`​, otherwise, click `​Poetry Environment`​, then click `​OK`​.```
vale ibex
#

Yes, we should πŸ˜„

sleek steppe
#

Also snekbox#108 πŸ‘€

dusky shoreBOT
gritty wind
#

I could get you updated screenshots

vale ibex
#

Yes please πŸ˜„ I don't use pycharm

gritty wind
#

okey

#

did you push the branch yet?

vale ibex
#

I have

gritty wind
#

oh right

#

I have the PR open lmao

vale ibex
#

lol

sleek steppe
#

lol

vale ibex
#

but if you push to branch you lose voting rights lol

#

ah, it doesn't matter anyway, since we need devops

gritty wind
#

I'll just send you the screenshot lol

vale ibex
#

kk

gritty wind
#

time to test my migration guide

vale ibex
#

lol

#

Do you use a fork? πŸ€”

gritty wind
#

nah lol

#

plus pycharm can just pull in PR branches with one button

vale ibex
#

That's what aliases are for πŸ˜„

#

git cpr 505

#

easy

gritty wind
#

hahaha

#

I'll be back once the install is done

vale ibex
#

cpr = "!cd ${GIT_PREFIX:-.} && git fetch origin refs/pull/${1}/head && git checkout FETCH_HEAD #"

sleek steppe
#

gh pr checkout 505

vale ibex
#

!e print( len("gh pr checkout 505") - len("git cpr 505") )

stable mountainBOT
#

@vale ibex :white_check_mark: Your eval job has completed with return code 0.

7
vale ibex
#

smh 7 precious key stokes longer

sleek steppe
#

cpr = "gh pr checkout"

vale ibex
#

lol

vale ibex
#

takes like 10s for me lol

gritty wind
#

I can count the KBs of my internet speed on my hands

#

It'll take a minute

vale ibex
#

ah lol

#

Just download the internet shrugR

gritty wind
#

My god, you are a genius

fallen patrol
#

πŸ˜„

vale ibex
#

nono, it's cpr, so I'm saving it

#

I've updated the docs now anyway, so just need to drop in the images

#

gonna head out to the shop to buy some ingredients now though

#

back in 20

gritty wind
#

you can copy this straight into the root directory, and it'll work as expected, but you may also wanna rename the file from pipenv

granite plaza
vale ibex
#

Lmfao

stable mountainBOT
#

bot/exts/evergreen/status_codes.py line 16

def __init__(self, bot: Bot):```
granite plaza
#

weird. my version had def __init__(self, bot: commands.Bot):

clever wraith
gritty wind
#

Oh yea, sorry about that. I'll DM you the number for Microsoft support, and they should be able to fix it remotely for ya

clever wraith
#

hey thanks

#

how convenient, it seems to have also installed teamviewer

vale ibex
#

Smh, you're really gonna make me download winrar aren't you πŸ˜…

gritty wind
#

I'll send you the raw images lol

vale ibex
#

If I get an email from the licence police its on you πŸ˜…

clever wraith
gritty wind
#

do you legitimately not have any archiving software lmao

vale ibex
#

Oh I didn't realise 7zip supported rar files

#

Lol

#

I'm not at pc anyways

clever wraith
#

or rather the xml

vale ibex
#

Lol

clever wraith
#

well im gonna go for a walk before class, see yall later

gritty wind
#

laters

granite plaza
dusky shoreBOT
sleek steppe
#

yeah, a core dev has to approve before this gets merged

vocal prairie
#

Noice

#

What page is that?

#

The site uses Bulma just so you know

#

It shouldn't be too much css

fallen patrol
#

@vale ibex btw when you update the guide, snekbox still uses pipfile

#

anyways, i can't start my snekbox

sleek steppe
#

a lot of our projects still use pipenv

fallen patrol
#

ik what you meant smh

vocal prairie
#

Yeah uh, I realized I was talking to the wrong person

fallen patrol
#

however, i can't start it regardless

gritty wind
#

Pipenv is not used by any projects in the contrib guides

#

Namely: lance, site, bot

fallen patrol
#

okay so anyways how do i start my snekbox

vale ibex
fallen patrol
#

😳

#

how do i update docker compose*

gritty wind
#

strip the path, and replace it with github prefix

vale ibex
fallen patrol
#

That feeling when you realize you use debian so everything is out of date all of the time

#

debipain debian lol

gritty wind
#
- https://pythondiscord.com/pages/guides/pydis-guides/contributing/
+ https://github.com/python-discord/site/tree/main/pydis_site/apps/content/resources/guides/pydis-guides/contributing```
#

hmm

#

can probably get you a better diff than that

#

Site prefix: https://pythondiscord.com/pages
Github prefix: https://github.com/python-discord/site/tree/main/pydis_site/apps/content/resources

vale ibex
fallen patrol
#

apt

#

lol

gritty wind
#

Is that the banner?

fallen patrol
#

probably

gritty wind
#

We wanted to remove it completely

fallen patrol
#

that should honestly be expedited

gritty wind
#

we removed it on desktop

vale ibex
#

ugggh pain

gritty wind
#

it's there on mobile

#

wtf lol

fallen patrol
vale ibex
#

there aren't new lines between the images

#

and since the middle one is smaller than width, it's in-line with text

gritty wind
#

yeah just remove that lol

#

do you want a different size?

patent pivot
#

we should try make the timeline visible in some other way on mob

vale ibex
#

nah, it'll likely be an issue on different sizes anyway, I'll just throw in line breaks

gritty wind
patent pivot
#

but probably not through that banner thing

gritty wind
#

just remove 100

vocal prairie
patent pivot
#

yeah, but we can make it more visible than navbar

#

I would have thought we can pivot this to have that righthand box on mobile as well

fallen patrol
patent pivot
#

yeah, that sounds wise

vocal prairie
#

Does Bulma support css grid format? I'm trying to line up the event boxes on the event page

#

Yup, that's a Bulma thing

fallen patrol
#

heads up if you send so many seperate messages you'll be muted automatically

vocal prairie
#

is-hidden-mobile I think, lemme check

#

Yeah, it's is-hidden-mobile if you want Desktop only

fallen patrol
#

lol @vale ibex now its worse. Much worse.

vocal prairie
#

Much better

patent pivot
#

it has django admin, we just disabled it

#

we did have discord auth

vocal prairie
#

The site is migrating to FastAPI right?

patent pivot
#

It is, yeah

#

FastAPI w/ SQLAlchemy iirc

vocal prairie
#

Hmmm. How do I make this not look ugly

#

The events page redesign

#

I know they all look like the same thing

#

But my problem is that the things are stuck together

dusky shoreBOT
vocal prairie
#

If you want to you can

#

But I'll fix it anyway

#

I know how to do it

#

But columns aren't really responsive enough

#

CSS grid would be better

#

Uh, just changing the size of the window

#

I use Chrome

#

And it's inbuilt mobile feature too

#

Maybe I'll manually implement breakpoints and use that for columns

#

Nah, Bulma has breakpoints built in

#

The only thing is the "Show More" button

clever wraith
#

hey, looking for a good issue as a first time contributor for the bot repo

#

any good ones to try out?

vale ibex
#

That's annoying

#

adding line breaks restarts the numbering

#

is there md syntax to make it not?

patent pivot
#

@fervent sage the tag content looks great, but I think that now we've got the guides pipeline unblocked on site we said a while ago that we'd do short tags on bot and if they needed longer form content we'd link to a guide on site instead of having huge embeds on Discord. We're more free with site guides as we can have sections with a ToC, images and so on (example: https://pythondiscord.com/pages/guides/python-guides/mutability/). Would you be willing to convert the proposed tag to a guide and then shorten the bot tag to link through to the site?

sleek steppe
dusky shoreBOT
clever wraith
#

alright

patent pivot
#

I think modpings might be a bit too low level for a brand new contributor

stable mountainBOT
#
You got it!

Your reminder will arrive in 2 hours!

clever wraith
#

id be fine, except ive no idea how to work with redis

patent pivot
#

ty vco very pog

placid ermine
#

speaking of tags
I suggested this a few days ago in #community-meta, could we have a tag for why eval/exec shouldn't normally be used?

#

psvm said nedbat has a blog post about this

dusky shoreBOT
patent pivot
patent pivot
placid ermine
#

yeah

patent pivot
#

hmm

#

i'm not sure about bot#1111

dusky shoreBOT
patent pivot
#

We already have pretty much what we'd put at the top of an ask tag in the help embeds

clever wraith
#

damn that was one i was considering

patent pivot
#

yeah, your comment was what prompted my thinking, apologies

#

but yeah, it's less so the content of the ask tag, and more how it is used

#

when we had an ask tag we just constantly saw things like !ask @user with no preample

fervent sage
patent pivot
#

yeah for sure

#

sections, images, other markdown features are all fine in guides

#

you get a ToC autogenerated so you can split it logically and have it longer

clever wraith
#

joe, for bot#1588, im assuming id be using async-rediscache. Where are the docs kept for it?

dusky shoreBOT
patent pivot
clever wraith
#

alright, thanks!

#

ill give bot#1588 a try

dusky shoreBOT
patent pivot
#

πŸ‘, if you leave a comment there then I can assign you

clever wraith
#

actually looking at the command i think its beyond my ability atm

patent pivot
#

that's fine, feel free to take another look, or maybe look at lancebot issues as well

clever wraith
#

i decided to look at bot#1316

dusky shoreBOT
vocal prairie
#

That sounds like it would be tag, not a normal command

clever wraith
vocal prairie
#

πŸ€·β€β™‚οΈ

clever wraith
#

hey, dockers being pissy with the bot, telling me that docker is not started. what am i supposed to do?

green oriole
#

sudo systemctl start docker

#

If you are on Linux

vocal prairie
#

If you're on Windows, just open Docker Desktop

clever wraith
vale ibex
#

will need a devops review

patent pivot
#

devops

#

i am devops

sleek steppe
#

yes

gritty wind
#

left a comment on the PATH tag

#

Could a core dev look at it and remove the planning label?

#

(bot#1316)

dusky shoreBOT
brazen charm
#

Isn't there a tag for it already?

vale ibex
#

There's uhh

#

!venv

#

!t

stable mountainBOT
#
**Current tags**

Β» voice-verification
Β» windows-path
Β» with
Β» xy-problem
Β» ytdl
Β» zip

vale ibex
#

!windows-path

stable mountainBOT
#

PATH on Windows

If you have installed Python but you forgot to check the Add Python to PATH option during the installation you may still be able to access your installation with ease.

If you did not uncheck the option to install the Python launcher then you will find a py command on your system. If you want to be able to open your Python installation by running python then your best option is to re-install Python.

Otherwise, you can access your install using the py command in Command Prompt. Where you may type something with the python command like:

C:\Users\Username> python3 my_application_file.py

You can achieve the same result using the py command like this:

C:\Users\Username> py -3 my_application_file.py

You can pass any options to the Python interpreter after you specify a version, for example, to install a Python module using pip you can run:

C:\Users\Username> py -3 -m pip install numpy

You can also access different versions of Python using the version flag, like so:

C:\Users\Username> py -3.7
... Python 3.7 starts ...
C:\Users\Username> py -3.6
... Python 3.6 stars ...
C:\Users\Username> py -2
... Python 2 (any version installed) starts ...
gritty wind
#

Ah

#

The issue is a bit different

#

It's specifically about how to add to PATH

#

but I don't particularly think it's needed either way

#

since my advice is rerun the installer and select the option

#

which can be typed out in 5 seconds

brazen charm
#

There is a script that comes with python that can be used to do it without reinstalling (on win), may be good to note in a tag. But with path issues there's usually more to it than just adding python's folders to path

clever wraith