#dev-contrib

1 messages · Page 176 of 1

vocal prairie
#

yes, but that one specifically is in the test server (maybe some others too, but particularly that one)

#

...unless Python isn't in the test server. (edit: it's not, mb)

gritty wind
#

We’re specifically working on being able to view all previous versions (v1, v2, main, etc) at the same time, because right now it’s not really great when considering wanting to permalink anything

#

Really came about due to the advisory last week, and wanting to link the docs there

#

There are a few tools that seem popular, but most seem unmaintained, and despite being very simple, their behavior is very bespoke which it makes it hard to adapt to our system

#

I'm working with (and mostly have it working) multiversion, which does the sensible thing of checking out the project at a given git tag, but then runs a sphinx build that you can't configure

#

Since our docs right now have an extra step of running apidoc in a separate command, there is no way for me to get it working without retroactively rewriting the entire history

#

So I've had to write a regex to filter <v7, which as you can imagine is one ugly regex

green oriole
#

you can configure it to generate a page for many tags/branches

gritty wind
#

It does, but that means using rtd

green oriole
#

it is a cool platform though

gritty wind
#

Which considering all our resources id feel bad doing, and I definitely don’t want ads

green oriole
#

alternatively you can run a local rtd instance

gritty wind
#

I mean I genuinely don’t think either of those options are preferable for such a simple thing

#

There are certain hurdles but they are easy to overcome

green oriole
#

if you want to go simple, rtd is the simplest you can have :P

#

alternatively, you could generate sphinx docs and just serve them

gritty wind
#

We already are doing that

green oriole
#

then why don't you just use a different path for each version?

#

maybe I am misunderstanding the issue

gritty wind
#

That’s what I’m doing though, I’m writing the tooling to automatically generate each version

#

The problem here is that the libraries mentioned above have certain short comings (I’m pretty sure rtd would too)

green oriole
#

I see, you are using gh pages

#

I like how you don't want to use rtd but use gh pages lgbeet

gritty wind
#

GH pages doesn’t have ads, and it has almost infinite money though?

green oriole
#

yeah that's fair

#

so are you like modifying the deploy action to be able to selectively update a certain path?

#

although arguably just manually bumping the docs branch isn't much work

gritty wind
#

Nah we just redeploy the entire build every time

#

In CI

#

There’s an action for it, it’s actually pretty simple

green oriole
#

yeah I see that, but instead of wiping everything every time, you could just update the version directory

green oriole
gritty wind
#

Nope, just making new commits

#

The docs branch is completely independent of the main branch, which is why the history looks so fucked

green oriole
#

understandable

gritty wind
#

Multi version injects the metadata into the jinja templates so it’s really easy to just show

green oriole
#

right, but you could just add a piece of html to have a version picker like rtd?

#

oh yeah I guess you also need to know what versions are available

gritty wind
#

Yeah

#

Also at that point it’s the same amount of effort lol

green oriole
#

could just list all the branches on the repo thanks to the gh api lgbeet

gritty wind
#

I make it sound like a lot, but really it’s 30 lines with multi version lol

green oriole
#

as long as it doesn't involve writing your own tool it is probably fine haha

gritty wind
#

30 functional lines*, there’s a bunch of templating but you’ll have that either way

green oriole
#

I'm curious to see what this will look like

gritty wind
#

If you think about it, checking out a version, running a command, and saving isn’t that complex

#

But I’ll try to get it working either way

trim cradle
#

are forum channels supported in dpy currently? do we know at what time they will be supported in dpy?

vale ibex
#

they're supported as far as the discord api supports them

#

there is a notice in there atm saying that things are still subject to change

#

so we don't want to start developing too many features with them just yet

gritty wind
#

I feel that still isn't the main blocker

#

More importantly, none of us can actually use them in our dev bots lemon_thinking

vale ibex
#

test in prod

#

easy

rapid swallow
#

Let's test in the Rust server

#

They have publically enabled forum channels

#

It's not like Rust is used for anything anyway I'm sure they won't mind

#

(for legal and safety reasons, the above statement has been made in jest and do not reflect the views of the Python Discord™️ organization)

eternal grove
#

I'm trying to run the project to contribute a little, and followed the instructions here: https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/bot/

The problem is when I get to the point where I can run docker-compose up, it keeps getting a critical error "Could not connect to Redis. Is it running?"

In my config.yml, bot.redis, host is set to redis, password null and use_fakeredis is true so I do not know what I'm doing wrong. Anyone who can help with this?

#

Anyone who can help me with this?

vale ibex
#

If you're using docker, you can set use_fakeredis to false

#

although it should be working regardless

#

can you try setting it to false and let me know?

eternal grove
#

Yeah, I will get back to you later about it

#

I'd like to tackle issues 2170 and 2171, the ones about !clean on github if you could check it out and assign me.

timid sentinel
#

Assigned you to both 👍

eternal grove
#

Thank you, I think you accidentally assigned yourself on one of them though

timid sentinel
#

Whoops 😅

rapid swallow
#

Wookie stealing issues smh

elder belfry
#

I would like to be assigned to sir-lancebot#1055, I think it'll be a great starting point for my opensource journey 🚆

dusky shoreBOT
austere hornet
#

Still looking for a core-dev review on sir-lancebot#1054, thanks!

dusky shoreBOT
timid sentinel
frozen wren
#

What is the purpose of creating bot and botbase , why dont just put them together? Thabk you

cold island
mellow hare
#

auto_guild is now officially on pypi

#

Giving you a heads-up that it's ready to be added as a dependency

#

Still feel nervous, it's the first thing I've ever published on PyPI

mellow hare
gritty wind
#

Very cool

#

Any thoughts on the things I’ve ran into so far?

mellow hare
#

Crap, which things?

austere hornet
dusky shoreBOT
#
Noooooo!!

@austere hornet, please enable your DMs to receive the bookmark.

austere hornet
gritty wind
#

No bugs or anything bad, I just couldn’t figure out how to best make use of the system

#

This is a long conversation, so I'll summarize the main points

#
  1. The constructor and variable problems mentioned above, which just makes it so that we can't really have people use this without modifying the output by hand. The main constructors we use in bot are ENV for pulling from environment variables, and JOIN + yaml variables, which together power how we do things like merging the Schema, SITE_URL and API PATH without requiring users to enter all these keys multiple times in different fields. auto-guild doesn't need to understand them, it just needs to be able to parse them and spit them back out untouched

  2. Then there's the problem of not having any way to get category ID. This powers things like moving help channels from the dormant to active category, and can't be easily dynamically obtained. The only way I see to obtain it if auto-guild doesn't support it would be hardcoding the expected category name.

  3. auto-guild uses the values as the channel types, which presents the problem of needing to maintain a separate config and config template instead of using just one file, and users still need to merge the non-auto-guild stuff by hand.

  4. Less of a problem, more of "what I'd like to see" is that auto-guild doesn't support a lot of things yet. Roles, webhooks, and emojis are all things that need to be configured. Of those it's only roles that really matter, since it's one webhook and one emoji so it's okay to ask the user to enter them by hand. That said, if it's possible to get that automated, it would be great.

For problems 2 and 3, I suggested the following format:

categories:
  welcome:
    - id: 1029048192
    - welcome: 2174897189279

# For the purposes of bot, we don't care about the channel type, and are fine with everything being text. It's a lot more helpful to be able to enter our prod values into there, because then we can use one config
#

To add onto this, I'm not suggesting that auto-guild bends to our config, that would be unreasonable. What I'm hoping for is that we can use the library with our default config as the template, with the expectation that our current config will have to be restructured to meet what the tool supports

