#dev-contrib

1 messages · Page 69 of 1

green oriole
#

Client modding is against To- oh wait

patent pivot
#

lol

green mesa
#

Could not retrieve the list of watched users from the API and messages will not be relayed.

#

i just fired docker compose but i got this

#
bot_1       | 2020-10-10 14:00:22 | bot.exts.moderation.watchchannels.bigbrother | ERROR | Failed to fetch the watched users from the API
bot_1       | Traceback (most recent call last):
bot_1       |   File "/bot/bot/exts/moderation/watchchannels/_watchchannel.py", line 149, in fetch_user_cache
bot_1       |     data = await self.bot.api_client.get(self.api_endpoint, params=self.api_default_params)
bot_1       |   File "/bot/bot/api.py", line 119, in get
bot_1       |     return await self.request("GET", endpoint, raise_for_status=raise_for_status, **kwargs)
bot_1       |   File "/bot/bot/api.py", line 114, in request
bot_1       |     await self.maybe_raise_for_status(resp, raise_for_status)
bot_1       |   File "/bot/bot/api.py", line 104, in maybe_raise_for_status
bot_1       |     raise ResponseCodeError(response=response, response_json=response_json)
bot_1       | bot.api.ResponseCodeError: Status: 401 Response: {'detail': 'Authentication credentials were not provided.'}
eternal owl
#

you need this as env var
BOT_API_KEY=badbot13m0n8f570f942013fc818f234916ca531

green mesa
#

i have this

#

already

brazen charm
#

Did you configure the config values to http and the local url?

green mesa
#

let me recheck

#

site_schema: &SCHEMA "http://"

eternal owl
#

what about the url

green mesa
#

bot configured

#

tnx

dusky shoreBOT
#

[404] #1193 Issue/pull request not located! Please enter a valid number!

cold moon
#

.issue 1193 bot

dusky shoreBOT
cold moon
#

Can we have another role: Voice Banned, because when voice ban remove speaking role, then user will see again voice gate channel

cold island
#

How about doing the opposite: every user who joins is automatically given the "Voice Muted" or "Voice Banned" role or whatever for the duration decided on before they can use the voice gate channel, and if they go through the gate then the role is revoked

#

That way you don't need another role to use the voice channels

#

the vban command would then just put the role back

cold moon
#

My idea is:

  • When user verify, then user don't have any voice gate roles.
  • There should be task that checks every half hours for users who pass requirements (3 days after verification and 50 messages sent) and who isn't voice banned and give them Voice Unverified role. With Voice Unverified, users are able to see voice gate channel.
  • When user verify in voice gate, then he get Voice Verified role. Voice Unverified role will be removed.
  • When user get voice banned, Voice Verified role will be removed and user is not able to speak anymore and don't see voice gate channel too.
patent pivot
#

this is way more complex that it needs to be

#

we just have the voice gate, if a user sends a message who doesn't meet the criteria we just DM them and tell them why

#

if they get voice banned and see the gate so what? we are retaining that information I would think (if not, we should be, it should be with the infractions system)

#

we can just DM them saying they got banned from voice

cold moon
#

Oh, so this shouldn't send anything to voice gate channel and use DMs instead?

patent pivot
#

it could use similar methods to the existing role gate in that eventually the messages sent are deleted

#

that would also be fine

#

but I think we can solve this without adding more roles and more complexity

#

it is just a gate to add a role, that is all it should be

cold moon
#

I think sending to channel is safer for case when user have like DMs disabled or leave from guild

#

I'm trying to figure out docstring for voiceverify command, but I can't find what should clearly explain what voiceverify do.

patent pivot
#
Apply to be able to use voice within the Discord server.

In order to use voice you must meet all three of the following criteria:
- You must have over 50 messages within the Discord server
- You must have accepted our rules over 3 days ago
- You must not be actively banned from using our voice channels
#

right?

cold moon
#

Is this possible to use f-string for docstring?

patent pivot
#

ah good point, no, it isn't

#

well, we shouldn't be changing the criteria too frequently, but we did decide within the team that we do want to make the criteria public, we don't just want a magic set of rules

#

However

#

that being said

#

we will be documenting those thresholds within the voice gate channel

#

so we could just give the vague stuff there

#
Apply to be able to use voice within the Discord server.

In order to use voice you must meet all three of the following criteria:
- You must have over a certain number of messages within the Discord server
- You must have accepted our rules over a certain number of days ago
- You must not be actively banned from using our voice channels
cold moon
#

OK, thanks

patent pivot
#

I'll make the voice gate channel this afternoon and get you constants for that as well

cold moon
#

I just found that I have to make changes in site too for voice ban

patent pivot
#

and the role

#

hmmmm

cold moon
patent pivot
#

yep

#

I'm also tempted to say we refactor that new metricity_data to include whether the user is banned from voice

#

then we have all 3 criteria in one API call

cold moon
#

This should be perfect. This will be performance win

patent pivot
#

yep

cold moon
#

I will make site changes now

patent pivot
#

Once you do that give me a ping and I'll review it

cold moon
#

Then continue with working on bot

patent pivot
#

who is overseeing voice gating again

#

nice

glass pecan
#

lol

sullen phoenix
#

lol

cold moon
#

@patent pivot Should voice ban support hidden infraction?

patent pivot
#

hmmmm

#

is this on a site or bot side

#

as in, do I need to decide now

cold moon
#

No, I think it's possible to change serializer later

patent pivot
#

ah okay

#

well yeah, I'll have a think about it in the next hour or so

cold moon
#

okay

patent pivot
#

@cold moon DECISION MADE. yeah, we'll be letting users know of this so it will never be a shadow infraction.

cold moon
#

Okay, then I disable it

patent pivot
#

👍

green oriole
#

well yeah, I'll have a think about it in the next hour or so
answers in less than a minute

patent pivot
#

lol

green mesa
#

👀

#

Speedy mods

cold moon
#

Basically site side is ready, I only test it now

#
try:
    Infraction.objects.get(user__id=user.id, active=True, type="voice_ban")
except Model.DoesNotExist:
    voice_banned = False
except Model.MultipleObjectReturned:
    voice_banned = True
else:
    voice_banned = True

this is how this get voice ban status

eternal owl
green mesa
#

.pr 479

dusky shoreBOT
green mesa
#

@eternal owl can u review the pr I have pushed changes

eternal owl
#

okay

green mesa
#

.pr 485

dusky shoreBOT
green mesa
#

This also

#

🙂

#

Tnx

cold moon
#

@patent pivot But what about permanent voice ban?

#

I think site contributing guide should be updated to give information about metricity DB.

patent pivot
#

@patent pivot But what about permanent voice ban?
@cold moon hmmm, well, I presume we should support both?

sullen phoenix
#

if we need to permanently ban someone from voice, it's probably worth just banning them from the whole server

patent pivot
#

I think site contributing guide should be updated to give information about metricity DB.
maybe, yeah. the difficulty is that with docker postgres we can bootstrap it, but not with the host one.

sullen phoenix
#

but it wouldn't hurt to have it

eternal owl
#

@green mesa few more changes on the repos and then should be good to go

cold moon
#

@patent pivot Site PR opened

patent pivot
#

reviewing

#

yep that works great

#

onto code review!

#

reviewed @cold moon

glass pecan
#

looool

#

i was feeling bad for writing that too

#

if only you were slightly slower

#

