#dev-contrib

1 messages Β· Page 113 of 1

dry folio
#

which makes it more complicated

#

so the dynamic questions first take out the dicts from json

#

then formats those strings

#

for example, it gets "{} + {} equals?" and "{}", then formats accordingly using dynamic_id's corresponding function, which returns them back formatted (but in a dataclass instance)

#

i understand that this can be confusing. i will change the dataclass name to FormattedQuizEntry.

celest charm
#

nononononononono

dry folio
celest charm
#

do you see what the issue is?

dry folio
#

i thought it's just that there's confusion

#

between quiz entries fetched from json and quiz entries returned by format funcs

#

@vocal prairie sent .0 at 4:03 PM

vocal prairie
#

I accidentally hit my numpad, ignore me. :poof:

dry folio
#

meanwhile, fix error is typing out an entire essay

celest charm
#

Inside of the cog, you do the following things:

  1. parse the quiz entries from the JSON
  2. keep track of the game state
  3. send questions
  4. watch for answers
    it's a little bit crowded.

So what I would do is extract the quiz entry parsing, formatting etc. into a separate place.

#

For example:

@dataclass(frozen=True)
class QuizEntry:
    id: int
    question: str
    answers: List[str]
    hints: List[str]
    
    @staticmethod
    def from_json(json_entry: Dict[str, Any]) -> "QuizEntry":
        dyn_id = json_entry.get("dynamic_id")
        if dyn_id is not None:
            formatter = DYNAMIC_QUESTIONS_FORMAT_FUNCS[dyn_id]
            q_template = json_entry["question"]
            a_template = json_entry["answers"]
            question, answer = formatter(q_template, a_template)
            answers = [answer]
        else:
            question = json_entry["question"]
            answer = json_entry["answer"]
        id = json_entry["id"]
        hints = json_entry.get("hints", []
        return QuizEntry(id, question, answers, hints)

you can also imagine putting logic for deciding if an answer is correct into here.

#

but that's another non-small refactoring

dry folio
dry folio
# celest charm but that's another non-small refactoring

yeah... what do you suggest i do? i want to leave the refactoring for another pr but that feels a bit irresponsible lol
it's just that this is kinda starting to go beyond my scope of knowledge (and determination and brain power)

celest charm
dry folio
# celest charm It's fine to not do everything at once πŸ™‚

thank you so much for understanding. i'm pretty conflicted cuz one i want to get this pr merged so i can finally try it out on sir lancebot but two i don't want to decrease the code's quality just because i'm eager and i try to do everything as best as i could. so for now you think we can leave this refactoring?

celest charm
#

sure

#

it's just important to keep track of what parts of code might need to be split up into more pieces

fervent sage
#

would be cool if we could have the code embedding but with diffs

#

wonder how hard that'd be

vale ibex
#

oh Sadge

#

I thought fix was a core dev so updated my branch and went to merge it

celest charm
#

lol

#

no I'm just a nobody

#

I just nitpick on people's hard work as I said

vale ibex
#

πŸ˜„

granite plaza
#

Im trying to do my testing for the bot. I have python 3.8 but it seems that I only have pipenv for python 3.7. Would this still work? If not how can I get pipenv for 3.8?

dry folio
celest charm
#

done

celest charm
#

maybe I should find how to extract methods from here

#

oh wait, this method doesn't even return anything?..

#

oh, I can't run unit tests without the database running?

#

that's... concerning

dry folio
#

one more core dev approval then we doneeee

#

sir-lancebot#726

sleek steppe
#

Do you have any ideas on what could be broken up?

#

Also I like how the additions and deletions are close together

celest charm
#

I am thinking of that right now

#

was busy with the other PR

#

So the cog is responsible for this, right?

#

.help

#

Wait... why is it accessing the private paginator._linecount variable?

#

sounds fishy

sleek steppe
celest charm
#

ok. this method is pretty hard to refactor.

dry folio
#

why is #dev-voice locked? can only contributors and above be in it?

celest charm
#

this method is a good lesson on why mutable state makes it hard to reason about programs.

sleek steppe
dry folio
celest charm
#

And this is an example of how comments become stale. Someone inserted the try-catch in a rush.

#

So this is what I came up with @sleek steppe:
https://paste.pythondiscord.com/uziyekanij.py
I think it became much more understandable. Haven't tested it, though πŸ˜›
So if you think it's worth encorporating, encorporate it (also change the quotes and stuff)

dry folio
celest charm
#

I'm old, I can use the archaic

dry folio
#

apparently "encorporate" is a word, just old

dry folio
celest charm
#

I already ignore punctuation and grammar to such an extent where [i/e]ncorporate doesn't really matter

dry folio
#

approaching 200... the record is 229 iirc lol

green oriole
#

That's not a record you should try to break haha

patent pivot
vocal prairie
#

How do you set DEBUG to false in site? I'm trying to test PR #486, but I need to be able to see the error page.

#

I'm running with Docker on Windows, if that matters.

#

This is what is says right now

sleek steppe
fallen patrol
dry folio
dry folio
clever wraith
fallen patrol
#

Notion api went into a public beta today

granite plaza
#

I have tested my new code is there any specific tests that i should try before subbitting the pull request?

gritty wind
#

This is @stable mountain?

granite plaza
#

@dusky shore

gritty wind
#

Just the lint should be enough

#

pipenv run lint

granite plaza
#

k thanks

short snow
#

Tests are only there on site and @stable mountain, not on lance

dry folio
granite plaza
#

Ok. I made a new branch on my fork but when I go to start the pull request it is comparing it with the main branch of the parent repository. IS this ok?

Also i accidentally committed to the main branch of my clone. I think i reverted it but im not sure. It still shows up as a commit but I think it changed what branch it was on im not entirly sure.

clever wraith
dry folio
granite plaza
sleek steppe
vale ibex
#

Also if you want a random true/false you can do this instead ```py
from random import random
if random() > 0.5:
do()
else:
dont()

#

I find it easier to read at least

sleek steppe
#

I would do

from random import choice
func = random.choice((self.func1, self.func2))
vale ibex
#

yea, that makes more sense

placid ermine
#

func = (self.func1, self.func2)[random() > 0.5] to make you both happy

clever wraith
#

Eww had to use Windows update

fervent sage
#

here's a smaller version of the gif for you so it takes up less space :)

clever wraith
#

watching both in sync

vocal prairie
#

Can someone unload the latex cog?

vale ibex
#

Done

vocal prairie
#

Ty

dry folio
#

now i have to await it to go back in sync

sleek steppe
clever wraith
#

hehe

short snow
#

I can update that in a while

#

if you want

sleek steppe
#

There aren't any cogs in that file though?

short snow
#

um one sec lemme see

#

ah my bad, its full file

sleek steppe
#

Ah ok

patent pivot
#

heads up

#

about to merge dewikification

#

need to manually override policy bot because it breaks on >250 commits (GH limitation)

sleek steppe
#

noice

short snow
vale ibex
#

This gonna be good

patent pivot
#

deployment will take a few mins

#

it rolls

#

deployment started

vale ibex
#

Nice

short snow
#

nice, is api now going to be removed from site? and be migrated to the fast api one?

vale ibex
#

not as part of these changes

#

This is dewikifiction

#

IE moving all pages into src control

patent pivot
#

there are three major changes being made to site: dewikification, api migration and logs migration

#

so this is 1/3

#

okay it's starting to go live now

vale ibex
#

and thats it right?

patent pivot
#

I'll clear upstream cache once it goes green

short snow
patent pivot
short snow
#

the log view project den was doing?

#

ah ye

patent pivot
#

allllllllllright

#

deploy complete

#

cache purged, should be ready in 30s

vocal prairie
#

So wiki freeze is over?

patent pivot
#

yep

#

we'll announce it shortly

vocal prairie
#

eyy

thorny obsidian
#

Yo wait really?

vocal prairie
#

It deployed I think

thorny obsidian
#

@exotic ember you're awesome

vocal prairie
#

Fancy symbols

short snow
#

we need to update the discord icons on guides

patent pivot
#

it has deployed now, yes

patent pivot
thorny obsidian
#

😎 Time to re-do our event pages
... after I finish my final 😒

vocal prairie
#

Good luck!

short snow
#

gl, the new guides are awesome, especially the table of contents 🀟

vocal prairie
#

On the events page, this probably needs to be changed since it says 2020 is upcoming.

patent pivot
#

ya

#

we can

#

prob wait

thorny obsidian
#

mhm, after I submit my final today I'll be going through and updating that stuff

short snow
#

events calender is a thing now? Or still to be done

thorny obsidian
#

Our event pages in general need a slight re-do. We're not advertising what we do as well as we could

#

And yeah, I need some sort of event calendar but I need to think about the best way to display it

#

a month-by-month won't necessarily be the best way

short snow
#

like notion's calender view?

#

site#188 there is a issue open on this

dusky shoreBOT
thorny obsidian
#

nah, Notion's is not that helpful since we don't have weekly events. We typically have a big thing each month

short snow
#

Yeah, a month wise, but in squares or line by line?

thorny obsidian
#

I have an idea of what I want, just need to make sure it's feasible

short snow
#

and the idea is?

sleek steppe
#

yes

fervent sage
#

beautiful now i can fix a thing on site

#

this has annoyed me for 3 weeks :P site#488

dusky shoreBOT
stable mountainBOT
#

config-default.yml line 19

use_fakeredis: false```
sleek steppe
#

Sadge it merged

patent pivot
#

oh

#

that's a good point! hahaha

#

reverting

brazen charm
#

Guess it depends on which bot you look at

patent pivot
#

this is taken from the bot docs

fervent sage
#

config file considering it's just referred to a .env file strongly suggests that its referring to .env

sleek steppe
#

You could change it to config.yml maybe?

patent pivot
#

not a bad shout

dusky shoreBOT
patent pivot
#

will do it in my PR toxic

fervent sage
#

another fuck up from vco

#

today gets better and better

thorny obsidian
#

go for it

#

can you comment so I can assign you?

patent pivot
#

done

thorny obsidian
#

(Dawn you're busy with forms and if you'd like to work on site front end stuff I have some tasks for you :3c)

#

yeah

#

We have channels for each of our larger projects that requires for back and forth convo

#

locked to staff only (mostly) for the time being since they're fairly important and most aren't ready to accept contributions from outside staff

vocal prairie
#

Why is the privacy policy kept in Notion instead of on the site?

thorny obsidian
#

That's a question for joe

patent pivot
#

super fast for me to edit it, i'm the only one that ever touches the policy

#

ya, was just checking that was the site you were on abouut

hard crest
#

which is the current website for the changes are live as of now?

sleek steppe
#

Should bot#1580 be transferred to lancebot repo/closed?

dusky shoreBOT
fervent sage
#

closed imo

hard crest
patent pivot
#

no lol

vocal prairie
#

Those are shields, aren't they?

patent pivot
#

we use github ones

granite plaza
#

sir_lancebot#733
I updated the code here but it says a failed one of the checks. I think that was when i pushed the faultily code and just has not been rechecked but im not sure could someone confirm please.

#

sir-lancebot#733

dusky shoreBOT
sleek steppe
patent pivot
#

ah

#

actually out of interest @sleek steppe does it allow you to approve that

sleek steppe
#

yes

patent pivot
#

noice

granite plaza
#

Oh ok.

sleek steppe
#

I'm a maintainer verycool

patent pivot
#

linting passed πŸ™‚

#

review left, mainly surrounding docs

granite plaza
#

There we go, sorry again its my first pull request πŸ™‚

thorny obsidian
granite plaza
#

Thanks

thorny obsidian
#

This is vaaaguely what I'd like to do for the events page. Although it may be too dynamic for what bulma + html can do. Still have to do research into to.
But I want it to be clear that we do a variety of events and I want to make sure we have a strong call to action for joining the events.
The following things should be clear:

  • What events we host and when they happen
  • How to join said events
  • Basic + required info for events
#

Yeah, I'm debating it. On one hand I like that some events are on their own pages so we can maybe have a summary for each and have super detailed info there without it overloading this page. But some pages would then be super light or just link to an external website

#

but... but... my consistency! (That's a valid point though)

granite plaza
thorny obsidian
vocal prairie
thorny obsidian
#

How familiar are you with django/jinja + bulma?

vocal prairie
#

Idk much Django/Jinja, but I've used Bulma.

#

But Django and Jinja are supposed to be rather straightforward, and they're not to hard to understand

thorny obsidian
#

This can be a learning opportunity! Essentially, I want to change how the event pages work. What I'm curious about is if my above mockup is possible within jinja + bulma.
I'm also looking for someone to make our code jam pages better: https://pythondiscord.com/events/code-jams/7/

#

Right now they don't really give you the info you care about in a good manner

green oriole
#

It doesn't look impossible, not sure how easy it is though - yes, that was a really interesting comment

thorny obsidian
#

I want the important information to be clear:

  • Dates
  • Tech
  • Qualifier repo
  • Actual Jam repo

  • Results with us showing it off nicely
  • How to get involved next time
#

Right now it's just... blocks of text

#

I want to make it more scannable

vocal prairie
#

That shouldn't be too hard

#

I think Django supports components

thorny obsidian
#

So, there's a few tasks:

  • Prototyping / Proof of Concept the main events page
  • Mocking up changes to the specific code jam pages
  • Prototyping / Proof of Concept the code jam pages
trim cradle
#

Sigh. I make my first PR to the site and it failed a lint test.

vocal prairie
#

Btw, who's swfarnsworth on Github?

thorny obsidian
#

Steler

trim cradle
#

omg doxed

thorny obsidian
#

well once I submit my final today I'll be setting up the site for the first time too, it'll be a good learning opportunity

vale ibex
#

Don't forget to setup your hosts file πŸ˜„

#

The setup for me was update hosts file, run docker-compose up

green oriole
thorny obsidian
#

Waiting for my computations to run

green oriole
#

Ha, fair enough

#

don't you have a typo right here?

vocal prairie
thorny obsidian
#

listen, this is my prof's code as a base. I'm at the point where idgaf

green oriole
#

Haha

thorny obsidian
brazen charm
brazen charm
#

There's also an issue for the feature open for lancebot that's be good as a first issue for a new contrib

sleek steppe
vocal prairie
#

Lemme get the site up real quick

vale ibex
#
127.0.0.1   pythondiscord.local
127.0.0.1   api.pythondiscord.local
127.0.0.1   staff.pythondiscord.local
127.0.0.1   admin.pythondiscord.local
#

to save you some time

sleek steppe
dusky shoreBOT
brazen charm
dusky shoreBOT
sleek steppe
#

ah

vocal prairie
#

Required is when it's required

brazen charm
#

When the env var is required?
I'm not very familiar with the site

vocal prairie
#

Here, where it says "something"

#

Although, Reddit should be removed from there

sleek steppe
#

Yes

brazen charm
#

I mean, I guess it isn't required at any point, just if you want to change which loggers emit trace logs

vocal prairie
#

What about the description for that one?

#

Are Lancebot's env vars the same (REDDIT_CLIENT_ID and REDDIT_SECRET)? I can update it in the same PR

sleek steppe
#

And REDDIT_WEBHOOK_ID IIRC

#

No it's REDDIT_WEBHOOK

vocal prairie
#

And that's the ID of the Reddit webhook?

sleek steppe
#

Yes

eternal owl
sleek steppe
#

I'm not sure which section it would go in for the environment variable referencce

vale ibex
eternal owl
#

@vocal prairie are you taking care of it or should I add em

vocal prairie
#

I got it

#

I'll update env vars in the same pr

eternal owl
#

alright πŸ‘ , thanks

brazen charm
sleek steppe
#

The description in bot#1529 should give enough info for that

vocal prairie
#

Does this look good?

vale ibex
#

I'd suggest mentioning that its a comma separated list

trim cradle
#

@green oriole tbh I was just burned out from trying to set up an environment from the bot yesterday and I gambled that a text-only change would be fine

vocal prairie
patent pivot
#

hey folks

#

site#492

dusky shoreBOT
patent pivot
#

hey folks

#

nevermind lint failed

#

oh kosa added tests for redirect code SMH

#

only kosa would do this....

#

or was it ks...

vale ibex
#

smh, lint and test before pushing joe

vocal prairie
#

I updated the Bot and Lance env vars on site, so I can pr that now

sleek steppe
#

but it was kosa who changed the expected response to 302

vale ibex
#

I remember seeing this discussed in #dev-core yesterday I think

#

maybe a few days ago, the days have melted

patent pivot
#

yeah

vale ibex
#

Not sure why there's a test there, if we were intending to switch back after it all went well

#

oh well, easy fix

sleek steppe
#

if sir-lancebot#706 is approved then I can implement that

dusky shoreBOT
patent pivot
#

okay CI passed :)

sleek steppe
#

thanks

vale ibex
#

I'll checkout and test it now

#

I'm gonna give implementing the new git action concurrency options a go tomorrow

#

It'll allow us to cancel actions on a branch/PR if another commit comes in

#

Since we don't care about the old action at that point

patent pivot
#

nice

green oriole
sleek steppe
#

Should the logging stuff go in bot/__main__.py or bot/__init__.py or another file?

vocal prairie
#

Night Akarys

green oriole
#

πŸ‘‹ 😁

vale ibex
#

If it any consolation stel, the site is a lot easier to setup

#

You just need to update your hosts file and run docker compose

vale ibex
#

Is there anything to do with logging in either of them right now?

#

I faintly remember there being something in one of the files

#

It should go in there imo

sleek steppe
vale ibex
#

:+1:

patent pivot
#

hey folks, minor note: we're doing some tracing requests to try figure out if we've missed any paths to redirect with dewikification, but if anyone gets a 500 code or a cloudflare error please let me know so I can trace it down, cheers.

vocal prairie
#

On the site, we use British English spelling, right?

patent pivot
#

yeah

vale ibex
#

A quick search and I've found some American that's slipped in there

#

but mostly British spellings

#

I bet it was Kat

thorny obsidian
vale ibex
#

It was definitely kat, they're all in the events path

thorny obsidian
#

:3c

vale ibex
#

smh

#

πŸ˜‚

vocal prairie
vale ibex
#

Kat's cookies are tracker free afaik

#

just watch for the ones with nuts :x

thorny obsidian
#

pffft, Chris hasn't even taken me up on the cookie offer. My cookies are nut free unless you specifically request nuts =P

vocal prairie
#

Sounds like a good deal to me

thorny obsidian
#

@eternal owl Let me know when you have time to chat re: User Event Management PR. I'd like to talk through what I'd like to convert it to and what would be easiest for you considering the existing codebase and work.

vocal prairie
#

@thorny obsidian For the events page under the "Upcoming Events" section, would you prefer a list (top) or a table (bottom)?

thorny obsidian
#

Table Looks nice

vale ibex
#

.ext unload latex

dusky shoreBOT
#

:ok_hand: Extension successfully unloaded: bot.exts.evergreen.latex.

fervent sage
#

@patent pivot does lance's redis have peristence on?

patent pivot
#

yep

#

same as pythons

vale ibex
#

Do they share a redis instance?

#

or are they separate containers?

patent pivot
#

shared

vale ibex
#

Cool

fervent sage
#

reason i ask is sir-lancebot#734

dusky shoreBOT
tough imp
#

there's sir-lancebot#705

dusky shoreBOT
fervent sage
#

i read through every issue

#

and am blind

#

4th stupid fuck up ive done in the last day

#

just perfect

tough imp
#

πŸ˜” dont feel bad about it

#

it's an interesting problem, i've been thinking about it for a while

#

because exts load before bot connects

fervent sage
#

in theory there's no reason cogs shouldnt be able to be loaded from the async def login function right?

#

cogs should make the assumption they may be loaded or unloaded at any time, so they shouldℒ️ be able to be loaded dynamically at any time

tough imp
#

theres the problem of renaming cogs, the bot should alert when the cache holds a name that doesnt match any existing cog, since that indicates a potential problem, but it cannot alert before it connects, so that information has to be stored somewhere

tough imp
#

whatever loads the cogs has to be able to tell the extensions manager that there was a problem

#

that information could live on the bot instance, but idk whether it should

vocal prairie
#

In Django, is there a specification on how to link to a specific part of a page, or is it just the normal page/#id as it is in HTML?

exotic ember
#

are you talking about our site pages specifically, or django in general?

vocal prairie
#

PyDis site specifically

exotic ember
#

you can just use a regular markdown link, ie [Python Discord Code of Conduct](/pages/code-of-conduct/), the link portion can be an absolute path starting at /pages/, or a relative path to the location of your page in the directory

#

then adding the id is just #id at the end, yeah

vocal prairie
#

It's in an html file, not markdown

#

Sorry, I should've specified

exotic ember
#

for reference, check out the navbar links at /pydis_site/templates/base/navbar.html

vocal prairie
#

Got it, thank you!

short snow
gritty wind
#

I don’t think my comments were ever addressed

gritty wind
#

How does one run the site now

#

it feels like JS isn't being loaded for me

#

started using manage.py runserver 8000

exotic ember
#

have you tried hard refreshing?

gritty wind
#

Yes

exotic ember
gritty wind
#

It's mainly that because that's the default pycharm django runner

#

but I'll try that too

#

Alright that's working

#

I wonder if it's the debug flag

exotic ember
#

possibly

gritty wind
#

I'll give that a shot

#

Thank you

#

Does the content app have auto reloads?

#

It's possible it does and I just have it misconfigured

#

Because django does watch for changes afaik

#

Nevermind me

#

it reloaded, I just didn't see it

short snow
eternal owl
vale ibex
#

Sick, that was easy

gritty wind
#

what does github-ref return on main

vale ibex
#

none

#

which is why the || is there

gritty wind
#

πŸ‘

vale ibex
#

I'll throw that in a comment

gritty wind
#

hmm

#

shouldn't it return refs/heads/main

#

that's what the docs say

#

it'll work either way, but it makes the or redundant

vale ibex
#

hmmm

#
The branch or tag ref that triggered the workflow. For example, refs/heads/feature-branch-1. If neither a branch or tag is available for the event type, the variable will not exist.
#

I took this is it wouldn't be there

gritty wind
#

I have a CI testing repo on hand

#

I'll check and let you know

vale ibex
#

Thanks ❀️

#

if that's the case, then yea, we remove it

gritty wind
#

yeah it's redundant

#

I wonder what forks return

#

Fixed one, and left 3 more lemon_thinking

#

Gotta admit that's pretty funny

vale ibex
#

yea lmfao

short snow
#

@gritty wind I could remove the change in the emojis if needed, and keep only the .ttt log show <id> change

#

it basically moves this into a embed, so that it won't ping

deft patrol
#

@trim cradle aha you in green tada

trim cradle
fervent sage
#

oop caps

#

lol

trim cradle
#

Congrats on wearing green?

fervent sage
#

on

gritty wind
#

no, that's the right amount of hype

deft patrol
#

well no wearing some kind of color πŸ€”

fervent sage
#

getting the role and that it matches your green clothes

deft patrol
#

idk

trim cradle
#

The thrift store I used to go to made it easy. It was an lgbt thrift store and they used rainbow gradients for the clothes rack

deft patrol
#

lol

#

Well, i guess he love green

#

πŸ‘€ green suit

#

@trim cradle

trim cradle
#

That suit is black actually. Must be a lighting thing

deft patrol
#

ooh but the green tie peeposhrug

#

lul

short snow
#

anyway, I am curious what is this new project

deft patrol
#

@short snow what project are you talking about?

short snow
#

the one steler is leading

deft patrol
#

oh got it

#

well vester too

gritty wind
#

different projects

trim cradle
#

Vester is working on a video series

vocal prairie
#

I think the site needs a better Game Jams page. It has one right now, but all it says is "Sorry, this page is not ready yet." I think that's up for grabs.

#

cc: @thorny obsidian

thorny obsidian
vocal prairie
#

Okay. We still want a summary of the 2020 one though, right?

#

Also, is there a Code Jam logo that fits any year or time of year?

thorny obsidian
thorny obsidian
#

FIANCE Is very helpful with typING

green oriole
#

lmao

vocal prairie
thorny obsidian
#

I gotta run to the grocery store before Seb's talk, so I'll be back later. And also yes, that sounds like a good idea

vale ibex
#

aha, looking at @dusky shore actions

#

it looks like each workflow will need to be name spaced

#

otherwise each workflow will cancel each other

#

and only 1 will run

gritty wind
#

o no

vale ibex
#

I'll do that now

vocal wolf
#

@sleek steppe what was the decision on ```py
await ctx.send()
return

vs
```py
return await ctx.send()
sleek steppe
#

The first

vocal wolf
#

k

vale ibex
#

This seems like it'll work group: ${{ github.workflow }}-${{ github.ref }}

#

instead of manually setting the names

green oriole
#

Hmm I was wondering about that

#

But they should trigger one after the other

vale ibex
#

yea, it makes sense when you think about it

#

Hmm, IG we can merge this change and see if they get cancelled

green oriole
#

Sure

vocal prairie
#

Should I use GitHub's "fetch upstream" feature that pops up on my fork (site)?

vale ibex
#

Yea, that'll update your fork with changes from the main repo

#

ok, this looks promising

#

it looks like the sentry and lint flows run in parallel

#

and since they're dependencies for the build flow, it didn't run

fervent sage
#

there're a bunch of really old issues on lance which havent been touched in years, should some of them be closed?

vocal wolf
#

I've been meaning to go over all issues in both the sir lance and bot repo

#

just haven't dedicated time to it

vale ibex
#

Maybe we give it a few days on lance and then push to other repos?

#

this concurrency workflow thing that this

sleek steppe
#

bot#1580 can be closed, it isn't even on the right repo

dusky shoreBOT
gritty wind
#

chris too fast

vale ibex
#

I'm sad, I don't have a sonic emote

vocal wolf
#

lol

fervent sage
#

there are other issues like sir-lancebot#338 which im sure a bunch of people whould be happy to do, but has so much stuff attached like the previous 2 PRs that it might be a bit overwhelming to work on (it certainly is for me)

dusky shoreBOT
fervent sage
#

imo that could do with being closed, and a new issue opened with a tl;dr of the proposed implementation and comments from previous PRs

sleek steppe
#

Um actually I'm not sure

vocal wolf
#

who added it lol

sleek steppe
#

me lol

#

I think when resolving merge conflicts I messed something up

#

I'll fix that

vocal wolf
#

I have it in my review

#

dw

#

you'll be able to commit through the comment in like 3 years when I'm done

sleek steppe
#

Ah Ok

vocal wolf
#

lmfao

#

very much /s

sleek steppe
#

I'll just resolve merge conflicts for the fourth time

#

fifth actually

vocal wolf
#

I wonder if you could've just used sed to do like

#

almost all the single to double quote conversion

#

I'd rather not deal with the regex though

sleek steppe
#

What does this mean? πŸ€”

vale ibex
#

which action?

sleek steppe
#

It was lint but I don't see it anymore

fervent sage
#

sir-lancebot#425 can probably also be closed and I can just stick it in sir-lancebot#710

fervent sage
#

those are not thr right way round in the embed lol

sleek steppe
#

I thought we said we didn't want that πŸ€”

fervent sage
#

not that i can see/recall

sleek steppe
fervent sage
#

well

#

either way that issue can be closed

sleek steppe
green oriole
#

Do I?

sleek steppe
#

leftovers is a string

green oriole
#

maaaaaaaaayyybe

#

Oh, I see it

#

There's a conversion

#
            embed_title = "But there's another one!"
            leftovers = str(matches)
            embed_text = f"You have another match, this being {leftovers}."```
-> ```py
            embed_title = "But there's another one!"
            embed_text = f"You have another match, this being {matches[0]}."```
sleek steppe
#

Yep

short snow
vocal wolf
#

@sleek steppe finished review.

sleek steppe
#

Thanks

vocal wolf
#

I've lost like

#

a bunch of sanity near the end of it

gritty wind
vocal wolf
#

because I thought I was nearing the end

#

when I was like

#

in the middle

short snow
#

is my review mentioned toxic?

sleek steppe
#

I feel like the review policy should be 1 staff/contrib approval since all core devs are staff πŸ€”

gritty wind
#

Well, no

#

If you do that

#

The one core dev approval will merge

sleek steppe
#

Oh true, I wasn't thinking lol

vale ibex
#

Yea πŸ˜„ We always want at least 2 trusted people to approve a PR

#

and we want at least 1 core dev approval on everything

placid ermine
#

interesting

sleek steppe
#

I'm guessing this is because sir-lancebot#705 isn't finished

dusky shoreBOT
vale ibex
#

Yea πŸ˜„

#

atm we're manually unloading it each time

vale ibex
#

.help latex

dusky shoreBOT
#
Query "latex" not found.
vale ibex
#

nice

green oriole
#

And we often forget to unload lol

fallen patrol
#

πŸ€” why did it suggest this

vale ibex
#

!s

stable mountainBOT
#
Command Help

!site
Can also use: s

Commands for getting info about our website.

Subcommands:

!site faq
Info about the site's FAQ page.
!site help
Info about the site's Getting Help page.
!site home
Info about the website itself.
!site resources
Info about the site's Resources page.
!site rules [rules]...
Provides a link to all rules or, if specified, displays specific rule(s).
!site tools
Info about the site's Tools page.

vale ibex
#

It's suggesting s

#

but then it appends the rest of your message

#

since it assumes those are parameters

green oriole
#

Hah

#

You can mention the bot to run commands

vale ibex
#

yup

fallen patrol
#

nice

#

it detects filter circumvention with that as well

vale ibex
#

filters come first

#

if a message matches a filter then it's deleted before a command is ran

vocal wolf
#

@sleek steppe I reviewed the things and the stuff again. I think I may just fall over and sleep after reviewing so many files lol

sleek steppe
#

lmao, I'll check it out

vocal wolf
#

You used a single quote for quotes

#

in one of the changes

sleek steppe
#

oh no

vocal wolf
#

You've became the same thing you swore to destroy

sleek steppe
#

Ahh it's because I just took away the f string

eternal owl
#

Could we use a formatter like black in our pre commit config to convert single quotes to double?

sleek steppe
#

We could, but we don't follow the same style guide as black, so it make things more difficult than not

eternal owl
#

I think we can configure it to format specific stuff

#

not sure tho

#

reviewing your PR now, let me set a stopwatch to see how long it takes, lol

sleek steppe
eternal owl
#

is there a way to target non-modified files/lines during a review

sleek steppe
#

No

vocal wolf
#

If we used black to format stuff, I think even if we configured it a lot

#

it would still explode

#

and flake8 would be mad either way

#

also black really likes putting anything within brackets on different lines

#

for instance, ```py
embed = Embed(title="something")

would turn into
```py
embed = Embed(
  title="something"
)
eternal owl
#

oof

#

that could be annoying for short lines

vocal wolf
#

yep

#

@sleek steppe I've looked over as many things as I could. It looks fine to me.

#

thank you for the PR

sleek steppe
#

sir-lancebot#718

dusky shoreBOT
vocal wolf
#

sir-lance#718

#

yeah that one

sleek steppe
#

I'll just commit your suggestions now

vocal wolf
#

stuff and things need to be resolved.

eternal owl
#

are you merging it?

vocal wolf
eternal owl
#

ye

vocal wolf
#

not atm, no

eternal owl
#

okay

vocal wolf
#

it's 84 files, I don't think I'm good enough for approval lol

#

thanks

sleek steppe
#

Conflict #6

fallen patrol
#

@vocal wolf one of the bots use black in its pre-commit iirc

vocal wolf
#

which one?

fallen patrol
#

Doesnt Lance?

vocal wolf
#

let me check

sleek steppe
#

Nope

vocal wolf
#

pretty sure it doesn't

stable mountainBOT
#

Pipfile lines 20 to 30

[dev-packages]
flake8 = "~=3.8"
flake8-annotations = "~=2.3"
flake8-bugbear = "~=20.1"
flake8-docstrings = "~=1.5"
flake8-import-order = "~=0.18"
flake8-string-format = "~=0.3"
flake8-tidy-imports = "~=4.1"
flake8-todo = "~=0.7"
pep8-naming = "~=0.11"
pre-commit = "~=2.1"```
sleek steppe
#

^ those are all of the dev packages

fallen patrol
#

πŸ€”

#

Hm

patent pivot
#

we don't use black on any of our projects

#

(and probably won't, flakke8 is fine)

hardy gorge
#

I'm secretly using black somewhere. Don't tell anyone.

vocal wolf
#

lol

patent pivot
#

hahaha

fervent sage
vocal wolf
patent pivot
#

oh lord

sleek steppe
#

lol

thorny obsidian
#

Lmao Xith is my fave domain lead now

vocal wolf
#

:D

fervent sage
#

xith > *

eternal owl
#

which editor do you use @sleek steppe

eternal owl
#

right

#

so in pycharm, it is showing me some type annotation errors which could be useful for this PR

#

error highlights

#

and typos

sleek steppe
#

We can't be strict with typing when using discord.py lol

eternal owl
#

I mean, incorrect function return type annotations, etc

#

I will include some of them in the review if not all

sinful schooner
#

I have a question

eternal owl
#

if its regarding python/python libs, you can check out #β“ο½œhow-to-get-help, if its regarding our projects on github, you can ask here

vale ibex
#

!docs refreshdoc

stable mountainBOT
#
Inventories refreshed
vale ibex
green oriole
#

It is 11pm

fallen patrol
green oriole
#

spring cleanup is merged TODAY

fallen patrol
green oriole
#

Yes

#

@sleek steppe are you still around?

sleek steppe
#

Yeah

green oriole
#

There are a couple of comments to solve from iceman, if you can please

sleek steppe
#

Yep

vale ibex
#

I'm not entirely sure how to manage the docs, I think this is right, can someone double check? !docs setdoc flask https://flask.palletsprojects.com/en/2.0.x/ https://flask.palletsprojects.com/en/2.0.x/objects.inv

green oriole
#

Seems correct

vocal prairie
#

That looks right to me, but you might need the /api/ on the end

#

Since you want the docs to redirect to the API reference

stable mountainBOT
#

According to the API, your request is malformed.

vale ibex
green oriole
#

Sad

stable mountainBOT
#

According to the API, your request is malformed.

vale ibex
#

πŸ€”

green oriole
#

There is no logging anywhere

#

that’s so helpful

#

I assume a validator isn’t liking it

vale ibex
#

It's raising a ResponseCodeError

#

and getting handled in the error handler

green oriole
#

You can see on the site log it is returning 400

vale ibex
#

Bad Request: /bot/documentation-links

#

hmmm

green oriole
#

I mean, we could run the validators manually

vale ibex
#

400: if the request body has invalid fields, see the response for details

#

odd

sleek steppe
eternal owl
#

ops I prolly did

#

line 203

#

return statement of _get_text_and_embed

sleek steppe
#

ah

vale ibex
#

Does it return a 400 if it already exists?

green oriole
#

Hmmm

#

Not sure

vale ibex
#

We could del and add

green oriole
#

What is its pk

vale ibex
#

package name

green oriole
#

That could be it

vale ibex
#

!d

stable mountainBOT
green oriole
#

what isnthe command

#

thanks

#

Yeah, most probably

vale ibex
#

!docs deletedoc flask

stable mountainBOT
#

Successfully deleted flask and refreshed the inventories.

stable mountainBOT
#

Added the package flask to the database and updated the inventories.

green oriole
#

@eternal owl do you wanna give it a last look? No obligation, we have enough reviews

vale ibex
#

!d flask

stable mountainBOT
#

Unable to parse the requested symbol.

vale ibex
#

Looks like it's appending the /api/ itself

green oriole
#

Spring cleanup

vale ibex
#

!docs deletedoc flask

stable mountainBOT
#

Successfully deleted flask and refreshed the inventories.

stable mountainBOT
#

Added the package flask to the database and updated the inventories.

eternal owl
#

I haven't done all files, but you can merge it I guess

vale ibex
#

!flask

#

!d flask

stable mountainBOT
#

This part of the documentation covers all the interfaces of Flask. For parts where Flask depends on external libraries, we document the most important right here and provide links to the canonical documentation.

eternal owl
#

since there are enough reviews

vale ibex
#

Nice

#

!d testing

stable mountainBOT
#
vale ibex
#

I'm gonna move over to spam

green oriole
sleek steppe
#

I think I'll test more so nothing's broken

green oriole
#

;-;

eternal owl
#

I prolly won't find time or energy again, if I sit for a review, it will prolly be in like 24-48 hours 😬

green oriole
#

you have 23 minutes (/s)

eternal owl
#

so you can go ahead and merge when ready, no need to wait for me

green oriole
#

Alrighty, thanks for the review!

sleek steppe
#

ye merge

vale ibex
#

push the button

sleek steppe
eternal owl
#

only core devs can merge?

sleek steppe
#

If I was able to merge then it would be green

vale ibex
#

I was presuming Ak wanted to do the honours lol

green oriole
#

YES

vale ibex
#

TOO BAD

#

lul

#

I was so tempted

green oriole
#

I feel so much better now

#

I can go sleep

sleek steppe
#

nice finally 😩

eternal owl
#

lol

#

what time is it there

green oriole
#

Still May 15th

#

11:42pm

#

Okay, let’s not do a PR like that again, shall we

eternal owl
#

lol

#

its 3:12 AM here, tmw sunday, so no sleep time

#

nvm, its already sunday

#

@short snow reviewed the wiki guess PR, just a few changes and bugs detected.

sleek steppe
#

Now we see if anything is broken

#

Also I think I put merge conflicts on every PR DogKek

eternal owl
#

you sure did haha

sleek steppe
#

The conflicts on sir-lancebot#683 a big

dusky shoreBOT
vale ibex
#

I closed my last long standing Pr yesterday

sleek steppe
#

||I think I can delete my fork now||

vocal prairie
fervent sage
#

wait did we merge cleanup πŸ‘οΈ

vocal prairie
#

Apparently

fervent sage
#

YES!

vale ibex
eternal owl
#

I have been working on my fork forever

sleek steppe
#

ah nice it got to 1500 additions/deletions before the merge

eternal owl
#

gn bois

fervent sage
#

pog

fervent sage
#

aye, sir-lancebot#738

dusky shoreBOT
sleek steppe
fervent sage
#

initially i had that wording, then went down a massive rabbithole of trying to do smart converty stuff to make the converter work normally with that error and eventaually i gave up and went back to this

sleek steppe
#

lol

fallen patrol
fervent sage
#

no it wasnt?

fallen patrol
fervent sage
#

Well here's my take:

  1. The issue is approved
  2. Very few people use the bookmark command
  3. Very few people who use the bookmark command will use the reply
  4. Those few people are likely the ones who will turn off pings anyway
#
  1. It can be undone pretty fast anyway
patent pivot
#

lol

#

i think both of those are opinions

#

and ya, I think it's fine & am fine with it being implemented πŸ™‚

#

if I had objections the issue probably wouldn't be approved, or we would have discussed it

short snow
fallen patrol
#

just launched lance in docker

#

why are both enabled

#

ik

#

just wondering why both are enabled

#

rather than the one

#

also its may

#

so neither task should have starting πŸ€”

#

oh wait

sleek steppe
#

They aren't sending it

fallen patrol
#

nvm i understand how it probably works

#

yeah

#

because in theory the bot could be on all year round

#

without ever turning off

#

so the tasks need to be there, just not sending?

stable mountainBOT
#

bot/utils/decorators.py line 35

def seasonal_task(*allowed_months: Month, sleep_time: t.Union[float, int] = ONE_DAY) -> t.Callable:```
sleek steppe
#

@fallen patrol ^

#

so if you set DEBUG=true in your .env file, you would see that it's sleeping for a day

fallen patrol
#

πŸ€”

#
[scripts]
start = "python -m bot"
#

what is wrong?

gritty wind
#

python 3.7

#

project uses 3.8

fallen patrol
#

ah.

fallen patrol
#

Because I don't get that error when i run that Same script without the shortcut name

#

Or when I run it in the pipenv venv.

gritty wind
#

Things change between versions

#

It can be any number of things

fallen patrol
#

Wait I know the cause nvm

#

My system python 3.7

#

So when I do pipenv in the environment it's actually running on 3.7

#

Even if I also have 3.7 for the bot

gritty wind
#

try installing pipenv on your 3.8 environment, or try using pipx

fallen patrol
#

I'm more curious why I get that error altogether

#

If I enter the venv and then try it it works fine even though it's a 3.7 venv as well

fervent sage
#

@vale ibex hey :P you around to quickly look over the boomark pr

vale ibex
#

sort of, request my review and I'll give it a look when I can

gritty wind
#

Hey @vale ibex if you've got time, I replied to your comment on the 3.9 PR

vale ibex
#

I saw and resolved πŸ˜„

gritty wind
#

schweet

vale ibex
#

I'm not against bumping

sleek steppe
#

Hmm I think the only breaking change is in 1.7

#

Which is also an easy fix

fervent sage
green oriole
#

Discord will take care of breaking it, don't worry

sleek steppe
#

I could make a PR to bump dpy to 1.6

vale ibex
#

What's the breaking change in 1.7?

#

If we're bumping, might as well goto 1.7.2

sleek steppe
#

We subclass commands.Paginator which has adds a linesep kwarg which broke the paginator when we were upgrading to 1.7 in sir-lancebot#683

dusky shoreBOT
vale ibex
#

ahhh yea

green oriole
#

... I cannot process this sentence, I need some coffee

fervent sage
#

should i put my pr on hold until we're beyind 1.6 so we dont need to ever have any annoying workarounds in the bot

green oriole
#

Frick, I don't drink coffee

sleek steppe
green oriole
#

Aha thanks

#

Sounds like an easy fix

vale ibex
#

I think we should re-do sir-lancebot#683 with just the changes required to upgrade to 3.9 and bump versions

dusky shoreBOT
vale ibex
#

without the extra changes in there

#

will make it easier to review & test

#

We can change type hints etc as we come to them

green oriole
#

I disagree, updating type hints is part of the upgrade

sleek steppe
#

It also has a billion conflicts right now lol

green oriole
#

We should migrate to the nicer interface

#

Honestly we should do some freezes when doing major reworks like that

#

If lance doesn't get any merge in a week, there's no harm

short snow
#

do you want to fix them? πŸ˜›

sleek steppe
#

@short snow since your here, feel free...

short snow
#

oh god on god

green oriole
#

My lord

short snow
#

i will do it soonℒ️

#

!remind 12h do it

stable mountainBOT
#
Okay.

Your reminder will arrive in 12 hours!

short snow
#

and die in peace

sleek steppe
#

The ellipsis at the end makes it funnier lol

gritty wind
#

I think the type hinting shouldn’t be done in a PR

patent pivot
gritty wind
#

This is spring cleanup all over again

#

Let’s just add this to the poetry PR

#

So it’s poetry and deps

green oriole
gritty wind
#

Upgrading d.py in a dep bump is worse?

green oriole
#

If we really wish to we can generate a PR and make sure that they are enough people online to merge in like 42 minutes

gritty wind
#

I don’t think we should make an explicit effort to upgrade type hints

#

We gain nothing from it

#

And just waste time

#

Type hints can be upgraded implicitly over time

#

As you change code or add new code

green oriole
#

Uniformising them is nice

gritty wind
#

Not really worth the time though

green oriole
#

Perhaps, yeah

patent pivot
gritty wind
#

Have you gotten a chance to update the 3.9 poetry branch yet

green oriole
#

We should really use feature freezes more

patent pivot
#

Not yet, I won't be able to look at it until the end of the week, but any staffer is free to take it over, just let me know

green oriole
#

Having a 1k lines conflict is not okay

merry ember
#

Hi, I'm having issues with LinePaginator. I get varying lines between pages, and not because there are no more items. I want to display 10 lines per page but can't get it to work, other than with ImagePaginator, but that feels like the wrong tool.

sleek steppe
#

I think it's a good idea to just upgrade discord.py in the poetry PR

patent pivot
#

I hate the idea of using feature freezes, they should be a last-ditch effort when there are no other solutions.

#

Shutting down enthusiastic contributors isn't a good idea

green oriole
#

We can always have ready to merge PRs but just hold them for a bit

patent pivot
#

but then we have several PRs which are just gathering conflicts

green oriole
#

As long as we keep freezes short and spare, it should be alright in my opinion

green oriole
patent pivot
#

We just should aim not to have PRs which change hundreds of lines, that's the solution, we don't need to open a PR changing hundreds of type hints.

green oriole
#

I'm not talking about this one in particular, but some PRs will have to generate big changes, like when we had the wiki freeze

gritty wind
#

We don’t usually do huge migrations

green oriole
#

Some version bumps can also cause that (although here it doesn't since it is optional)

gritty wind
#

Those are special cases we should minimize

green oriole
#

Even if we minimize them, we would run into one one day or the other

#

We should better be prepared next time we do

#

That's all I'm saying

gritty wind
#

We’ll handle those as the need arises

#

I don’t think we’ll often be surprised by us having to make large migrations

#

Those things are usually known in advance, or don’t immediately go into effect

patent pivot
#

Yeah, we can handle them, I just don't think we should have a policy of using more freezes, iirc we've only ever used 2 in PyDis history for the move to Django and dewikification, and both of those were fairly annoying to deal with

fervent sage
#

if this is gonna be a fairly big thing can i just bump d.py to 1.6 in my pr so it works better, since it wont break anything

#

then whenever the poetry thing happens it can go to 1.7.2

patent pivot
#

bumping to 1.7.2 shouldn't be a large PR should it?

#

isn't the modification only in the paginatior

sleek steppe
#

yeah it shouldn't be a large PR

patent pivot
#

we can probably put it in the poetry PR then since it's already touching dependencies

#

but yeah, I won't be able to get to that until Friday

fervent sage
#

joe when do your a levels finish?

short snow
#

so the update sir lancebot to 3.9.4 by me and toxic is not needed?

vale ibex
#

I'm gonna resolve conflicts in the poetry PR and commit a version bump

gritty wind
#

Make sure to delete the lock file

#

That’ll update sub dependencies

#

(Also makes locking faster hyperlemon )

vale ibex
#

I think I've done it

patent pivot
fervent sage
#

a week before mine pensivewobble

gritty wind
#

Go study Alec smh

#

I’ve got a feeling something went very very wrong Chris

#

Oh I was looking at the wrong diff lmao

vale ibex
#

lmfao

#

kk so the poetry PR is ready

#

once this is merged we should do the deps bump

#

Hmmm, it's asking for builldtools to install multidict

#

Do we need to bump one of the deps?

#

I'd rather not have gcc in the image if poss

gritty wind
#

Can you post the traceback

#

We shouldn’t need them

#

Also post the result of the poetry graph

vale ibex
#

!paste

stable mountainBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

vale ibex
#

looks like d.py depends on it

#

I can try bump d.py in this pr

sleek steppe
#

Oh I thought that's what you did

#

oh you reverted it

vale ibex
#

I was going to do them seperatly

gritty wind
#

Interesting

vale ibex
#

in different PRs to make it easire ot review & test

#

but now that I've bumped d.py to 1.7.2 it's fine

#

So I'll update the paginator now too

gritty wind
#

Ah that makes sense

#

I was wondering why we didn't need that on python

#

it already used 1.6

sleek steppe
#

1.6 supports python 3.9 but 1.5 doesn't

vale ibex
#

kk pushed

#

it builds fine, runs and paginator works