austere hornet
timid sentinel
#

Would be nice to get a review on bot#2156 so we can get that merged

slim widget
timid sentinel
#

actually maybe not

#

will have a look

slim widget
fiery bay
#

Hello, i am beginner, how to contribute and was you mean by contributing

austere hornet
#

!contribute

stable mountainBOT
#

Contribute to Python Discord's Open Source Projects
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!

Projects to Contribute to
Sir Lancebot - our fun, beginner-friendly bot
Python - our utility & moderation bot
Site - resources, guides, and more

Where to start

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
fiery bay
placid ermine
#

adding features, fixing known problems

#

reviewing code written by others

fiery bay
#

so, there will be someone looking into pull request(i guess term is correct), if he like the feature or there is a bug fix he add it

placid ermine
#

right

placid ermine
#

but in short, you pick an existing issue (or create a new one) that you want to address, clone the project, make your changes, and open a pull request. others will review your code, potentially suggest changes, and when everything is done your code is merged

austere hornet
#

But before beginning the work, make sure a core dev approves the issue

#

You'll see the label "status: approved" on the issue if it is approved

timid sentinel
# slim widget Additionally, it didn't post the usual link to the log of deleted messages.

We're getting some error response trying to upload the messages to the site API but we don't log what it is in prod. Opened a PR to change that which should make it easier to debug in the future https://github.com/python-discord/bot/pull/2175

GitHub

If we're getting a malformed request response from the API, something in our code is wrong, so we should log error.

fiery bay
#

thanks. now i have some idea

slim widget
#

I manually deleted one of the messages just before invoking !cban.

#

Perhaps that has something to do with it.

timid sentinel
#

It looked like it should correctly handle cleanbanning a user with no messages, although I didn't inspect it too closely

wild prism
#

I dont know the api code, but could it have something to do with cleanban auto-appending the log link and the ] in the reason?

timid sentinel
green oriole
#

Have you looked at both the site and bot logs?

timid sentinel
#

yeah, site didn't seem to have anything

full fractal
#

.bm Might be useful if I'm facing an outdated site image while testing python-discord/bot

fallen patrol
#