I could be getting that co-author 😛

patent pivot
glass pecan
#

im glad you caught that second except being useless

#

because

#

it felt weird seeing an except and else block doing the same thing

#

and i was sitting there going ... surely we could combine them with magic, right?

cold moon
#

@glass pecan @patent pivot Changes is now made

glass pecan
#

thanks

#

ill wait on checks and approve

patent pivot
#

hahaha yeah I was watching the commits stream in live

glass pecan
#

yeah already read the diffs too

patent pivot
#

mergedddddddddddd

cold moon
#

I'll continue with Voice Gate tomorrow

brazen charm
#

What would be the right way to do redis things that aren't exposed by async_rediscache? Go through _get_pool_connection for the connection manually?

patent pivot
#

hmmmm, what are you trying to do

brazen charm
#

I'm not that familiar with redis so let me know if it's not possible with the redis policy like mark mentioned

patent pivot
#

ah

#

let me check

#

yeah, object idletime works

#
127.0.0.1:6379[2]> OBJECT IDLETIME ikonireqes
(integer) 21
brazen charm
#

So, just go directly through aioredis' object until it's possible in the wrapper?

patent pivot
#

yeah that sounds good

rapid igloo
#

hi, i need some feedback with this. still gotta implement "pr acceptance" overriding invalid/spam labels, but i can't proceed until i know what i'm currently doing is on the right track : |

#

.pr 475

untold shore
#

Is there any easy way to duplicate the channels/emojis/roles from this server to a test one for testing the bot when contributing?

rapid igloo
#

@untold shore see pins, there's a server template, also for emojis i'm not sure

brazen charm
#

You don't really need the emojis for testing

untold shore
#

perfect thanks

brazen charm
#

What's the end goal for async-rediscache, a simpler wrapper or covering most of what's provided? I'll need to look into how to do it since hashes don't seem to allow expires, but implementing the new methods requires a subclass because of the locks so I thought it might as well be implemented in the package instead of possibly doing it twice

eternal owl
#

hmm 🤔

green mesa
#

Sorry don't look at my GitHub comment

#

😂

#

Check this link btw

eternal owl
#

yes I did

#

I will ask him

green mesa
#

👍

eternal owl
#

If I knew his discord

green mesa
#

He is Chibli

#

He is mod here

eternal owl
#

@nocturne hare hello ! I was just wondering why setting pride_leader_name to None as default isn't a good idea?
imo, the default value is better than the command error handler

cold moon
#

Do we have metricity docker image for local development?

eternal owl
#

Does the bot has some sort of scheduling system? for scheduling message in perticular channels or similar? (a command or something similar)

#

apart from reminders

#

this pic should be updated to also include
METRICITY_DB_URL=postgres://pysite:pysite@localhost:7777/metricity

cold moon
eternal owl
#

looks like we both got it at the same time @cold moon

#

lol

cold moon
#

Yeah, I found this while developing Voice Gate

eternal owl
#

i got the error when I pulled latest data nd tried makemigrations

#

somehow, my docker-compose.yml file already has the env var defined

cold moon
#

You use site repo?

#

This is defined in site repo

eternal owl
#

yes

#

nvm, just ignore me

#

was confused

#

@cold island have we considered using the reminder system for the scheduling of events?

sullen phoenix
eternal owl
#

fire, I think you use update the contribution site guide too

sullen phoenix
#

i'm going to sleep now, so possibly another staff member could do it

eternal owl
#

alright, sleep well 👋

cold moon
#

I just found that bot docker-compose up don't create metricity DB.

rapid igloo
eternal owl
#

hey @cold island , I can give you a demo of the user event feature by today night or tomorrow

#

I am making some changes to the models, I will show it to you during the demo

cold island
#

have we considered using the reminder system for the scheduling of events?
@eternal owl I don't mind using it for reminding the organizer, but when it goes off it should also do other things such as granting the role

#

hey , I can give you a demo of the user event feature by today night or tomorrow
That's awesome! I'll be pretty busy today though

eternal owl
#

oh okay, sorry if disturbed you 😅

cold island
#

No no, all good

#

If there's something I'm used to on this server it's pings 😄

green mesa
#
  File "C:\Users\HP\Desktop\bot\bot\exts\info\python_news.py", line 221, in get_webhook_and_channel
    self.webhook = await self.bot.fetch_webhook(constants.PythonNews.webhook)
  File "C:\Users\HP\.virtualenvs\bot-nF9pOG12\lib\site-packages\discord\client.py", line 1481, in fetch_webhook
    data = await self.http.get_webhook(webhook_id)
  File "C:\Users\HP\.virtualenvs\bot-nF9pOG12\lib\site-packages\discord\http.py", line 241, in request
    raise Forbidden(r, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions```
#

y i get this error

#

i have given all perms to bot

rapid igloo
#

@green mesa is it administrator

green mesa
#

all perms it has

#

in 1.15 something related webhook changed?

cold moon
#

Voice Gate is almost ready!

green mesa
#

noice

green oriole
#

fire, I think you use update the contribution site guide too
@eternal owl what should we change?

eternal owl
#

I got an error when running makemigrations, then I added that to the .env file and worked fine.

green mesa
#

@deleted-role WARNING: Unable to get DEFCON settings!

#

how can i fix this error

#

site is running

patent pivot
green mesa
#

and i dont know what happen to snekbox i fresh installed everything and i am getting this
ClientConnectorError: Cannot connect to host snekbox:8060 ssl:default [None]

patent pivot
cold moon
#

Thanks

green mesa
#

i am running snebox container

brazen charm
#

It'll be behind the docker ip if you're not running the bot in docker

hardy gorge
#

I'm implementing types as we need them

#

I'm currently working on a taskqueue, but to do some things well, I need some features in fakeredis for tests (and dev usage with fakeredis)

#

If there are things you like to see, feel free to open issues

#

It's not going to be a wrapper of redis, as aioredis would already do that, but it's something implements convenient types to work with

#

A queue, a cache, and so on

#

e.g., our cache has a pop method, something that redis does not have. Those custom actions will be made atomic in a future release (once fakeredis releases the script features that have recently been merged)

brazen charm
#

Alright, I'll open an issue and maybe I'll get to it after familiarizing myself with redis and what I actually need with the redis features for the cog more

green mesa
#

It'll be behind the docker ip if you're not running the bot in docker
In host file?

brazen charm
#

snekbox won't restrict the hosts so you can just set the bot to the ip directly

#

or just don't run snekbox if you're not developing something with it

green mesa
#

Ok

#

And what about defcon

#

Y I am getting error

hardy gorge
#

@brazen charm If you describe the feature you'd want, I could also think along to see how we can add it

green mesa
hardy gorge
#

key expiration is something I've been thinking about

brazen charm
#

Just planning currently, but it's for caching the doc command output. Was looking at doing the expire so the keys don't stick around for too long in case the docs are updated and then clearing keys that haven't been accessed for a while through idletime

#

Not sure what the problem could be if the site is running and the bot can connect to it Anubhav, maybe try looking at the exception that's raised

green mesa
#

Ok let me send exception here

green oriole
stable mountainBOT
#
ROGER THAT

Your reminder will arrive in 2 hours!

green mesa
#

2020-10-11 16:12:33 | bot.exts.moderation.defcon | INFO | DEFCON disabled @brazen charm this i am getting

brazen charm
#

Are you planning on doing more with the guides Akarys? The docker ip/hostname could also use a redo as machine is not available on win through docker desktop anymore

#

defcon disabled is fine

green oriole
#

I think once the bootstrap project we'll be done, I will take at good look at the guides, yeah

green mesa
#

and one more thing when bot gets connected it doesnt show any msg

#

in devlog

brazen charm
#

Cool, will you keep it in mind or should I open a meta issue?

#

The message doesn't get sent in the debug mode

green mesa
#

oo

green oriole
#

Maybe opening a meta issue saying what you think is missing is a good idea, yeah

green mesa
#

tnx look like bot is setup

cold moon
#

@patent pivot Do you have Voice Gate channel ID and role ID? I will open PR after I finish writing unit tests for voice ban command.

patent pivot
#

@cold moon

channel: 764802555427029012
role: 764802720779337729

cold moon
#

👍

green mesa
#
bot_1       |     return _run_code(code, main_globals, None,
bot_1       |   File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
bot_1       |     exec(code, run_globals)
bot_1       |   File "/bot/bot/__main__.py", line 50, in <module>
bot_1       |     intents = discord.Intents().all()
bot_1       | AttributeError: module 'discord' has no attribute 'Intents'```
green oriole
#

If the Pipfile does, then yes

#

You might need the build flag

green mesa
#

how 😅

#

pipfile has 1.5

hardy gorge
#

try docker-compose down && docker-compose up --build or something

#

The latter by itself should probably already do the job

#

Basically, you need to rebuild your container, as it will otherwise use the version that was already built before (with the older versions)

green mesa
#

oo

green oriole
#

The latter should be enough, yeah

green mesa
#

ty Ves Zappa and Akrays now its working

#

ty so much

#

now even snekbox is working

rapid igloo
green mesa
#

i wnt to add transcan emoji id but when i edit constants.py of seasonal bot git detects it

#

how can i add it via env file or is there any alternative so i can add it without disturbing actual code

#

?

cold moon
#

And Voice Gate PR is here!

patent pivot
#

lol

#

tvban

cold moon
#

Yeah... I tried to find one short alias

stable mountainBOT
#

@green oriole

It has arrived!

Here's your reminder: [#dev-contrib message](/guild/267624335836053506/channel/635950537262759947/).
[Jump back to when you created the reminder](#dev-contrib message)

green mesa
#

iceman i have pushed the changes to both branch bug_ec and prideleader also

#

when u r free, can u have a look please😄

neon phoenix
#

What's a voice gate?

obsidian patio
#

From what I’m aware, it’s about voice moderation tools. Like banning, muting and silencing

cold moon
#

Not currently

#

Currently this just control who can have access to voice channels and who don't

obsidian patio
#

Ah ok. Who shouldn’t have access?

cold moon
#

You need to have x (50) messages, you have been verified your account more than y (3) days ago and you have to be not voice banned in order to get access to voice channels.

#

There will be voice gate channel and voiceverify command.

obsidian patio
#

Ah ok. So everyone who wants to get access to the voice channels will have to type “!verify” or something there?

cold moon
#

!voiceverify or one of it aliases

#

And staff can remove your access from voice channels with Voice Ban, that remove Voice Verified role.

obsidian patio
#

Ah ok, nice

#

I assume that’ll decrease the amount of traffic in the voice channels quite a bit

cold moon
#

I don't think so. This will just help moderate things. Those who want help with voice will verify their account and then they can get help again.

obsidian patio
#

We’ll see how it goes, but I think that extra friction will increase the friction enough to remove a few of the “just poppin’ in” types of users

patent pivot
#

we did run the numbers to figure out who was eligible

#

let me run them again

#

2,903 people are eligible

obsidian patio
#

Only 2,903 people have sent 50+ messages here?

sharp timber
#

That can't be right

#

That might be right for "users that have ever joined voice" matching those... maybe

obsidian patio
#

@patent pivot what did you query?

patent pivot
#

the message stat only tracks since august 25th bear in mind

obsidian patio
#

Hmm, I guess it makes kind of sense, then

patent pivot
#

actual query is uhhh

#
SELECT COUNT(*) FROM (SELECT author_id, COUNT(*) FROM messages LEFT JOIN users ON users.id=messages.author_id WHERE users.verified_at < (NOW() - INTERVAL '3 days') GROUP BY author_id ORDER BY COUNT(*) DESC) sub WHERE count >=
50;
#

we do two separate queries to determine if a user is voice eligible, but this is my hacky number generating one

cold moon
#

Maybe hackstats command should count mature time too before showing has earned tshirt or tree

surreal gulch
#

yeah I agree

full burrow
#

You'll need see if:
a) a repo has a hacktoberfest label
b) or the specific pr has a hacktoberfest-accepted label

#

(From a cursory reading, at least)

lime mural
#

there's an issue already open for it

#

and someone's working

#

on it

rapid igloo
#

yes me

#

and no one has reviewed my pr yet

#

i really need reviews and had been asking for days

#

@green oriole @obsidian patio r u free?

vocal wolf
#

Reviews take time. We're all volunteers, you must be patient.

rapid igloo
#

ok

#

i know but people r gonna use hackstats more and more often

vocal wolf
#

What did you PR?

obsidian patio
#

Not this next day. Preferably someone else will have time to review it

rapid igloo
#

@vocal wolf

#

.pr 457

obsidian patio
#

Have you fixed the logic of it to work with the rules?

rapid igloo
#

oops

#

475

#

yeah

#

but there's one more where the acceptance has to override inlaid/spam

#

this involves more api calls

#

1 for checking merge and 1 for checking approval

#

so i need review before i do that to making what i'm doing is ok

#

@obsidian patio would it be a problem if at least 2 or 3 api calls r needed in the end

#

for each pr

obsidian patio
#

If that’s what’s needed, that’s what’s needed. I wouldn’t have anything against trying to reduce that number, as long as it won’t compromise quality

rapid igloo
#

ok then i'll try to do more checks to avoid the same calls for every pr

#

also r we supposed to list the pending ones (not approved yet) as well or, just the accepted (waiting for 14d timer) ones

obsidian patio
#

I really don’t know about their API, but I’d love to see some good Code

#

What do you think would be logical?

rapid igloo
#

probably both but list them separately

obsidian patio
#

Hmm. I think we should try to make it similar to the Hacktoberfest status page on what gets listed

#

And I think they count ones that aren’t accepted yet (count as in “increases the counter”)

rapid igloo
#

yeah i think so

#

in the x out of 4 prs

obsidian patio
#

Yeah

#

I have to sleep now. Will hopefully have time to review the updated version on Tuesday or Wednesday

rapid igloo
#

sure good night

#

btw it's 7am in the morning for me lol

green mesa
#

We can use server pfp as our pfp

#

?

rapid igloo
#

@green mesa probably more suitable in #community-meta but i don't think there's a rule against putting pfp as that 🧐

green mesa
#

Oops sorry

#

It's more related to branding

#

@rapid igloo

rapid igloo
#

i think its related to rules and moderation

#

tho

green mesa
#

Yes and u can't use other logo branding images unless u take permission from the owner

sullen phoenix
#

have you read the license?

green mesa
#

Me?

nocturne hare
#

@nocturne hare hello ! I was just wondering why setting pride_leader_name to None as default isn't a good idea?
imo, the default value is better than the command error handler
@eternal owlI'm not a fan of default None as a default parameter, when there's a feature in the library which handles missing parameters.