@austere hornet thanks for the suggestion ( #dev-log message ) I implemented the edit listener on my own bot today

green oriole
#

Hey @vale ibex, do you remember why we moved away from the tiangolo image on Pixels, back in the days?

#

I can't find anything on gh

vale ibex
#

Didn't support python 3.9

eternal grove
vale ibex
#

@green oriole forgot to reply

green oriole
#

lol okay

#

thanks

eternal grove
#

So I made !clean users which is an alias for !clean user able to handle more than one user, but would it perhaps be better to make !clean users its own subcommand?

#

Actually, maybe it's better if !clean user is just an alias for !clean users instead

timid sentinel
#

Hmm, I think all ways would be fine. I'd say a subcommand probably isn't necessary, and I guess it makes sense to have user as the alias for users rather than the other way round, yeah

vale ibex
#

Yea, I'd say that it should be one command that just has a greedy user arg

eternal grove
#

I made two pull requests, they're pretty minor changes so shouldn't take long to check them out whenever you got time

mellow hare
# gritty wind 1. The constructor and variable problems mentioned above, which just makes it so...
  1. The BOT_TOKEN env value would be the same for the script and the bot proper, so that's not a conflict. USER_ID would also not cause a conflict. I can add TEMPLATE_PATH as an env as well so that it can just be one and done. Not entirely sure where you're seeing they'd need to add those multiple times.

  2. That is an issue that I planned on rectifiying. It does pump out the category, just doesn't indicate which is which. That is on my todo list.

  3. The reason I couldn't use our current config as a template and just read from that is because of how our channel and category section is laid out. There is no easy indication as to which channel goes under which category. If that gets corrected in our config, then I can relatively easily make that adjustment.

  4. While I appreciate that those things need to be configured, the main scope of the project was to be a simple one and done to create and grab IDs. Role configuration is quite a feat. If you have a template design in mind for that which isn't going to extend the template 10 fold then I'm more than willing to look at it and try to integrate it.

#

I think for the sake of documenting, anything further should probably be added as issues to the repo

vale ibex
#

is there an api to create a guild based on tmeplate?

#

that also returns the ids

gritty wind
#

For one, I’m not referring to those variables. I’m referring to the variables in our config that use env or use variables or use join

vale ibex
#

since that would also create the roles

gritty wind
#

Those aren’t related to the app’s env

mellow hare
#

Not without the bot being able to see the template, which means it'd have to be in the relevant server, to Chris

vale ibex
#

oh, it can't just use a template url, like a user can?

#

that seems weird 😅

mellow hare
#

Wait, do they have to be in the server to use that template, though?

#

If not then I'll tweak

vale ibex
#

Users don't no

#

no idea about bots

mellow hare
#

I'll take a look again. The bot to template endpoint is wonky

gritty wind
#

For 3, I think we should modify the already existing config to make it work with your tool, but that means taking into account the things I’ve outlined for 1, and 4

vale ibex
#

it returns the whole guild object too

mellow hare
#

Well then I'm just an idiot

naive ermine
gritty wind
#

Which emojis?

naive ermine
#

I'll send my screenshot.

#

Maybe something on my client

mellow hare
#

Man, I really did all that for nothing. I'll re-do it entirely with templates in mind

naive ermine
#

I'm sorry

naive ermine
#

This is how it shows on my device... It's some client issues.

#

Sorry about that.

vale ibex
#

I am going to guess that the link tags extend into the emojis

#

so mobile is rendering it differently

#

that should be fixed in the bot

naive ermine
gritty wind
#

Iirc this might’ve actually been an android discord issue

#

Can’t remember all the details

#

Who implemented this, I think it was brad

#

He might know

vale ibex
#

Yea, it likely is

#

we should fix it regardless if it's just a bug on one client

gritty wind
#

No the thing is I don’t know if it’s fixable

vale ibex
#

.src so

dusky shoreBOT
#
Command: stackoverflow

Sends the top 5 results of a search query from stackoverflow.

Source Code
gritty wind
#

We knew about it when writing the feature, so I’m leaning on the side of it being something out our control

stable mountainBOT
#

bot/exts/utilities/stackoverflow.py lines 67 to 72

value=(
    f"[{Emojis.reddit_upvote} {item['score']}    "
    f"{Emojis.stackoverflow_views} {item['view_count']}     "
    f"{Emojis.reddit_comments} {item['answer_count']}   "
    f"{Emojis.stackoverflow_tag} {', '.join(item['tags'][:3])}]"
    f"({item['link']})"```
vale ibex
#

the problem is that the markdown link covers the emojis too

#

so the link takes prescience over the emoji

gritty wind
#

Gotcha

vale ibex
#

should be fairly easy to solve, by wrapping all the text in the links before hand

#

so there would be 4 links, rather than 1 big link

cold island
#

And then create a yaml for dev based on the new guild

vale ibex
mellow hare
#

I refuse to parse the config via tokenization

#

Not just so I can find some comments that indicate which category some channels are in

#

If we want the convenience of using the config, we need it changed

vale ibex
#

Yea, we'd need to change the config layout and loading so that it's joint

cold island
#

I don't mind adjusting our config. I don't hate the idea of using a template, but we'll need to make some steps to make it "official" and reliable, and mostly just another thing to maintain. Using the config allows us to rely on something we already maintain

gritty wind
#

We already maintain the template and have instructions that make it official 🤔

vale ibex
#

yea, but we now have the option to not have to keep the template updated with changes

gritty wind
#

Yeah I agree tho

cold island
#

We don't really maintain the template, we update it once in a while, but we don't maintain it like the yaml

gritty wind
#

Provided we don’t end up having to maintain two templates

#

I’ve outlined the changes required to make that happen here

#

There are quite a few, and it will require us to modify our current config, which is fine. It should be possible eventually though

gritty wind
gritty wind
#

My point was maintaining the template would be no more work than our current setup

#

And maintaining two configs would be the same amount of work

mellow hare
#

To your point about permissions, adding a fuck ton of permissions in a config is monstrous

gritty wind
#

Wait which point is that

mellow hare
#

4

cold island
gritty wind
#

Yes, we can with the right changes to auto-guild which is why I wrote that review thing up there lol

cold island
vale ibex
#

Yea, I think just the existance of the roles is enough

gritty wind
mellow hare
#

I for sure planned on fixing the category thing not being clear.

#

Like currently it'll show

- welcome: 123122321312
- welcome: 122134412233
#

That shouldn't be tough. Was an oversight

gritty wind
#

I’m not sure if you’d still like to have those things opened as issues

mellow hare
#

For my sanity yeah

#

Keeps me on track

gritty wind
#

Wilco

mellow hare
#

ADHD needs list

mellow hare
#

@gritty wind For clarity, the config.yaml only needs what you're changing, right? It doesn't need everything from the config-default.yaml?

timid sentinel
#

Yes

mellow hare
#

That's what I figured

#

Got confused about one of the issues we made on auto_guild

#

Maybe I'm just being lazy, but it does seem out of scope for how simple and general purpose this is supposed to be. We have so much arbitrary stuff in the config that is irksome

#

I look it over again..

gritty wind
#

I mean, even the most basic config will require that:

  1. You add site to your config, hence needing the join and variables
  2. We can’t use our config as the template if we can’t at least have those variables be ignored, which means we need to maintain a second template. This is the problem I was telling @cold island about
mellow hare
#

Using the config as the template was never the intention

#

From my understanding from the conversation was that we were going to maintain the dev template as a separate file

#

Not to mention, our current config file doesn't cover all categories and doesn't cover all channels, or covers channels that don't currently have categories specified. Also, we'd have to list out the channel types anyway because of the voice channels

#

So we can't just leave the existing number there for those

#

I based the example template I have on our current Guild Template thing specifically so that you guys can take it and drop it in place and just update it as needed

#

Rename the output file as config.yaml or whatever and add any things that need to be changed compared to the default

#

Those are all things we'd have to do anyway

#

I don't understand why this is coming off as more of a hassle than the current system, which has deterred people from contributing at all.

#

Additionally, our Guild Template is changed only when people to remember to do so

#

If the template.yaml is in the repo, it's there and incredibly easy to change

#

@cold island @gritty wind Only reason I'm bringing it up here as opposed to the issues is because this covers all of the existing issues

#

I'll write up the summary of this on the relevant issue later

gritty wind
#

I’ve brought this up, but no we don’t care about channel types for the voice channels. If we’re going to be maintaining a separate template, that’s the same amount of work as the discord server template that we’re already maintaining though

mellow hare
#

We do care about the voice channels because of how they function with voice gate

gritty wind
#

Not really no, I’ve looked at the config

#

The only place we use the voice channels

#

Is the silence command, which only cares so far as actually implementing different behavior for silencing

#

The voice gate uses an event and doesn’t care about the channel

mellow hare
#

Fair enough

#

Also I'd say this is both more visible and more easily tracked than the guild template

gritty wind
mellow hare
#

One file

#

Literally one file difference

#

And it only has to be done once

gritty wind
#

But no, changing the template to match the server is easier than managing a checked in file in this instance

#

Same argument: How often do we update the guild template on discord

#

If we can’t get it working with the existing template I don’t see one solution as being better than the other

mellow hare
#

Because it's far easier to implement and more approachable for new users

#

And it doesn't require a major overhaul of our existing config

#

Make server, get ids, invite user, transfer ownership in one fell swoop

gritty wind
#

I don’t follow? How is it easier or more approachable to run auto-guild compared to another tool which uses the guild template and does the same thing

mellow hare
#

No having to get your bot into the server, no having to get and parse all the IDs yourself

gritty wind
#

I’m not suggesting we stick with what we have now

mellow hare
#

Crap, back later, deliveries

gritty wind
#

Good luck!

fallen patrol
green oriole
#

is there a core dev around who I can DM?

#

or admin that works too

rapid swallow
#

i qualify for 1/3rd of your requirements

#

✉️

mellow hare
#

Haven't messed around with it enough to get a good feel for it

#

Love that they implemented it, just wondering how easy it is for folks to still see the text part of it even when not in call

green oriole
#

I mean you can post in the core dev so like whatever lmao

rapid swallow
#

done

mellow hare
#

@gritty wind If we want something that specifically builds off the Discord server template thing we can do that. I just thought that in previous conversations we were doing this in leu of maintaining that. I think @cold island was part of that convo, can't quite remember

cold island
#

My understanding is that the goal is being able to generate a server from a config file. I suggested a way to make it so that it can naturally work with our config-default.yaml (after some adjustments).

If we want to maintain a server template that seems like a very separate direction

mellow hare
#

If we do that it will take a fairly extensive overhaul on how we do it.

#

There will be a lot more channels and categories listed that we wouldn't actually use in the bot proper

cold island
#

why?

mellow hare
#

I don't think we have every category listed

cold island
#

Our current test server is already a very reduced version of this server. It doesn't have all categories or channels

mellow hare
#

If we did it that way sure

#

Okay hold on

cold island
#

If the goal is to create a test server, then what's in our config should be enough

mellow hare
#

Let me make sure I have what you mean straight in my head first

#

Does this involve the existing guild template we have

#

Or is this strictly based on our config

cold island
#

The way I viewed it, the latter

mellow hare
#

Okay

#

So we'd have to structure it in such a way that we can indicate what channel goes in what category

#

We'd also want to structure it so that we can tell it what kinds of channels we want them to be. Unless we don't care and they're all text channels

cold island
#

hmm

mellow hare
#

That's why I think it's better to just have a separate template file for this

#

It lets us not have to completely change our config

cold island
#

I just really want to avoid maintaining the server structure in several places. Maybe we can make it a separate file, and then have the bot use it instead?

mellow hare
#

My previous impression was that this would be in leu of the Discord template thing. I can make it use the template endpoint instead if we prefer that. @vale ibex helped me find that (feel dumb for not finding it sooner) and I can try to make that work

#

Or was the overall goal to remove the need for both of those (template and/or the Discord guild template thing)

cold island
#

I'm not sure if using the guild template will solve our problems. The are two parts to this issue:

  • Creating a test server
  • Changing the bot's config yaml to match the new server rather than this one.

Even if you can create the server with the guild template, you still need to know which channels in the new guild match which entries in the config.

#

You will also need to make sure that the template and whatever connects the template to the bot's config always accommodate changes to the bot config and/or changes to the main server

mellow hare
#

What kinds of changes would affect the structure?

cold island
#

If you add or delete a channel

mellow hare
#

Our current template (or at least the dev server link I was given) isn't a one for one to our server anyway

#

So we're already adjusting things if memory serves

cold island
#

It matches the test server yeah

#

Because it's the best thing we can give contributors right now, not because it's the best solution

mellow hare
#

Gotcha

#

Then we need to decide if we're going all or nothing when it comes to what we list in the config-default.yaml

#

If we add a new category, we need to add it in there.

#

So the constant changing is happening anyway

#

I'm with you that the config thing is the way to go now

cold island
#

imo it should just match the config-default.yaml, and then the user can make any adjustments they want if they want to simplify/modify the new server. Which is why I'm looking for a way to have the tool use the config-default.yaml, or alternatively for the new config file to be used by the bot, so that we don't have to maintain the structure in multiple places

mellow hare
#

But we need to do some grunt work

#

Fair

#

Then I'm undecided

#

We can either maintain a smaller test_server.yaml file that only really changes when there's a big need for it or we restructure the current config, which means a decent change in our config and code like the constants.py file

#

I know what you mean with what you're saying, but I don't think a test server really ever needs to be fully one to one

#

I think this is more a philosophy question at this point that we might want to just run by the core devs

cold island
#

yeah I guess. I'd be fine with making changes to our config and constants.py

mellow hare
#

If we add something in the config but not in constants, does the bot wig out?

cold island
#

Just ignores it

mellow hare
#

Mkay

#

Couldn't remember

trim cradle
#

Once pyscript is stable, what would need to happen before we rewrote all our site's JS in it?

tawdry vapor
#

There isn't much JS code and none of it is particularly complicated so I don't think there would be any major blockers.

#

Doesn't seem to rely on third party libraries either besides some fuzzy sort lib

#

Though I don't particularly feel like a switch is necessitated.

vale ibex
#

Fairly small impact PR sir-lancebot#1059

dusky shoreBOT
vale ibex
green oriole
#

Cool

placid ermine
vale ibex
#

cool cool, should be fairly easy to add to the tuple once this PR is merged

eternal grove
#

Can you guys please review and maybe merge PR bot#2178 and bot#2179? They're pretty minor changes so shouldn't take long 😃

austere hornet
austere hornet
#

I assume those are the ones you were asking about ^^^

eternal grove
#

Yeah, my bad. Thanks for pointing that out!

timber pelican
#

little bug of snekbox (see pic)
bot doesnt recognize this as command and nothing happens

#

!e```py
print('hi')

vale ibex
#

yea, the command is !e not !e```

#

without the space, the backticks get taken as part of the command

timid sentinel
#

I think i'll reopen that issue, as I think if there's an alright fix it'd be worth it

#

might have a look into it if I get a chance

vale ibex
#

you'd need ot alias all the possible combinations

#

and then access ctx.message.content

#

rather than using the arg

tawdry vapor
#

Not really

#

Can't we use an event handler to intercept the message before its processed as a command?

trim cradle
mellow hare
#

I don't really see this as an issue

#

.... he says realizing it was yesterday

vocal wolf
#

bot#1919 is still up for grabs and in high priority, if anyone would like to take over. There are some file conflicts that would need to be resolved.

dusky shoreBOT
cold island
vocal wolf
#

Thanks, I haven't been around these PRs for a couple months so I've lost a bunch of context

#

priority lowered to normal

full fractal
#

Haha have I reached the point where my reviews are sought after?

#

I'm surprised this happened so quickly since I've only done a few reviews

vocal wolf
#

:)

brazen charm
#

@vocal wolf If you're triaging, I think bot#2156 was supposed to be merged but the reviewer didn't qualify for the bot because of the merge

brazen charm
#

Would be nice to get rid of the broken docs

vocal wolf
#

Interesting, I thought the two approvals would be enough

#

Alright now we're good

#

it shall auto-merge after linting is done

vocal wolf
#

Currently up for grabs: bot#2021, bot#2031, bot#2040, bot#2089

full fractal
#

Anyway you shall ask for review, you shall get review in return @vocal wolf :)

vocal wolf
#

Thank

brazen charm
vocal wolf
#

!d cleardoccache *

stable mountainBOT
#

Successfully cleared the cache for *.

brazen charm
#

Thanks

vocal wolf
#

np

full fractal
#

hooray teamwork FTW 🎉

thorny obsidian
vocal wolf
#

yuh

austere hornet
#

Fr

steep yarrow
gritty wind
#

Well done, but please be mindful of the channel topics

#

This channel is for projects related to this server specifically, such as our bots @stable mountain

celest charm
#

is for me 👉👈

steep yarrow
#

There isn't any + button

gritty wind
#

That’s correct, we’ve found media in that channel very disruptive

#

There isn’t a dedicated place to share media here

#

You could try to drop it in the off topic channels, but try to not make it spammy or disruptive

gritty wind
full fractal
gritty wind
#

Anyone have a good workflow for sphinx templates? Kind of annoying to rebuild the entire thing just to test out one thing

#

I should add, I'm using a tool on top of sphinx which injects metadata that's relevant to the current page, so it complicates things a bit more

gritty wind
#

Thoughts on placing the versions tab here? Alternatively, we could do something closer to what d.py does (second picture)

I don't know how yet, but if they did it, surely we could do it too 🤡

outer oasis
gritty wind
#

That's not the hard part

#

I'm already doing it on our project

#

The part I don't know is the actual HTML, css, and JS behind it all

#

But more importantly, is that what we want

#

I think the actual message where I explained this was buried by the pictures in favor of the second message

vocal wolf
#

@eternal owl can you fix conflicts?

tawdry vapor
timid sentinel
timber pelican
#

!epy print('Hello world!')

stable mountainBOT
#

@timber pelican :white_check_mark: Your eval job has completed with return code 0.

Hello world!
timber pelican
#

works

#

nice

#

!eprint('hi')

#

doesnt work :(

timid sentinel
#

I didn't bother for that since the fact there's no space is visible

timber pelican
#

ok

severe tangle
#

Found a bug in the paste website

#

https://paste.pythondiscord.com/pudosikobe.py
When u copy all the code and paste it in a new paste and then edit it, the Scroll Bar isn't present, thus making it impossible to scroll without using the arrow keys. Same happens with the Duplicate and Edit button

austere hornet
severe tangle
#

sure

#

@austere hornet

#

The scroll bar on the right dissappears

#

Lemme see if the same issue occurs with Edge since I don't have Chrome downloaded

austere hornet
severe tangle
#

That issue isn't there but rendering issue

#

The scroll bar is literally below the buttons menu

austere hornet
#

Oh

#

@patent pivot Could you take a look at this?

patent pivot
#

hmmm I can, but we don't have a huge deal of control with hastebin

#

we didn't build it

austere hornet
#

Ohh

gritty wind
#

This has been an insane pain, but multi-version is now running on bot-core

#

Just need to write some CI

vale ibex
#

@gritty wind the build docs error is due to us using -j (multi-processing doc building) and the releases package not declaring if that's safe or not.

bitprophet/releases#89 is a thing, but hasn't had a response for a while. We might just need to disable the multi-processed building for now

gritty wind
#

Thanks

#

This was an issue when we had releases last time, but we had worked around it in bot-core#2

dusky shoreBOT
gritty wind
#

Now I've just gotta remember what the solution was

#

It does work locally, which is... fun

#

What if I just wrap the setup with a function that returns True

gritty wind
#

I don't think that's documented anywhere

#

Ok I pushed the correct solution

#

We'll build docs on windows

tawdry vapor
#

And comment if you do or don't encounter issues

#

Try out some of the commands like testing and linting

#

I can review a PR in exchange ;)

austere hornet
#

Any thoughts from core devs (and others) on sir-lancebot#1051?

crisp owl
#

Hello, is it OK to review the pr code and write approve/change comments without being in the 'reviewers' list in Github? what is the github culture about reviewing?

tawdry vapor
cold island
hoary anvil
hoary anvil
#

ah, it's done. Thanks!

late wolf
#

Umm. Where is botcore defined?

#

Ah found it

gritty wind
#

bot-core#79

Alright, I've gone ahead and created a proof-of-concept for the multiversion stuff on my fork, think I should be good for reviews now

If anyone would like to review, you can reduce the workload significantly by ignoring the changes made in the Restore Releases Changelog commit. It's basically just reverting the deletion, so it's not anything new. This is the commit where it was originally deleted
https://github.com/python-discord/bot-core/pull/29/commits/8e66c33790e8f22aebdf1289c4707d5d56264271

dusky shoreBOT
vale ibex
#

what changes are expected to be seen in the site api?

gritty wind
#

I should've linked them originally, by changed the docs for one of the arguments for the argument handler

#

control+f for 7.1.

#

That'll take you to the change

vale ibex
#

Ah I see it now, how is that done?

gritty wind
#

It git checkout <tag> for each tag in the history (this is done by multiversion), runs the sphinx build, and saves it to a different folder

vale ibex
#

I mean this

#

since we haven't actually reverted anything, so I'm guessing you've put that there manually?

gritty wind
#

Oh lol that was the actual text change I made in the docstring

#

Its not smart enough to show stuff like that on it's own

vale ibex
#

ahhh

#

like how d.py has things like added in X

gritty wind
#

Aren't those handwritten?

vale ibex
#

sorta

#

it's a tag

stable mountainBOT
#

discord/abc.py line 255

.. versionadded:: 2.0```
gritty wind
#

Yeah that's just a default sphinx tag

#

We could technically automate it since we have a list of all objects, and their respective versions

#

Might be something to look into, but my vacation just ended yesterday so I'm not going to look into it yet 🤡

vale ibex
#

hah yea non worries

#

I still don't follow this site_api change

#

there's nothing in your PR that changes that

gritty wind
#

This was actually on my fork

#

This PR has all the changes i made, then I merged it to main (of my fork) to generate the docs you are viewing

vale ibex
#

ah right

gritty wind
#

I tagged the first commit as 7.1.2, and the second as 7.1.3

#

Ah wait technically 2nd and 3rd

#

Lol half the PR is just that releases commit. 288/23 on it alone

vale ibex
#

I made them subpoints since they were just additional info

gritty wind
#

You’re right

vale ibex
#

now they look like the main point 😅

gritty wind
#

But Sphinx lol

#

I tried at them for a while and couldn’t figure out how to make them normal nested bulletpoints

vale ibex
#

sad

gritty wind
#

But I gave up pretty quick

#

I’ll see if I can get it working

vale ibex
#

indent with 2 spaces

#

not a tab

gritty wind
#

I didn’t even realize it used an actual tab lol

#

You are amazing Chris

vale ibex
vale ibex
#

i didn't actually check what it was lol

#

i just set it to 2 spaces and it worked

gritty wind
#

I was writing the changelog as a txt file instead of an rst so it’s possible

#

Pycharm’s preview pane for rst is insanely broken, lag spikes on anything you type

#

Could you push that

vale ibex
#

i want to approve though

gritty wind
#

Or uhh, request changes, we don’t wanna block

#

Yeah exactly lol

vale ibex
#

:P

gritty wind
#

Or I’ll just push it

vale ibex
#

i can request changes if you want to do via github

gritty wind
#

I’ve got my ide open anyway

vale ibex
#

kk cool

gritty wind
#

It is failing the build though, gotta debug it

vale ibex
#

it still needs the blank line, if that's missing

gritty wind
#

It seems to be complaining about the next entry after the list

#

In my experience, it’s trying to read that as a continuation of the list node

vale ibex
#

this is my file that passes

#

poetry run task docs

gritty wind
#

Hm

#

I have that locally as well, weird that it works for you then

vale ibex
#

I'm on windows, not that I imagine that changes much

gritty wind
#

Wait there is something different with the end of the line

#

I can’t see it, but git insists it’s there

#

Lol

vale ibex
#

lol

gritty wind
#

Ok this is good

#

Does review-bot check co-authors

vale ibex
#

nah

gritty wind
#

amazing

#

Am I doing your noreply.github or gmail

vale ibex
#

either is fine

gritty wind
#

I pushed it now

#

Crap I just pushed two tags?

#

I'll delete them lol

#

It actually managed to link the commit from my fork and considered it as a commit on the repo, though detached

vale ibex
#

lol

gritty wind
#

The dev-log has gone wild

#

Thanks Chris, this is great

vale ibex
#

:D

#

time to reward myself with a curry

gritty wind
#

I had like 30 tabs open. They are gone now

#

Enjoy 😄

vale ibex
#

I'll invoice you for the saved memory

gritty wind
#

Can I pay in memory-time from our cluster?

vale ibex
#

Ah yes, all 3GB of memory left after @patent pivot deployed kibana stack

gritty wind
#

this is cool, twinsies

#

Wait I thought we were both on the same #

#

Quick write 10 more

vale ibex
#

hah

gritty wind
vale ibex
#

ohno

#

lens forces you to use a login now

#

there used to be a skip button

gritty wind
#

Thanks for the heads-up, setting auto-update to False lol

vale ibex
#

lol

vale ibex
#

oh lol

#

I just foudn the same thing

gritty wind
#

haha

vale ibex
#

ah, that doesn't work

gritty wind
#

Seems people are resorting to forking and building from source hm

vale ibex
#

yup

#

might just go to k9s again

gritty wind
#

kubenav might be nice if it syncs up with your phone

vale ibex
#

true

#

oh

#

kubenav is portable

#

by default

#

wild

gritty wind
#

hahah

vale ibex
gritty wind
#

You can run kubnav in your kubernetes cluster 🤯

#

How did you turn on dark mode

vale ibex
#

settings>general>theme

#

the top option

gritty wind
#

Amazing

#

It has builtin prom

outer oasis
wild prism
#

#help-chili message
user wasn't able to close their help channel, I was able to close it for them

clever wraith
#

yea

#

now my help cooldown is still not down even after my help channel is closed

wild prism
#

<@&267628507062992896> role annihilation requested ^

cold island
#

Done

#

!c r help_channels

clever wraith
#

thanks

cold island
#

bot?

stable mountainBOT
#

:ok_hand: Extension successfully reloaded: bot.exts.help_channels.

cold island
#

oh

stable mountainBOT
#

Don't rush me, sheesh.

tawdry vapor
cedar frigate
#

pls fix 😄

vale ibex
#

looks like it wasn't updated last year either 😅

gritty wind
#

Why are they even year-locked

#

Someone must’ve had plans for the following years, but clearly that’s not something we’re doing

green oriole
#

iirc the goal was to have different/updated facts ever year

austere hornet
tawdry vapor
#

Any ideas why this works locally but in CI it counts 0 commits? ```py
def count_commits_on_date(dt: datetime.datetime) -> int:
"""Return the amount of commits made on the given UTC aware datetime."""
dt = dt.combine(dt - datetime.timedelta(days=1), dt.max.time(), dt.tzinfo)

# git log uses the committer date for this, not the author date.
args = ["git", "log", "--oneline", "--after", str(dt.timestamp())]
stdout = subprocess.check_output(args, text=True)

return stdout.strip().count("\n")
#

I have something else that correctly calculates the date of the HEAD commit. But it can't seem to count the number of commits on that date.

gritty wind
#

Github actions doesn't check out the project

#

It checks out as a detached head

tawdry vapor
#

Incorrect

#

Maybe that is the case for PRs but this is for an action running on main after a merged PR

#
Checking out the ref
  /usr/bin/git checkout --progress --force -B main refs/remotes/origin/main
  Switched to a new branch 'main'
  branch 'main' set up to track 'origin/main'.
/usr/bin/git log -1 --format='%H'
'b0fb2bf8e52f9e340a8f77503c68daafeed4d41d'
gritty wind
#

Hm

tawdry vapor
#

I ran the same command to checkout locally and the script correctly counts on my end

#

I even have the same exact version of git

gritty wind
#

Could you try setting the fetch-depth to 0 anyway

tawdry vapor
#

Right now I can only think of 3 possibilities:

  1. Environment variables are messing with the git config
  2. My local gitconfig has something that is making it work
  3. The timestamp that's calculated is somehow wrong, even though it's using an aware datetime in UTC.
tawdry vapor
gritty wind
#

yeah as an arg to actions/checkout

#

That shouldn't mess with head, but I'm honestly not sure because there is no documentation on the action at all

#

I didn't think it even had different behavior for main

tawdry vapor
#

I don't think the action controls what is checked out by default. I believe it uses a git SHA from an env var that is set by GitHub Actions.

#

Hmm

#

Well I can try fetch-depth 0 but since the behaviour is different in a PR it means I just have to keep merging to main

#

Which sucks

gritty wind
#

I have a project just for testing gh actions, i'll try there and report back

tawdry vapor
#

Alright, thanks

#

There's a step in build.yaml near the start that gets the version so you could just modify the script to print the version

#

Or just gut everything and add a single step that only gets the version

#
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
        fetch-depth: 0

      - name: Get version
        id: version
        run: |
          set -eu
          version=$(python scripts/version.py)
          echo "::set-output name=version::version"
          echo "$version"
gritty wind
#

I thought you were just checking head, but I can see that's not the case

#

Anyways, without fetch-depth, it only checks out at max one commit, HEAD vs merge aside

#

It did work with fetch-depth

tawdry vapor
#

The date is from head. But yeah it needs to count all commits on the same date so it needs some history

gritty wind
#

fetch-depth 0 might be annoying, could do like 10

#

Oh also don't forget to put fetch-depth under with

tawdry vapor
gritty wind
#

Hm that's a good point

#

I did get the head in my test

#

But I didn't push the snekbox code

#

Just an empty project

#

let me try with snekbox

#

Where are you calling the count_commits?

#

oh I see it

#

2022.6.1.-1

#

Ok so I'm getting what you're getting now

tawdry vapor
#

Even with the fetch depth?

gritty wind
#

Haven't tried it yet, but one interesting thing I've noted is that if I add the command as a step in CI, I do get a result

#

Have you factored in timezones

tawdry vapor
#

As I said, it's all aware datetimes in UTC

#

The date is retrieved using a UNIX timestamp in UTC from git

#

And the log command is also given a timestamp in the same format

gritty wind
#

Alright that all makes sense

#

Ok I just got it

#

Your code for checking versions is not quite right

#

.strip() on one entry would return no new lines

#

hence 0

#

But it does get the correct output

#

Fetch-depth will give it the rest of the commits, and it will return a more sensible number

tawdry vapor
#

Good catch, thanks

gritty wind
#

Giving it a fetch-depth of 20, it generated a version number of 8

#

I've personally pushed 8 commits on top of main

#

But it found 10 commits

#
ad8c4bd Fix
873fdb0 Fix
f42e479 Fix
ed40a83 Fix
f5c3423 Fix
467975b Fix
ba0431f Fix
aeb2140 Gut Actions
b0fb2bf Merge #140 - add pyproject.toml and versioning
6ba9182 Fix typo in Dockerfile comment
#

Not sure why that would count 8, even with the strip thing

#

Oh -1 for head

tawdry vapor
#

Right... it should be 9

#

What does it return if you run it locally?

gritty wind
#

8 as well

#

Removing the strip it returns 9, which when you account for line 20 should be right

tawdry vapor
#

Yeah I guess the problem is the strip

#

Since something like 1\n2\n would become 1\n2 so it would only count 1 line

#

I'll just keep the strip and do + 1 since I don't want some weird shit to happen in the future where git suddenly starts returning an extra newline

gritty wind
#

Hahaha

#

That's reasonable

tawdry vapor
gritty wind
#

You’re good to merge

tawdry vapor
#

Thank you

#

You've been a great help

#

Ahhhhhhhhhhhhhhhhhhhhh fuck I just remembered I wanted to fix something

#

The Sentry release action still uses the SHA as the tag instead of the version

gritty wind
#

Hahaha that’s unfortunate

#

If you want to do another PR I’m still around

tawdry vapor
#

Yeah

#

The CI failed anyway

#

Test failing even though it passed in the PR??

gritty wind
#

I was just going through the logs

#

This is more of an observation, we should probably eventually bump checkout to v3 everywhere, but it’s a lot of work

tawdry vapor
#

And this time the test passes again

#

An intermittent failure is the worst type of failure to debug

gritty wind
#

Absolutely

tawdry vapor
#

It failed because of the same issue we had when we first tried to upgrade to cgroupv2

#

Well, it's the same error message but maybe not the same reason

#

Maybe it's because tests run in such quick succession that a process in a cgroup doesn't get removed in time.

#

Ah yes, version version

wild prism
#

looks like snekbox is down

#

#bot-commands

thorny obsidian
#

yeah, I think Mark is currently debugging

clever wraith
#

did i posted it in right channel?

thorny obsidian
austere hornet
#

!ot will also work

stable mountainBOT
clever wraith
#

Has quackstack gone dormant?

#

I was hoping to take an issue on but there hasn't been any activity in the repo lately

tawdry vapor
cursive relic
#

Is it possible for !src <tag> to link into the file where the tag is located in at? Currently doing that throws error to the channel

subtle kraken
#

pretty sure there is an issue about that as well as an open PR

#

bot#2022 and bot#2046

cursive relic
#

Ah I see, thx!

#

Seems to be that it has no author if I understood correctly

subtle kraken
#

might be worth asking if they plan to continue working on it

cursive relic
#

In github?, sure I'll do that once I can login to there.
Also in the PR or the Issue?

subtle kraken
#

In the PR, if they dont respond within few days I'll assign you to it (that is if you want to work on it)

cursive relic
#

I will probably not be able to do that (work on it) since I haven't touched discord bots for a while, but I'll ask them in the PR if they have plans to continue it.

gritty wind
#

What's the criteria that differentiates normal merge commits, from a merge commit which I later amended with some other changes

#

This mostly makes a difference to meta aspects such as CI and review dismissal, but I'm not sure what the right way to go about it is. Should I not be including the relevant changes in the merge commit itself

austere hornet
# dusky shore

How come the bot put #2046 before #2022? Is this a known issue? Shouldn't the bot post issues/PR's in the order they were created from top to bottom, instead of bottom to top? At least that's what I've seen happen before, this is the first time I see it like this.

gritty wind
#

It's been like this for a while

#

You've already commented on the issue it seems

#

sir-lancebot#968

dusky shoreBOT
gritty wind
#

Hey @tawdry vapor why does snekbox's compose use a remote image?

#

Would a build command for a local version be more useful in that instance

austere hornet
#

Oh wait it's already in the issue description, nvm

cursive relic
stable mountainBOT
#

bot/resources/utilities/python_facts.txt lines 1 to 3

Python was named after Monty Python, a British Comedy Troupe, which Guido van Rossum likes.
If you type `​import this`​ in the Python REPL, you'll get a poem about the philosophies about Python. (check it out by doing !zen in #bot-commands)
If you type `​import antigravity`​ in the Python REPL, you'll be directed to an [xkcd comic](https://xkcd.com/353/) about how easy Python is.```
hollow kayak
#

hello

#

i need change the color of this surface on pygame

#

what is the cmd ?

#

please

vale ibex
cursive relic
#

I personally don't have any, but I'd say that it would be nice if there were multiple facts + few facts can be found from meta

tawdry vapor
#

By default the suffix is a "dev" tag IIRC which is never pushed

#

Maybe that's confusing though. I suppose I could change it

timid sentinel
#

If auto-deleting in similar scenarios is something we do fairly consistently across lancebot I guess it's fine although I'm pretty indifferent.

#

If we're not consistent I don't think changing one instance is worth it

#

Personally not a massive fan of timed deletion of bot responses, especially if the invocation isn't also deleted as looking back you can't tell if the bot replied

placid ibex
#

hello hello, i have a sort of "feature request" for lancebot. the .latex command was recently enabled for the data science channel, which is nice and dandy. however, having used the texit bot extensively in other servers, i notice that a couple of features could make lancebot better. first, if a message containing .latex is edited, it would be good if the bot deleted its old message and re-renders the tex, reducing spam. second, if one is not happy with how the tex came out, something like reacting with an x emoji could prompt the bot to delete the rendered tex. any chance this could be added in?

tawdry vapor
#

That's basically how the eval command works, so it would make sense for latex to be similar. Would be helpful if you opened an issue on GitHub for this suggestion.

gritty wind
#

I could test this pretty easily, just delete all my images

#

Alright, I only had latest when starting (it uses dev or venv)

#

It definitely pulled a remote ghcr image, even has the correct date and ID

tawdry vapor
#

So if the docker compose file is specifying that it wants the "dev" tag, and it doesn't exist, I don't know what it would possibly pull

gritty wind
#

It pulled the venv image and tagged it as dev

#

The one I pulled in my test now is cbe417998fba

#

ghcr.io/python-discord/snekbox-venv:dev

#

And more importantly, it didn't build a local image 😅

tawdry vapor
tawdry vapor
#

I tried it myself and it seems like it attempts to pull the image but fails and falls back on building it

gritty wind
#

It doesn’t know, but I cleared out every image I had on hand to check so I don’t see what else it could be lol

#

Unless that expansion doesn’t evaluate to the same thing on windows

tawdry vapor
#

The expansion is part of the compose spec so I wouldn't think it has OS specific behaviour

#

My test removed every snekbox image I had before running that command

gritty wind
#

Do you have IMAGE_SUFFIX set?

tawdry vapor
#

No I don't think so

gritty wind
#

on unrelated note, when did we get that drawing

#

it's sick

tawdry vapor
#

A few months ago when I found out about gh supporting it

gritty wind
#

In that case it should evaluate to snekbox-venv, but I'm not sure how it managed to resolve the dev

#

Well done

tawdry vapor
#

Ty

tawdry vapor
gritty wind
#

It would be -venv:dev no?

tawdry vapor
#

Yes like what my log shows

gritty wind
#

Oh so like you it built the local image but named it as a ghcr one

#

Hm still wouldn't explain the 7 hour timestamp

#

Let me get my logs

tawdry vapor
#

Maybe there's a field to disable pulling?

#

If the image does not exist on the platform, Compose implementations MUST attempt to pull it based on the pull_policy. Compose implementations with build support MAY offer alternative options for the end user to control precedence of pull over building the image from source, however pulling the image MUST be the default behavior.

#

So I'll set pull policy to "never"

gritty wind
#

I'll try it out with that

tawdry vapor
#

Ok not quite. Seems like that won't allow it to be built

#

Maybe "never" is fine

#

If pull_policy and build both presents, Compose implementations SHOULD build the image by default. Compose implementations MAY override this behavior in the toolchain.

#

I don't know what the last sentence means

gritty wind
#

And if build is not present 🤔

tawdry vapor
#

Well, then "never" would fail of the image doesn't exist

#

But for snekbox it doesn't matter since build is present

#

It means the "build" section in the compose file

gritty wind
#

Well, that would mean manually running the build command, and tagging it as that

#

There isn't a build section in the compose rn

tawdry vapor
#

What

gritty wind
#

oh I didn't see that before lol

#

Alright, I cleared out my local cache and set pull to false and that seems to be working as expected

tawdry vapor
#

Okay I'll chuck that in my pr later

gritty wind
#

Sounds good, thanks

vale ibex
#

!contributing

stable mountainBOT
#

Contribute to Python Discord's Open Source Projects
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!

Projects to Contribute to
Sir Lancebot - our fun, beginner-friendly bot
Python - our utility & moderation bot
Site - resources, guides, and more

Where to start

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
vale ibex
#

These various links have the information you're after about our repositories though

tawdry vapor
#

I never pressed closed.

#

I can't seem to reopen it either.

#

And it shows 0 commits now

vale ibex
#

the remote branch was on their main branch

#

I wonder if the force push wiped out the commits

tawdry vapor
vale ibex
#

very weird

tawdry vapor
#

Maybe I fucked up the push

#

What I did was ```
git remote add doublevcodes git@github.com:doublevcodes/bot.git
git fetch --all
git checkout doublevcodes/main
git switch -c pr1929
git branch -u doublevcodes/main
git reset --hard 778903fea8799e4c8f6817c25b1d2326d08481b3
git push -f doublevcodes main

vale ibex
#

what hash is that git reset?

tawdry vapor
#

It was the first commit of the PR, which was before they messed up the history

vale ibex
#

oh, that is very weird then yea

#

since I don't see that commit on gh

#

like you

tawdry vapor
#

Here's the weird thing ```
❯ git status
On branch pr1929
Your branch and 'doublevcodes/main' have diverged,
and have 1 and 669 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)

nothing to commit, working tree clean
❯ git push -f doublevcodes main
Everything up-to-date

vale ibex
#

that's intreesting

#

what about a git rebase/merge from doublevcodes/main?

#

onto your branch

tawdry vapor
#

I think I'm not properly dealing with my local branch name being different than the remote

#

I just changed the name to main

#

But now it gives me permission denied when I try to push

vale ibex
#

might be because the PR is closed

#

so the allow maintainers edit is removed?

tawdry vapor
#

Uh good point maybe that is the case

#

But I have no way to reopen the PR

#

I think it closed cause there's no diff anymore

#

Just bricked it maybe

vale ibex
#

:(

tawdry vapor
#

Oh wait I can change the target branch

vale ibex
#

might be easier to make a branch on the main repo

#

and cherry picking the local commit

tawdry vapor
#

Never mind I cannot change the branch once the pr is closed

#

Yeah there's just no way

#

Anyway what I think I had to do was

#

git push -f doublevcodes pr1929:main

vale ibex
#

ahh

tawdry vapor
#

But instead what ended up happening is I just pushed my local main branch to their main

#

And mine happened to have just been updated with origin's main

#

So that caused the diff to disappear and the PR to close

vale ibex
#

I'm guessing this changes means we can remove the noqa F821 now too?

tawdry vapor
#

Yes that was one of the things that was requested to be removed

vale ibex
#

ahh cool

#

I grabbed the diff before your forcepush

#

my bad

tawdry vapor
#

👿

brisk brook
tawdry vapor
#

Yes that's what happened

brazen charm
#

The base url on the flask docs is out of date

gritty wind
#

Thanks, updated

little egret
#

Hey, I'm really new to github and wanna make edit the code of the python bot, anyone know how I can do this?

austere hornet
#

!contribute

stable mountainBOT
#

Contribute to Python Discord's Open Source Projects
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!

Projects to Contribute to
Sir Lancebot - our fun, beginner-friendly bot
Python - our utility & moderation bot
Site - resources, guides, and more

Where to start

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
austere hornet
#

In terms of Github, there are many tutorials out there that you could watch if you're not sure how to do something in particular and you could also ask in this channel.

mellow hare
#

Is @stable mountain on 3.10?

brazen charm
#

I think it's on 3.9 because of deps

mellow hare
#

Hmm, damn

#

I was wanting to scoot auto-guild to 3.10 so I can make use of match case, but I don't want to throw a wrench into the works

#

Would be nice if there was a futures for it or something

#

Scrolling through the dependencies to see what's specifically holding us back.

#

Once of them is ours. The bot-core

outer oasis
dusky shoreBOT
mellow hare
#

Daaaaaaaamn it

#

Sad Hemlock

gritty wind
#

The main blocker is async-rediscache or that whole tree (dep of bot-core as well, so that’s why botcore, but it’s not the reason)

#

I’ve opened a PR which rewrote rediscache for aioredis 2.0 which should solve many of our woes, but I don’t think Seb has had time to take a look

mellow hare
#

Fair enough. I guess I don't need the match case, but it would be nice since I'll be checking structure with the auto-guild tweak

dim pelican
#

By the way, we have 5 PRs up for grabs for any interested in contributing to @dusky shore:
sir-lancebot#745
sir-lancebot#884
sir-lancebot#919
sir-lancebot#930
sir-lancebot#1031

tawdry vapor
brisk brook
#

I'll take a look. I've fallen out of routine with reviewing because of school but I'm planning on picking it up again now over the summer

tawdry vapor
#

These need 1 more approval: bot#2187 bot#2186 bot#2165

tawdry vapor
#

Also a re-review on bot#1936 since I updated it just now

dusky shoreBOT
vale ibex
#

that last one was 523 commits behind, so I just merged main into it for testing

fiery sail
#

Can anyone tell me some beginner friendly open source projects?

austere hornet
#

Our very own @dusky shore is a great beginner open source project to contribute to! Read the following for more info:

#

!contribute

stable mountainBOT
#

Contribute to Python Discord's Open Source Projects
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!

Projects to Contribute to
Sir Lancebot - our fun, beginner-friendly bot
Python - our utility & moderation bot
Site - resources, guides, and more

Where to start

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
tawdry vapor
clever wraith
#

and i got locked out of my previous account lemon_pensive

dim pelican
#

Ah, well welcome back!

topaz wharf
#

How do I do an inner join in django?

tawdry vapor
cursive relic
#

It seems a bit like bot#2046 is no longer being worked, is this about correct?

dusky shoreBOT
timid sentinel
#

Seems so, yes

cursive relic
#

I'll see if I'm able to write @stable mountain level code (if it's possible for someone to work on it), probably not able to but I'll see

slate gorge
vale ibex
#

yea we're been having some fun fixing an issue in devops

#

should be fine now

last patio
#

it works now

#

closed the channel

clever wraith
#

guys im try open my file say this invalid syntax help me ?

vale ibex
magic arch
#

I like the idea below ⏬

cursive relic
#

Is it possible to add retention rates to !server?

#

(Ben can probably be more accurate on the question than I am)

magic arch
#

As mentioned earlier in pygen, I think it'd be a nice stat to add on, but only if we can get it from Discord programmatically. Calculating it ourselves seems like too much unnecessary work, combing through messages and users.

thorny obsidian
#

I know I have no trust in the validity or value of Discord's arbitrary 20% retention rate. So if we want something like retention rate I'd like to define it ourselves to something that is actually meaningful for us

austere hornet
#

May I ask, what is retention rate?

vocal prairie
cursive relic
vocal prairie
#

Discord's criteria is rather opaque. It says "came back to the server," but what does that mean? Did they type a message? Did they visit the server at all? Did they visit at least x number of channels? And I don't think there's a way to access Server Insights via the API. And anyway, that value (Discord's, that is) will always be rather useless to us because that's not really the support model we have here.

cursive relic
cold island
#

Which we can't track ourselves

vocal prairie
#

:o how did you get that? is it documented somewhere?

cold island
#

It's info floating around in the servers managed by Discord I think

vale ibex
#

Yea, their docs also say that it is "Enforced only for servers that are actively growing"

#

lol

#

I wouldn't call us actively growing, but I guess Discord does

cold island
#

That's their definition of growing

vale ibex
#

ah lol

#

well net 20 members is nothing

cold island
#

not net

#

just 20 lol

vale ibex
#

oh lmfao

vocal prairie
#

on another note, our flat increase rate has slowed down since June 1 according to stats.pydis.com, even going down a little

vale ibex
#

likely us dropping off discovery

vocal prairie
#

I wonder how much is related to pride and how much is related to Discovery

cold island
#

Most of it is Discovery probably

vale ibex
#

yea, we had ~50-60% joins from discovery

cold island
vale ibex
#

lol

#

can even spot the may raid too

digital nova
#

How do I start open source contributions, I didn't get an internship this summer but still want to be able to work in a team and have a mentor.

wild prism
#

!contrib

stable mountainBOT
#

Contribute to Python Discord's Open Source Projects
Looking to contribute to Open Source Projects for the first time? Want to add a feature or fix a bug on the bots on this server? We have on-going projects that people can contribute to, even if you've never contributed to open source before!

Projects to Contribute to
Sir Lancebot - our fun, beginner-friendly bot
Python - our utility & moderation bot
Site - resources, guides, and more

Where to start

  1. Read our contribution guide
  2. Chat with us in #dev-contrib if you're ready to jump in or have any questions
  3. Open an issue or ask to be assigned to an issue to work on
wild prism
#

and you could of course apply some of it to other open source projects if you want

wild prism
#

np

vale ibex
#

@cold island pip 671 when :(

cold island
#

the what now?

vale ibex
#

Meant pep 671 lol

#

!pep 671

stable mountainBOT
#
**PEP 671 - Syntax for late-bound function argument defaults**
Status

Draft

Python-Version

3.11

Created

24-Oct-2021

Type

Standards Track

cold island
#

Ah yeah, thought about it as well

vocal wolf
#

@eternal owl omg how dare you not lint before you push

eternal owl
#

lemon_grimace its been a while, should have initialized precommit

vocal wolf
#

Off to the shadow realm you go

severe tangle
#

Are there any plans to shift the help system to Forums Channel instead of help channels once the server gets access to those?

subtle kraken
#

We already have access to forum channels and we have plans to move to forums once they become a stable feature

tawdry vapor
#

How do I fix this? ```
File "pydisc-bot\bot_main_.py", line 72, in main
async with bot.instance as _bot:
AttributeError: aenter

#

Just running with poetry run task start on the main branch

#

Never mind. Seems recreating the venv fixed it

vale ibex
#

I think your d.py version is out of date

tawdry vapor
#

If it was then poetry install didn't report anything as out of date

vale ibex
#

d.py version has been v2.0a0 for a while

#

so poetry doesn't see it as a new version

#

very annoying

gritty wind
#

It's easiest to bypass poetry completely

#

pip install

#

At least until d.py figure out how to do numbers

cold island
#

sigh poetry won't let me delete the env

tawdry vapor
#

What do you mean it won't "let" you?

#

I have it configured to create the venv in the project root so I can just use rm -r .venv

cold island
#

Says permission denied for some reason

#

yeah I might just delete the folder

brazen charm
tawdry vapor
#

Not sure of best practices for documenting type vars.

gritty wind
#

Wouldn’t _P be undefined when building

#

I don’t know if it does type_checking mode

#

Oh nvm