#

That's just my opinion on it

#

However, I'm fine with either way. It was just an opinion.

eternal owl
#

Oh, I feel an error handler is for catching errors due to un-expected behaviours, in the pride_leader_name case, not passing a pride_leader_name is an expected behaviour(so we can generate a random pride leader embed).
what do you think?

rapid igloo
patent pivot
#

😄

rapid igloo
#

It popped out of nowhere lol

eternal owl
#

ye

#

awesome

#

wow contributors can type there

patent pivot
#

lol

#

can they

#

shit

eternal owl
#

aww

obsidian patio
#

Nice!

patent pivot
#

fixed?

eternal owl
#

yea.....

patent pivot
#

okay

obsidian patio
#

@patent pivot could we move it above #dev-log?

patent pivot
#

we could, but I didn't want to break muscle memory

#

should be alright though lol

obsidian patio
#

I just think that looks better

patent pivot
#

yeah

obsidian patio
#

But yeah, awesome with that channel

eternal owl
#

i did not get this line You can also expect to see things about code reviews and contribution stats to our projects!

#

does this mean guides?

patent pivot
#

no it means like

#

Hemlock may announce reviewer of the month or something

obsidian patio
#

It could be things like "Reviewer of the month", "stats of PRs of the month" and similar

patent pivot
#

yeah

#

that

eternal owl
#

oh okay

neon phoenix
harsh veldt
#

Hi! In bot's contributing guide (https://pythondiscord.com/pages/contributing/bot/) you stated that you have to create server setup like described in config-default.yml file. And you wrote there

we're working on a solution
Well, why don't you just make a template of server? It require no more than 3 or 4 clicks. At least it sets up the channels, categories, roles still better than creating everything from scratch

green oriole
#

We have a template in the pins

#

I guess we should add it to the guide

#

However you'd still have to manually copy the IDs

harsh veldt
#

We have a template in the pins
oh okay thank you

green oriole
#

But we are working a new solution to do that automatically, stay tuned lemon_pleased

harsh veldt
#

However you'd still have to manually copy the IDs
yeah, but still I thought there was no template, since there's nothing about it in the guide

rapid igloo
#

i think a sample .env file should be added (both seasonalbot and bot) because then the user can replace the values with the actual ones without having to copy/paste each variable name

green oriole
#

!remind 1h add the template to the contrib guide

stable mountainBOT
#
Alright.

Your reminder will arrive in 1 hour!

green oriole
#

We do have a template in the guide

rapid igloo
#

Oh ok

harsh veldt
#

i think a sample .env file should be added (both seasonalbot and bot) because then the user can replace the values with the actual ones without having to copy/paste each variable name
there's a sample

cold moon
#

@patent pivot But what about automated announcements in #dev-announcements ? Like monthly stats and new contributors and core devs?

patent pivot
#

maybe

#

I mean

rapid igloo
patent pivot
#

I think the things will always be better with a human touch

brazen charm
#

Doing contrib stats in there feels game-y to me

green oriole
#

Yeah this one hedy

rapid igloo
#

But thats a table

#

I meant an actual file

#

With all the keys

patent pivot
#

@brazen charm yeah, what we discussed was less so to try make contribution competitive, but more to encourage contribution, and specifically encourage code reviews

rapid igloo
#

Because when u copy that the descriptions r copied

green oriole
#

I don't think we would do a per contrib thing, but more a like, "here are the major highlights of the month"

patent pivot
#

yep

green oriole
#

I am planning on more or less nuking the guides we already have to make them more similar and more handy to navigate anyway

brazen charm
#

@hardy gorge Mind pinging me when you have the time to discuss some of the redis stuff?

green oriole
#

@rapid igloo it would be nice if you can comment on meta#60 though

#

.issue 60 meta

rapid igloo
#

Win docker?

#

Im not familiar with docker

cold moon
#

I think we still should automate like general summary (issues opened/closed, PRs opened/merged/closed, commits made, contributors list (without any competitive stats, just a list)) and contributors and core dev adding announcement.

#

These stats should be sent out in first day of every month.

#

And contributors + core dev announcements should be sent out when bot detect role adding.

green oriole
#

@rapid igloo I've renamed the issue, don't worry it is just about updating the guides now

#

@cold moon it would feel pretty impersonal; we have enough core devs to do that manually

#

Besides, when someone gets a new role for example, we would like to highlights why they got this role

#

Same the important issues/PRs, we want to explain why this are important

cold moon
#

No, I don't mean highlighting specific issues/PRs with automation, just numbers.

green oriole
#

Ah, right

#

Maybe we would have a little script to generate the numbers, yeah, but I still do think that we want some highlights to go with those numbers

hardy gorge
#

@brazen charm Sure. I'm currently doing some other work that I need to do first. There's an update coming soon that changes some of the internal functionality and adds a few new features. It depends a bit on the release schedule of fakeredis (although I'll publish it with the workaround if fakeredis doesn't release soon).

stable mountainBOT
#

@green oriole

It has arrived!

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

obsidian patio
#

do it

green oriole
#

Done

#

My god, you have to write html to make a link

#

Now I understand why we are switching to markdown haha

cold moon
#

Contribution pages will be still HTML

#

Just static HTML

green oriole
#

Really? Is there a reason why?

harsh veldt
#

@green oriole What you mean by "switching to markown"?

#

Using jekyll or something?

green oriole
#

We will use html rendered from a markdown file

cold moon
#

Because when you look at current contributing pages, they have some HTML components what you can't put to Markdown.

green oriole
#

I don't know the exact implementation though

#

I mean

#

Isn't there a field in markdown to input raw html?

cold moon
#

lemon said that these articles have to be so simple plain MD how is possible without HTML.

green oriole
#

I don't understand

hardy gorge
#

The main thing is that most of what we're doing is basic, repetitive functionality

#

Which means that we should not have to solve that by turning what is supposed to be a markdown page into an HTML page

#

Which is what is happening now with the wiki

#

We want things like sidebars, boxes, and so on, which makes us insert a lot of HTML

#

We hope to do away with that for a big chunk of the website and @crude gyro is the main coordinator of that project

#

Things like articles, guides, and most of our pages (the content part) are completely doable with just markdown

cold moon
#

Markdown make this also easier to write because you can use GitHub for it, what have preview.

hardy gorge
#

Other things may be easier to solve with html or the combination of a specific Django template for that section + markdown for the content

green oriole
#

Why don't we use markdown for the content then, yeah

#

Also, we can add a table at the top of the markdown file with the special things you want to include, like the navbar and such

hardy gorge
#

I think that part of the confusion is now because we've split up different parts of the project into different issues

green oriole
#

It is what github pages does

hardy gorge
#

That ks is now working on the guides and the resources landing page, does not mean we won't use markdown for other parts of the website

green oriole
#

Well, the contributing guide is a guide atm

#

I think it is worth exploring if we can convert it to markdown anyway

hardy gorge
#

It currently uses a lot of HTML and CSS tools for the organization of the page, doesn't it?

green oriole
#

I'm looking at the source, I don't see a lot of html except for the navigation box at the top, and the warning boxes

hardy gorge
#

Which page are we talking about?

green oriole
#

The contributing guide

#

I'm looking at the bot atm

hardy gorge
#

It's mostly markdown right?

#

Only the part that's nested within those columns is necessarily HTML, as markdown within an HTML block does not render

#

Which is the main issue with some of our other pages, as everything is within a column div

green oriole
#

Hmm, can't we make the renderer an html class, to have markdown inside html?

#

(I have a very basic knowledge of html though, not sure if that's possible)

#

It's mostly markdown right?
Some things like the links aren't, it is quite frustrating

#

Wait

#

Oh

hardy gorge
#

The top section, which is the column layout, is HTML

#

Everything below that is in markdown

green oriole
#

It seems like we can have a markdown link, yeah

#

I'll have to clean this up later haha

cold moon
#

Oh! GitHub Markdown support HTML!

#

Then I think we should use this.

#

I'll look later how will some contribution page look like when using Markdown for it.

cold moon
#

Is it possible to take out one of current contributing pages as HTML? I just don't want to start figuring out what HTML this uses.

crude gyro
#

raw html is bad

#

why are we talking about it

#

the whole point of the dewikification is to stop using html in our markdown templates

hardy gorge
#

Yes

crude gyro
#

I'd prefer we just disable the feature if they support it.

#

any page that needs HTML, we should just make a regular template page

hardy gorge
#

It should be trivial to create a DTL page with a fixed side bar for a section of the website with the content block still markdown

#

That's what DTL does best

crude gyro
#

yes.

#

exactly.

#

we'll solve that with some sort of component

hardy gorge
#

And that's what I was getting at earlier: We should be able to do about everything we do in the content section with markdown only.

#

Any special sidebars or blocks can be solved in DTL

crude gyro
#

and then it would be nice perhaps to support a few markdown extensions, though.

#

like.. markdown has no way to embed a youtube video, but it'd be nice if we added an extension that allowed it

#

perhaps. not sure how easy it is.

hardy gorge
#

Some markdown engines allow you to add custom tags

#

[youtube <youtube id>] would work well

crude gyro
#

yeah exactly

#

would be great if we could do that

#

but I don't want raw html

cold moon
#

Currently content app uses markdown2 and this don't allow custom extras.

patent pivot
#

split test starting on forms app

#

75% of users will get the new TS/TSX compiler

#

if anything breaks and a sentry form pops up please fill it in

glass pecan
#

but you're just gonna sell my data

patent pivot
#

lol

#

wait split test cancelled lol I am building to the wrong directory on CI

#

starting in like 5 minutes then

hardy gorge
#

@cold moon It doesn't?

#

Ah, it does not

#

It does provide extras, but they are hardcoded into a monolithic file

#

hmm

cold moon
#

Yeah

#

This code is hard to read because everything is in 1 file

cold moon
#

Of course we can implement regex parsing for HTML to find these tags and replace them with iframe.

hardy gorge
#

It's not that difficult to work around the markdown plugin

#

I think you apply a DTL filter to a tag right?

#

We could implement our own filter that combines the markdown processor with something that just replaces our custom, simple tags

#

We probably don't need stuff like open-close markdown

#

Just things like [youtube id]

cold moon
#

So we should make our own class that inherit Markdown class?

hardy gorge
#

Uh, I've not looked at the implementation details of the markdown feature

#

I don't think we need to inherit anything

#

Normally, you have something like this in your template, right?

cold moon
#

Yes

hardy gorge
#
{{ content|markdown }}
cold moon
#

Oh, you mean this!

hardy gorge
#

we could write our own template filter that applies the markdown filter and does our own simple replacement, outside of the entire markdown extension

cold moon
#

OK, now I understand. I'm going to create this when I finish eating.

hardy gorge
#

I'm not saying that we should go this route

#

So, don't work on that yet

#

Ultimately, we may come to a better design for it

#

And it's @crude gyro's call to make

green mesa
#

Y we don't use Jenkins?

crude gyro
#

why would we?

patent pivot
#

lol

cold moon
#

@crude gyro What you think? Should we use markdown filter or like our own instance of markdown class to add our own MD stuff?

crude gyro
#

I don't know, I'd have to look at the package first. it doesn't need to be solved right now.

cold moon
harsh veldt
tough imp
#

that would be useful yea

#

would you like to make a PR to fix it?

harsh veldt
#

well, I'm thinking of making a PR(not for this), but fixing one line isn't a good commit i guess.

tough imp
#

I don't see anything wrong with it

harsh veldt
#

I'm fixing it

tough imp
#

cool thanks

#

feel free to @ me with the PR once it's ready

harsh veldt
#

it's performing checks

#

@tough imp it's ready to merge

tough imp
#

cheers

harsh veldt
green oriole
#

Is it actually in the source code?

#

!source eval

stable mountainBOT
#
Command: eval

Run Python code and get the results.

Source Code
harsh veldt
#

Is it actually in the source code?
@green oriole idk,

green oriole
#

Oh

#

I see

#

Hmm I'm not sure how to properly fix that

harsh veldt
#

!source help eval

stable mountainBOT
#
Help Command

An interactive instance for the bot help command.

Source Code
harsh veldt
#

where is the help command for commands stored?

green oriole
#

It is in the docstring of the command

harsh veldt
#

I see

harsh veldt
#

Is python discord github bot open source?

cold moon
#

No, because this is not wrote in Python

harsh veldt
#

oh okay

#

in which language is it written?

cold moon
#

Huh, I don't have currently to search but this is mentioned somewhere in this chat.

harsh veldt
#

okay I'll search

#

why didn't they used python for it?

#

I just prefer the elixir libraries for github & wanted to do an elixir thing

green oriole
#

If you are womdering why it isn’t open source, it is because there’s a token somewhere in the history and we are too lazy to reset it haha

harsh veldt
#

isn't there something like "Regenerate token" for GitHub?

green oriole
#

Yeah

lime mural
#

isn't that simply a webhook

green mesa
#

@eternal owl do u wnt me to remove error handler still? or i can skip

#

btw both of my pr are ready for review if u r free can u have a look 🙂

eternal owl
#

im not sure about the error handler, keep it I guess

green mesa
#

ok

eternal owl
#

I will do another review tonight

green mesa
#

tnx

#

actually only 4 day are left for passing mature time

#

and 2 of my pr are not merged yet

cold island
#

@eternal owl you wanted to talk about the events system right? I think I'll be available later today

eternal owl
#

thats awesome. Do you have any perticular time you will be available at?

#

like x number of hours from now

cold island
#

I think like in 4-5 hours

eternal owl
#

alright I will tag you by then

cold island
#

👍

green oriole
#

isn't that simply a webhook
@lime mural well, webhooks are github -> bot, you need a token to go the other way around

lime mural
#

but isn't it just github sending updates to the webhook

green oriole
#

Yeah

lime mural
#

I don't see why it needs to communicate in the other direction

green oriole
#

But the python bot also send comments and add and remove tags

lime mural
#

Ohh, that might be a different setup yeah

brazen charm
nocturne hare
#

im not sure about the error handler, keep it I guess
@eternal owl @green mesa -> @glass pecan Probably knows what's best, what i suggested is just a preference, scrags probably knows what is best here. (and others, im just brainfarting out a single name atm)

glass pecan
#

WAT

nocturne hare
#

:O

glass pecan
#

i dunno what the context is so i'll have to read up a bit

nocturne hare
#

its the difference between doing ctx, somevar = None -> if somevar is None: ... vs ctx, somevar -> errorhandler for missing argument

#

in essence

glass pecan
#

where is this

nocturne hare
#

seasonal bot, prime leader iirc?

eternal owl
#

Ye we both made opposite comments

glass pecan
#

oh its in a review?

eternal owl
#

Yes let me get the link

glass pecan
#

i think i gots it now

green mesa
#

one more comment is oppo i guess lol

glass pecan
#

anub, can you edit that PR's description so the closes statement isn't in quotes

#

lol

green mesa
#

ok 😅

glass pecan
#

thanks

green mesa
#

np

glass pecan
#

yeah i probably wouldn't handle random choice in an error handlier, sorry @nocturne hare

#

the primary usage will be to treat the name arg as optional, and giving it a default of None reflects that

#

the behaviour of random choice when the optional arg is not given is also a purposeful behaviour, rather than something erroneous that's being handled, so I feel like it's better representative to keep all that logic within the command itself.

#

i totally agree to the comment about the function name

#

always descriptive names, short versions of things can be aliases

#

i'm not 100% on agreement that all embed generation should be in a standalone function either, which is something @eternal owl suggested. it's nice for organisation if the command logic is chunky or if the embed needs to be built by multiple functions, but i'm not sure that's the case here.

nocturne hare
#

It may have come out as "this is the correct way", but i did mean to add it as a consideration. It sounded correct to me then, but I do agree that all the "expected" logic should be part of the command

glass pecan
#

coolio

nocturne hare
#

I stand corrected

glass pecan
#

this is still just my own opinion ofc, i'm definitely not some mandate on whatever should be the one and only way things should be lol

eternal owl
#

👍

nocturne hare
#

Nah, I agree.

#

I just feel like something = None ... feels off

glass pecan
#

lol

#

understandable

nocturne hare
#

Does something: Optional[str] accomplish the same?

glass pecan
#

but command sigs are the most important thing in this case

#

oh that was something i was definitely going to mention too, just hadn't finished typing

#

the typehint gotta match

nocturne hare
#

Cause that reads better to me yeah

glass pecan
#

so if it's defaulting to None, it's gotta be Optional

#

@green mesa will need to address that

nocturne hare
#

But do you need the default value with optional

#

is what i meant

glass pecan
#

in a command function, i'm reasonably sure you should provide a default for optional args, yes

nocturne hare
#

As in, does it have to be something: Optional[str] = None

glass pecan
#

yeah

nocturne hare
#

darn

green mesa
#

i love git now lol

#

i can check my early code heheh

nocturne hare
#

You probably have a bigger chance of knowing than me, scrags. Was defaulting optionals types to None ever part of the command spec?

glass pecan
#

the cleanest setup tbh would be to make a PrideLeader class that has the appropriate attributes, a method to produce a friendly embed, a classmethod to fetch a random instance and a convert classmethod that can be used in command typehints to provide a ready-to-use friendly object in the command function that both validates the command argument given and can do fuzzy matching.

#

at least, that would have been my approach

#

hmm not sure chibs, i'll have a look

nocturne hare
#

I believe i mentioned a converter, either for this or some other PR

green mesa
#

for zodiac u mentioned

nocturne hare
#

aha, well the concept is the same here

#

If it's not provided, the converter would select the random name for you

#

instead of default None

#

At least, i think that's plausible

glass pecan
#

i think you'd still have to default to None, and just do

#
leader = leader or PrideLeader.get_random()
green mesa
#

hmm

glass pecan
#

chibs, typing.Optional converter allows for skipping the parameter

nocturne hare
#

glass pecan
#

so in that case you wouldn't need to = None

#

but i do not know what happens with the consume args

nocturne hare
#

I knew i had seen that somewhere :P

#

It's worth the attempt in my eyes >:(

#

pet peeve against = Nones

glass pecan
#

lol

#

they're fine

#

ill try make a fake command though in a bot i have in dev mode

nocturne hare
#

You don't know my struggle scrags

#

We have nullable BOOLS in our production code

glass pecan
#

nullable bools?

nocturne hare
#

nullable bools

#

As in, we have to check if they're null first

glass pecan
#

is this another name for tribool

nocturne hare
#

we also use nullable ints..

#

There are so many nulls

glass pecan
#

we don't have nulls

tough imp
#

lol I heard someone call it troolean

glass pecan
#

we have Nones

nocturne hare
#

Ye, which is why i don't like None related code, without a reason

glass pecan
#

what was the reason, again

nocturne hare
#

A default None paramter sounds like a "this might go wrong, so we'll double handle it" in stead of trusting the usage of the function

glass pecan
tough imp
#

it's fairly common for optional dependencies

glass pecan
#

i don't understand that stance lol

#

i have =None for lots of things

#

even my new paginator class uses it

nocturne hare
#

In python you'd have to use kwargs probably to not having to default none where its required

glass pecan
#

i use =None for kwargs lol

#
    def __init__(
        self,
        *,
        header: t.Optional[str] = None,
        footer: t.Optional[str] = None,
        line_spacing: bool = False,
        max_lines: int = 15,
        max_line_chars: int = 2000,
        max_page_chars: int = 2000,
        public: bool = False,
        timeout: int = 300,
        delete_on_timeout: bool = False,
    ) -> None:
nocturne hare
#

as in **kwargs

glass pecan
#

**kwargs is disgusting

rapid igloo
#

lol

glass pecan
#

dpy uses it everywhere

#

useless for ide autocompletion

#

also shitty for docs

nocturne hare
#

Doesn't it parse docstring as well for typehints / autocomplete?

glass pecan
#

it does, yep

#

some things just aren't though

#

Bot.run

#

Embed

#

anyhow, that's just one instance above

#

there's another

#
    async def start(
        self,
        ctx: t.Optional[Context] = None,
        *,
        bot: Bot = None,
        user: t.Union[discord.Member, discord.User, None] = None,
        channel: t.Optional[discord.TextChannel] = None,
    ) -> None:
#

the exact thing you hate lol

green mesa
#

👀

nocturne hare
#

Maybe I'm just a grumby old chibs ¯_(ツ)_/¯

glass pecan
#
        """
        Start the pagination session.

        Any `user` or `channel` arguments given explicitly will always be used instead of the values on `ctx`.
        This would allow pagination to occur in another channel, for example.

        `bot` and `channel` become required arguments if `ctx` is not provided.
        `user` becomes a required argument if `ctx` is not provided and `public` is `False`.

        Supporting sessions without `ctx` ensures we can make use of paginators when it isn't available,
        such as from an event handler or on bot start.
        """
#

the behaviour requires it

nocturne hare
#
t.Union[discord.Member, discord.User, None]``` this though 🤔
glass pecan
#

yep

nocturne hare
#

Shouldn't that... teeeeechnically be t.Optional[t.Union[discord.Member, discord.User]]

glass pecan
#

it's the same thing, without the nesting

nocturne hare
#

sure

#

but one is more verbose imo

eternal owl
#

you cannot pass more than 1 arg to Optional?

glass pecan
#

you cannot

#

it takes a type

nocturne hare
#

Also, can't you specify a parent class in types?

glass pecan
#

you can, yep

nocturne hare
#

User is the parent of Member, iirc, so why not just t.Optional[discord.User]

glass pecan
#

discord.abc.User

#

is actually the one i'd have to use

#

which i can

#

but it wouldn't autocomplete the member attributes, such as .guild

nocturne hare
#

Oh, am i throwing hate at your code?

glass pecan
#

nope

nocturne hare
glass pecan
#

we're just having fun bouncing off each other, no? lol

nocturne hare
#

I'm venting my frustration of our production code on other unrelated code, but with similar properties

#

:=

glass pecan
#

tbh i like going through my code

#

don't get enough feedback sometimes, especially for boring things like these

#

like, who'd actually willingly spend half an hr trying to understand a boring paginator

nocturne hare
#

Doesn't python support the | operator for types?

glass pecan
#

does it?

#

i don't know about that one

nocturne hare
#

as in, does it?

glass pecan
#

i have never seen it

nocturne hare
#

It's used in typescript a lot iirc

#

i forget if it's a c# thing

glass pecan
#

probably

nocturne hare
#

we just have interfaces for literally everything, one is bound to fit the 2 im trying to pass

rapid igloo
#

i thin python has | its the bitewise or operator

glass pecan
#

it is, yep

#

but typehints are already weird

#

as in, they have nonstandard behaviour for things that used to be established

#

so throwing in a custom behaviour for the bitwise or to support shorter unions wouldn't be a terrible idea

tough imp
#

it's accepted but I don't think it made it into 3.9

glass pecan
#

especially since typehints can runaway in complexity sometimes

tough imp
#

oh, planned for 3.10

nocturne hare
#

that's good news at least

rapid igloo
#

in 3.9 isnt there a dictionary merge thing that involves |

tough imp
#

yes

glass pecan
#

in fact, there's a flake8 annotation complexity checker these days

#

which is nice

nocturne hare
#

ye this looks nice

glass pecan
#

i assume it just returns a typing.Union

#

which would be fine

nocturne hare
#

probably, but the syntax would remove nesting from a lot of typing

glass pecan
#

yep

#

but with future annotations being strings in future, i'm unsure if that will be all that useful for inspection lol

#

code like dpys converter typecasting might eventually need to manually re-add some of this logic

#

or just give up doing converters

nocturne hare
#

hah, that's a fun "but it will break with this" ```py

class M(type):
... def or(self, other): return "Hello"
...
class C(metaclass=M): pass
...
C | int
'Hello'```

glass pecan
#

ye

#

i override a fair bit of behaviours in some of my own code

#

not very pythonic of me lol

nocturne hare
#

There's too much freedom in python 🙈

rapid igloo
#

lol

nocturne hare
#

Time to make Go syntax with python keywords

glass pecan
#

@nocturne hare btw it works

#

got distracted talking crap lol

#
    @commands.command()
    async def test(self, ctx, *, thing: t.Optional[int]):
        print(thing)
        await ctx.send(str(thing))
#

no = None required

nocturne hare
#

neat

#

Then that's my preferred way of doing it

#

Time to monkeypatch something into my python to make that a globally available feature

glass pecan
#

yeah that's fine by me now that i know at least it works for consume

#

since it should still indicate it's Optional in the cmd sig

#

anywho, i'll disappear again for a while

eternal owl
#

hey @cold island , are you available tomorrow? I don't think I can make it tonight with the full version complete, I still have a few commands to go on the bot side(site is complete)

cold island
#

Sure, no rush

eternal owl
#

thank you and sorry for the trouble

cold island
#

np

#

did you see the comment I left 2 days ago on the bot issue?

eternal owl
#

Yes I did

green mesa
green oriole
#

They are way too many info here IMO

green mesa
#

yes

green oriole
#

And both url should just be markdown links

tough imp
#

package name could be the title and link the homepage, and then the summary could be the embed description

obsidian patio
#

.gh gustavwilliam

dusky shoreBOT
obsidian patio
#

Like in this command

green mesa
#

woa

#

noice work man

obsidian patio
#

Ah, I didn’t make it, but I reviewed it

green mesa
#

on android embed is looking broken

#

and on pc its looking nice

#

can i skip maintainers ,i am asking this because most packages dont have maintainers

green oriole
#

Yeah

#

Is there a limit to the description length? Because I can imagine some would be pretty lengthy

green mesa
#

i am using summary as description

cold moon
#

I think Project URL and Download command should be too in description, and download command should be inside inline codeblock

obsidian patio
#

Yeah. That would be good

green oriole
#

The download command shouldn’t even be there

obsidian patio
#

Why not?

green oriole
#

It is always pip install <package name>

#

it is just taking place on the screen for nothing

#

Besides, you’d check the pypi page before downloading a library, and the command is on it

obsidian patio
#

Yeah

#

Are you sure that the download name is never different?

green oriole
#

I never seen any different name, I don’t think that’s possible

obsidian patio
#

Hmm. Probably not

green mesa
#

when i added title and description with inline = true its started looking weired

#

what u think i should add or remove 😅

thorny obsidian
#

I don't think monthly download is that useful

green oriole
#

Besides it seems kinda broken haha

tough imp
#

I think you should be conservative with what the embed contains, I see the feature as something you use to get a clickable link to open the PyPI page and maybe the repo, not something that will give you all information you may want to know

green mesa
#

actually in my issue these things are mentioned

Name
Summary
Author
Maintainer
Project URL (PyPi)
Homepage
Required Python version
Latest version
License
Downloads (last month)
Quick installation copy paste string```
green oriole
#

You should also get rid of the download command, and make the project url amd homepage (one word) just two little button at the bottom of the embed

green mesa
#

thinking of getting rid of downloads also

#

i dont think its that much useful

#

how about this

green oriole
#

I don’t think the python versions are really great, befause they end up being oretty spammy

#

Also, can you apply my suggestions please?

green mesa
#

all dont have this much spammy

#

sure

obsidian patio
#

Do we really want maintainer?

green mesa
#

it will show if its present

#

else skip it

obsidian patio
#

I mean if we actually want to include it

timid sentinel
#

Why is monthly downloads negative?

tough imp
#

I don't think the API provides the information anymore

#

the API just returns the values to not break current software

green mesa
#

actually api gives negative value

timid sentinel
#

It should be removed then nevertheless

subtle kraken
#

It gives negative value to not break already existing tools that use the api.

timid sentinel
#

I think it would be sort of nice to have a bit more of a description tbh, but not sure how well that could be done, maybe textwrap.shorten the first something characters of the main text?

#

Not sure how well that would work though/how useful I would end up being

green mesa
#

actually thats summary 😅

#

some package have lots of info in required python

#

and some only one

timid sentinel
#

actually thats summary 😅
@green mesa yeah, I know the summary is there, I'm just thinking it would be nice to also have some of the main text, i.e for docker it could takeA Python library for the Docker Engine API. It lets you do anything the docker command does, but from within Python apps – run containers, manage containers, manage Swarms, etc.

#

Maybe not necessary though

green mesa
#

their description is readme file of their package

#

need some regex magic to get actual text 😅

#

or markdown

cold moon
#

This is not possible to get this full summary, because there isn't any structure forced.

patent pivot
#

forms app is small now

green oriole
neon garnet
#

@green mesa The PyPI icon may be better to use as a thumbnail

obsidian patio
#

Or the logo of the package

green mesa
#

Ok sure btw y all have gurkan in name?

#

What it symbolises

green oriole
#

It is the 🥒

green mesa
#

Cucumber?

#

😅

obsidian patio
#

Gurkult

cold moon
#

I think this should check does package have logo and when it don't have, use PyPi logo instead.

green oriole
#

Does the API even provide a logo?

obsidian patio
#

Yeah. That would be good

#

If not, let’s just use the PyPi logo

green oriole
#

Like, I never seen any package logo anywhere on pypi

#

Nah, I don't see anything on the response

green mesa
#

Same here

full blaze
#

How does a beginner get involved with supporting the python discord?

cold moon
#

I think Last updated field should be in embed, because this is good to see is this package still active or not.

subtle kraken
#

@full blaze generally it is,
You look through issues on given project of ours,
If you find any interesting one you check if no one is working on it yet and:

  1. if no one does, you can comment on it so core-dev can assign you to it and you can start working on it
  2. if someone works on it then check if they still are working on it [eg if they have said they will do it 6 months ago you might want to re-check that], if they still are working on it you gotta pass on it

You can also look suggest things for our projects, and if we accept those suggestions you can also work on them
You can also look for bugs within our code and tell us about it and work on it

full blaze
#

@subtle kraken Some projects have easy or first projects that are identified to jump in with, do we maintain any of those?

brazen charm
#

Most of seasonalbot's issues should fit it, they also should have the good first issue and difficulty tags

lime mural
#

The Python bot greets the user on opening issues and Pull request on github, how is it done?

#

I tried using Github Action but it kept saying insufficient permissions

patent pivot
#

we have a webhook from github to our app, when we get a new PR opened we check if github is saying it's a new contributor, if it is we send an API call to github to add a PR comment

lime mural
#

ohh so it's a separate app running? is it open source 👀

patent pivot
#

not as of now, I've been meaning to rewrite it

lime mural
#

Oh cool, thanks

cold moon
#

@patent pivot I'm planning currently library github.py that will have HTTP Client only and Webhook + HTTP Client and I plan to make this asynchronous, HTTP will use aiohttp and Webhook Starlette. Maybe when I finish it, PyDis GitHub bot should use this?

#

Or maybe this use GraphQL, not sure yet

cold moon
#

@crude gyro I got idea about articles app: Currently this is loading all data over and over again from filesystem and last modified + contributors from GitHub every time when somebody visit article. But what about in ready function in AppConfig fetching all guides, categories and GitHub data at once and store them to cache, because in order to modify article, this have to redeploy, what means this cache everything again.

green oriole
#

I’ve been looking at the github api, I couldn’t find anything about contributors and last modified times

cold moon
#

File commit listing

#

There is every contributors, and from last commit this take last modified time

green oriole
#

But can you ask to filter for the last commit on a specific file?

cold moon
#

I think by providing limit=1 query parameter, but I fetch all commits because I get contributors from there.

#

Commit at position 0 is always last commit

green oriole
#

But the last commit probably didn’t modified the guide page though?

cold moon
#

No, you can ask for specific file commit history

green oriole
#

Okay, nice

rapid igloo
#

#dev-log message if you want to revert to the 'solved newline issue' commit, use git reset --hard b0da6c0, if you want to save your other commits, then use git branch any-brach-name master before you run that command

#

idk your discord so i cant ping you 😐

green mesa
#

@timid sentinel i checked description of some other packages and noticed in description they mostly mentioned how to do basic installation and how things work

#

so i think summary explains well in this case what do u think?

#

in embed what i can more add ?

#

any suggestions from anyone

cold moon
#

Make url to URL. This looks a bit weird.

#

And I'm not sure will this be always GitHub repository. I think this can be something else too

green mesa
#

all fields are dynamic if it present there only then it will show

cold moon
#

I mean that what you name GitHub repository is I think named in PyPi homepage?

green mesa
#

yes

cold moon
#

Then name this in embed too Homepage, because when someone host in GitLab?

#

Or somewhere else

#

Then this is not valid

green mesa
#

hmmm let me rename it

lime mural
#

name it repository 🤔

cold moon
#

I'm pretty sure that this is not forced to be repository

#

This is named Homepage in site

lime mural
#

ohh

#

true

green mesa
#

now ks?

cold moon
#

Perfect

rapid igloo
#

looks good, but why is it pypI, shouldnt it be pypi

cold moon
#

Oh yeah

#

And I think you should add alias !package (when you didn't already)

green mesa
#

pypl is alias

#

package is name

#

of command

rapid igloo
#

i think it should be pypi

green mesa
#

ok

#

pypi, pkg and package?

rapid igloo
#

sure

green mesa
#

pr coming in 30 min 😄

sour sierra
cold moon
#

I will review it.

#

But I have one question to Core Developers: In theory, is this possible to add Redis to site?

green mesa
#

i also need review on 2 pr my hacktoberfest mature time will end in 3 day

cold moon
#

Do you have accepted label?

green mesa
#

yes

cold moon
#

Then you don't need it

green mesa
#

woa

#

tnx

brazen charm
#

What'd you need redis for on the site?

cold moon
brazen charm
#

Can you just not ask the os on when the file was last modified and only reload if the file and site times don't match?

cold moon
#

Using Docker this OS time getting doesn't work.

#

I think this could be pretty good performance win when we could cache all articles

brazen charm
#

works fine for me

#

Ah right it'll restart on pushes to the repo (unless that's changed), but you only need to load them in on startup which I don't think it's worth using redis for

cold moon
#

However, seems like currently site don't have any caching way

brazen charm
#

Doesn't really need it with the db being local to it

cold moon
#

Oh, I just found out that Django have default cache engine.

#

Local-memory caching

green mesa
#

thinking of raising Bad Arguement error if package is not found or i should make different error embed for this?

cold moon
#

Bad argument is meant to be raised when like invalid type provided.

#

I think it's better to catch this and send your own error embed, describing why this failed.

green mesa
#

ok

#

tnx for feedback

cold moon
#

PyDis site is really really useful template for Django site setup with Docker deployment.

glass pecan
#

excellent lazy reference lol

cold moon
#

lol, I'm creating site for new user event

#

How currently production environment variables is inserted to container?

glass pecan
#

usage of env vars

cold moon
#

.env file?

glass pecan
#

nah, we deploy containers through saltstack

#

and it can insert env vars that we have listed in our "secrets" document

#

if you were to use something like docker-compose instead, you'd just use a .env file though for values across multiple services and specify that .env file to be used in the services compose

#

or if it's only relevant to one server, you'd directly place the env vars in that service's compose

#

if you use a different container deployment setup, then you'll need to refer to the docs of whatever you're using

green mesa
#

.pr 479

dusky shoreBOT
green mesa
#

Got two approval from Chibli and iceman

#

Pr ready for merge🙂

#

Ahh one fix proposed 😐

dusky shoreBOT
#

[404] #1153 Issue/pull request not located! Please enter a valid number!

green mesa
#

Just _

clever wraith
#

The reddit command is still not fixed: #bot-commands message

#

Has been a month

eternal owl
#

yes the PR is alive

#

@exotic ember Hello! I have made the requested changes, can you review it again? thanks in advance

#

need 1 more review

green mesa
#

y at pybot repo there is no template for contribution?

green oriole
#

Nope

#

We don't feel like needing one, as we mostly get only experienced contributors

green mesa
#

umm but for new contributors?

#

bcz repo is public anyone can contribute

cold island
glass pecan
#

umm but for new contributors?
@green mesa we have higher expectations on the bot repo. if a new contributor opens a PR that isn't satisfactory, it'll either be reviewed in detail outlining why or will be closed and marked invalid