#dev-contrib

1 messages · Page 42 of 1

hardy gorge
#

It used to be a contrib-only channel, but we decided that we wanted to make it public a while ago so people could have an idea of what was going on behind the scenes here

#

It's also a place where people can ask questions if they want to become a contrib now

green oriole
#

Just out of curiosity @woeful thorn, you decided to switch to poetry for flake8-annotations, right?

woeful thorn
#

It hasn't been decided, no

#

Just experimenting

green oriole
#

Oh okay

#

So I guess it is better than pipenv for some things?

woeful thorn
#

For the specific project there's no major advantage of one over the other, it's mostly a collection of minor quality of life improvements

molten bough
#

Poetry does seem like a better fit given the stuff in that ticket

#

Amusingly this is coinciding with me trying to get a migration of build tools pushed through on another community, haha

inner gale
#

wait, what is this channel for?

#

is it for people developing stuff

sullen phoenix
#

for discussion on contributing to pydis projects like @stable mountain, @dusky shore, pythondiscord.com, or the other projects on pydis' github

inner gale
#

ohh

#

that makes sense

#

i will leave you smart people in peace

hollow lichen
#

@molten bough what change of tools are you pushing for?

molten bough
#

Oh, gradle instead of maven

clever wraith
#

there are 113 but only ~ 30 in constants ;-;

#

text channels

clever wraith
#

they got a update last day

molten bough
#

What does the update change?

green oriole
#

Mostly refinements and also 3.8 support

molten bough
#

Rules channel

#

Hmm

clever wraith
#

need approvation @green oriole ;-;

green oriole
#

I can't I'm working on the code jam

molten bough
#

Oh it's part of the server discovery feature, rules channels

tough imp
#

i'm writing tests for the bot and i've written this function to help me generate arbitrary discord emojis:

def make_emoji() -> str:
    """Generate a string representing an arbitrary discord emoji.

    Follows the format:
        <:{5 random letters}:{10 random digits}>
    """
    emoji_name = ''.join(random.choices(ascii_letters, k=5))
    emoji_id = ''.join(random.choices(digits, k=10))
    return f"<:{emoji_name}:{emoji_id}>"

the output of this function is then ran against DISCORD_EMOJI_RE = re.compile(r"<:\w+:\d+>") to check if it picks up all the emojis correctly
however, i'm thinking that this is forbidden fruit as it leads to non-deterministic behaviour and the test suite may pass locally but fail in CI, for example
for this reason, i will probably just hardcode a couple of strings - does it make sense to leave the function there with the test case so that if more cases need to be written, it can be reused to generate more? is my judgment here correct?

hardy gorge
#

I'd say that we want to have deterministic test cases, yes. In theory, you could also do that by specifying a seed for the random number generator (which makes sure that we reproduce the same values cross-platform), but that has the effect of "hiding" the actual test cases used from people reading the code. I don't have an opinion on keeping your utility function in there, although it's a bit odd to define something you never actually use in the code base itself.

tough imp
#

thanks for the input, i think i agree i'm just going to keep the hardcoded strings

clever wraith
#

can someone assign me on #338 ?
cuz i have to pass #339 and wanna merge both
and 339 is high priority ?

#

seasonalbot*

clever wraith
#

thank you @gusty sonnet

green oriole
#

How would you host the pydis site behind nginx? I try to run it on my dev server, after 1h30 of fighting with pipenv, pip and dependencies, I'm finally able to run it, but I can't access it outside of the server itself. My current setup is to take the incoming subdomain, in this case pydis.dev.mbertucci.me and redirect an internal port, 8101 here (I use this setup because of my other services that only accept a port number). I tried dozens of options to make nginx connect to the backend, but I still get 502s. What option should I use?

molten bough
#

That's how you do it, yep

#

Don't forget to tell docker to open that port

green oriole
#

I don't use docker, because of my weird install

#

I tried to change the PARENT_HOST but it didn't work

molten bough
#

Anything in the logs?

green oriole
#

Nginx log I guess?

molten bough
#

No, the django log

green oriole
#

When I enter pipenv run start?

#

The website just start

molten bough
#

It's a 502 and not a 520, right?

green oriole
#

Yep

molten bough
#

hm, yeah, just sounds like you got the wrong port in your nginx config I guess

#

what upstream are you using?

green oriole
#

Upstream? roothink

molten bough
#

mm, I have no idea, honestly

#

Looks like it should work as long as the configured host within django matches

#

although I note you have no listen block

#

eg listen 80

green oriole
#

Hmm, don't think that's the issue, it is a copy paste from another working server block

#

I just tried

#
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
Error: That port is already in use.```Okay, that's new
#

I tried manage.py runserver 0.0.0.0:8101 without success

#

Gonna probably switch to sockets

clever wraith
#

discussion time
so as requested bookmark react with 📨
and as said

I don't think it makes sense from a UX perspective to utilize the same reaction for multiple purposes when one of those purposes silently disappears after a timeout. This is already barely discoverable functionality, and with this implementation a user that does know of its existence doesn't know if it has timed out or if it's broken. A second emoji solves half of the problem, which might be sufficient.

What should be the second reaction ?

#

Whoever S. Co1 is

molten bough
#

I think that's ELA, isn't it?

#

I think I'd use a 📌 or 📍

clever wraith
#

@woeful thorn Are you Mr. / Mrs. S. Co1 ?

woeful thorn
#

Yes

clever wraith
#

What should be the second reaction ?

woeful thorn
#

I don't know

#

gdude's suggestions seem reasonable

#

Open to other suggestions as well

clever wraith
#

@runic dune as you were the first one to point it out what do you think it should be

#

we can also clear_reaction once timed out

runic dune
#

ah, an UX design issue, i must admit i didn't know much about the whole feature when i suggested the improvement, i didn't know the first reaction disappeared after some time, if adding a second one makes sense, then sure, these pins do seem to fit the requirement 🙂

woeful thorn
#

The first reaction currently doesn't, but if we want to wait for a reaction then we'd probably want to have it time out rather than waiting forever

#

And waiting for a reaction also stops if the bot is restarted

#

We could do a more generic on reaction event but I think that's more complexity than it's really worth for this feature

runic dune
#

ok, makes sense, i though the bot would get notified of events on the message, didn't think about active listening, but yeah, a timeout make sense, though the users must have some way to know if they can or can't use the reaction to also get the bm in that case.

woeful thorn
#

Seasonalbot does have a mechanism for persistent storage, but there's no real good way to "garbage collect" (for lack of a better term) the entries and I don't think we want to store the message link for all eternity

mellow hare
#

Could give it a little SQLite db and have it purge old messages out of it daily or a couple times a day

#

If we care about persistence

woeful thorn
#

Or just have it be a fixed size, but the concept is the same regardless

mellow hare
#

Right right

clever wraith
#

so whats the conclusion

#

use 📌 ?

woeful thorn
#

There is no conclusion yet

#

Honestly this would probably be better as its own PR rather than being tied in with the channel permissions fix

clever wraith
#

ok

#

seperating

woeful thorn
#

Since that part is done and there's probably more discussions to be had on this

clever wraith
long garnet
#

yes @green oriole, I don't make new branches, I make forks

green oriole
#

Okay haha

#

Tbh, working from the inside of the repo is easier for you and the reviewers from my experience, but that's up to you ^^

long garnet
#

I know, but I do it this way to force myself to do more things with git

#

not because I'm a masochistic who also hates my colleagues, but to train my brain

green oriole
#

Haha

woeful thorn
#

It mostly just accomplishes increasing the risk that the downstream master will diverge from upstream

green oriole
#

Well, you'll learn more about github itself for sure, but I'm not really sure about git, apart from managing remotes, which is kinda a pain in the arse tbh

woeful thorn
#

And adding another remote for others to have to deal with

long garnet
#

is it to much of a pain, ELA?

#

I can use a branch if that's the case

#

I don't even know what are the chances for something like that to happen

woeful thorn
#

The latter, not really, the former is a pain for you

long garnet
#

oh okay

woeful thorn
#

@clever wraith I've reset your BM PR to the original commit & implemented the suggestions made at that point. There's no reason to keep the other commits in the history since you're going to be redoing them in another PR & half of them are fixing linting errors. Since the history has been rewritten please be sure to pull down the changes if anything else needs to be done on the branch.

woeful thorn
green oriole
clever wraith
#

i was thinking of ➕

#

Ps. hard to see in dark theme

#

but looks cool in a reaction

molten bough
#

It might be easier if there was a blurple one or something

#

or maybe even like a +1 one

#

wonder if I have one

#

eh, a bit small

clever wraith
#

here with me ? @molten bough

molten bough
#

What?

clever wraith
#

hows this ?

molten bough
#

Gradient is unnecessary

#

It's going to make it hard to read

clever wraith
#

make sense

#

what should be the color ?

molten bough
#

(Also, it's not blurple, but I'm not sure if you knew that or you just decided not to go for it)

#

I would suggest blurple, since we're on Discord

clever wraith
#

are discord emoji rectangle or square

long garnet
#

they are all squares

clever wraith
#

more like rounded corner square

long garnet
#

they all rendered as squares, if that's what you're asking

#

you can check that by uploading a totally solid emote

#

let me see if I can do something useful

clever wraith
#

but they get cropped out

long garnet
#

ah, you mean in the shape of reactions

clever wraith
#

yes

#

looks a bit elevated

long garnet
#

doesn't do that for me at any scale

#

are you sure your emote isn't rounded?

clever wraith
#

wait i need to rendera white one to be clear

#

nahh its square it was that emoji that gdude gave that was rounded

long garnet
#

I was wondering if it could be applied in the otnames module, which has:

    while True:
        # Since we truncate the compute timedelta to seconds, we add one second to ensure
        # we go past midnight in the `seconds_to_sleep` set below.
        today_at_midnight = datetime.utcnow().replace(microsecond=0, second=0, minute=0, hour=0)
        next_midnight = today_at_midnight + timedelta(days=1)
        seconds_to_sleep = (next_midnight - datetime.utcnow()).seconds + 1
        await asyncio.sleep(seconds_to_sleep)

        # ... code to run here```although I don't want to do a mess with something that already works, I need to study it a bit more
tawdry vapor
#

Yes, it was designed to be generic

#

However, I don't think there will be much benefit from using it here.

green oriole
#

Tbh, otnames could just use a d.py task

tawdry vapor
#

I don't think so.

#

They only support intervals IIRC

long garnet
#

However, I don't think there will be much benefit from using it here.
certainly not, but I was looking at ideas to make the otnames module a bit reusable

molten bough
#

It is an interval though, isn't it

long garnet
#

also because I feel the otnames and the staff lounge name could have slightly different behaviours

tawdry vapor
#

The goal is to run at an exact time every day (midnight)

#

The interval would be relative to when the bot started

molten bough
#

Yeah, but it's still an interval

long garnet
#

I haven't talked about it with anyone yet, but I think it would be nice to make the lounge name rotate more frequently

tawdry vapor
#

If the bot starts at 21:00 then the first interval would need to be 3 hours but all subsequent intervals would need to be 24 hours

long garnet
#

there's also an issue to have linked OTnames

#

so they will definitely have different behaviours

tawdry vapor
#

I guess then it still needs the same logic to calculate the interval, at which point all the task does is save a while True and an asyncio.sleep

clever wraith
#

If the bot starts at 21:00 then the first interval would need to be 3 hours but all subsequent intervals would need to be 24 hours
@tawdry vapor
perhaps just start the interval routine the next time it hits midnight?

#

ie, bot is run, otnames task does nothing until it hits exactly midnight at which point the interval will start?

#

bear in mind I have no idea how the bot works in general

woeful thorn
#

The point is the task extension doesn't provide any meaningful gain for the OT channel name rotation

#

Calculating the time remaining until the OT name should start, recalculating once it hits midnight if the duration isn't 24 hours, or any combination of whatever is just a more complicated version of what we're doing already

long garnet
#

got it, thanks ELA

green oriole
#

Guys, is it normal that staging bot use the pydis eval service, not a local one?

hardy gorge
#

@glass pecan Is going to look into it.

#

He has some other stuff to do currently, though

#

It's not that critical, I think

green oriole
#

Yep

crude gyro
#

that's not a bad idea.

#

maybe you can just PR it in, @green oriole?

green oriole
#

Yes, chief! ^^

crude gyro
#

merged.

#

thanks @green oriole

tawdry vapor
#

Doesn't seem like the bot uses many, if any, autospeced mocks

#

I've looked into it and it seems there isn't any nice solution for that, especially for mocking third-party code e.g. discord.py

#

In a perfect world, a mock could be created and would keep working without maintenance regardless of changes made to the original class.

#

The approach of passing instances as the spec, as is being done now, can work, but the problem with that (which actually exists even if autospec isn't used) is that it causes code to be executed of course.

#

And this may have unintended side effects

#

I do think there is value in tests catching access of non-extant attributes so if anyone has ideas for solutions lmk.

#

Also of note is that there is no simple way to create an autospeced mock when subclassing as all the helpers do. Probably possible with some metaprogramming.

#

The other solution I could think of is manually assign values to all instance attributes in the mock, but this adds maintenance overhead and can fall out of sync with the attributes of the actual class.

green oriole
#

Guys, after almost 5 hours of trying and re-trying and re-re-trying, I give up. How on earth can I mock the bot http_session, to make sure the right request is done? I tried a lot, lot, lot of things, including creating a mock with __aenter__ and __aexit__, changing some attribute, modifying the child_mock_type, and various other things, do you have any clue for me? I’m trying to write a test for Snekbox.post_eval https://github.com/python-discord/bot/blob/eval-enhancements/bot/cogs/snekbox.py#L50

#

The main issue is that MagicMock doesn’t define __aenter__ and __aexit__

#
class AsyncContextManagerMock(AsyncMock):
    async def __aenter__(self):
        return self

    async def __aexit__(self, *args):
        pass```This was my first idea
#

And py bot.http_session = MagicMock() bot.http_session.post = AsyncContextManagerMock()

#

But I get an AttributeError: __aexit__

#

I also tried to add a __call__ method that return self

green oriole
hardy gorge
#

The point is that post is called and should return your context manager

#

Ignoring all the mock helpers we have, this should work:

green oriole
#

That’s why I tried to create a __call__ method

hardy gorge
#

!e

import asyncio

from unittest.mock import MagicMock


bot = MagicMock()


class AsyncContextManager(MagicMock):
    async def __aenter__(self):
        print("entering")
        return "foo"

    async def __aexit__(self, exc_type, exc, tb):
        print("exiting")


bot.http.post = MagicMock(return_value=AsyncContextManager())

async def main(bot):
    async with bot.http.post() as something:
        print(something)


asyncio.run(main(bot))
stable mountainBOT
#

@hardy gorge :white_check_mark: Your eval job has completed with return code 0.

<AsyncMock name='mock.__aenter__()' id='140145824951312'>
hardy gorge
#

That's interesting, locally I get:

entering
foo
exiting
[Finished in 0.1s]
green oriole
#

Hmm

hardy gorge
#

oh, wait

#

@stable mountain now runs Python 3.8 for eval/in snekbox

#

While we run the bot itself on 3.7

green oriole
#

Yep

#

Same result as you on my dev server

hardy gorge
#

3.8 will make this much easier, but the code should work for our bot

#

since it runs on 3.7

green oriole
#

Another problem is that in your example, instead of doing print(something), the bot is doing print(await something.json()), but I get a traceback about MagicMock not awaitable

#

I tried to return an AsyncMock, and to change the baseclass

hardy gorge
#
import asyncio

from unittest.mock import MagicMock


bot = MagicMock()


class AsyncMock(MagicMock):
    async def __call__(self, *args, **kwargs):
        return super().__call__(*args, **kwargs)


class AsyncContextManager(MagicMock):
    def __init__(self, return_value):
        super().__init__()
        self._return_value = return_value

    async def __aenter__(self):
        print("entering")
        return self._return_value

    async def __aexit__(self, exc_type, exc, tb):
        print("exiting")


bot.http.post = MagicMock(return_value=AsyncContextManager(AsyncMock(return_value="hello")))

async def main(bot):
    async with bot.http.post() as something:
        print(await something())


asyncio.run(main(bot))
#

Try that, @green oriole, but with the appropriate helpers we've already got

green oriole
#

Hmm

hardy gorge
#

Works for me

11:18 $ python playground.py 
entering
hello
exiting
green oriole
#

It is await something.json(), it is still going to work, right?

hardy gorge
#

You need to provide with the appropriate value to return

#

You can replace AsyncMock(return_value="hello") in

AsyncContextManager(AsyncMock(return_value="hello"))

with any kind of mock you want to return

#

Silly example:

#
import asyncio

from unittest.mock import MagicMock


bot = MagicMock()


class AsyncMock(MagicMock):
    async def __call__(self, *args, **kwargs):
        return super().__call__(*args, **kwargs)


class AsyncContextManager(MagicMock):
    def __init__(self, return_value):
        super().__init__()
        self._return_value = return_value

    async def __aenter__(self):
        print("entering")
        return self._return_value

    async def __aexit__(self, exc_type, exc, tb):
        print("exiting")


something = MagicMock()
something.json = AsyncMock(return_value="Hello")

bot.http.post = MagicMock(return_value=AsyncContextManager(something))

async def main(bot):
    async with bot.http.post() as something:
        print(await something.json())


asyncio.run(main(bot))
green oriole
#

It doesn’t work

#

I did something similar, but I get a MagicMock coming out of nowhere

#
mocked_post = MagicMock()
mocked_post.json = AsyncMock(return_value={})
self.bot.http_session.post = MagicMock(return_value=AsyncContextManager(mocked_post))```
clever wraith
#

oh... needed to do pipenv install

#

maybe this should be documented in the wiki :) it only has pipenv run start

hardy gorge
#

pipenv sync --dev should do

#

It will sync from the Pipfile.lock with the versions specified in there

#

But, yeah, that needs to be in the wiki

clever wraith
#

aye, that's what the install subcommand did as well, is there any functional difference between the two?

hardy gorge
#

install will relock first I think, meaning that you may end up with different versions than seasonalbot is actually using

clever wraith
#

ah, that's not good

tawdry vapor
#

It is in the wiki

#

Well, on the site. I don't know if the GH wiki has it but that is not being maintained anymore

hardy gorge
#

Right, step 2 of the Development Environment section

clever wraith
#

yep, i'm blind

stiff ice
#

I'm looking to solve a business-oriented problem or a problem related to this discord that has available data with a machine learning solution. If you provide information regarding a business-oriented problem I would prefer data related to vehicles or possibly customer service and data that is publicly available. If you do have a problem that needs solving, I do request that it be capable of solving reasonably within a 2 week timeframe and you are comfortable with it being presented internally within a company as I have to present the problem, data, and solution of whatever project I choose.

Thank you ahead of time if you have any ideas, suggestions, feedback, or data to provide.

clever wraith
#

er...

#

#devtest, id 414574275865870337

mellow hare
#

There doesn't appear to be one

#

Oh you know what, there is in our test server

#

Different id than that, however

clever wraith
#

okay

#

thanks

crude gyro
#

used to exist.

#

<@&267629731250176001> <@&295488872404484098> see @stiff ice's question above. Anyone got any ideas for a good way to apply ML to our repos?

ornate moat
#

I don't understand

long garnet
#

customer service and data that is publicly available

stiff ice
#

Or anything in general if you have data sources or ideas

ornate moat
#

You want this servers data to be used for some ML thing...?

lapis phoenix
#

i mean....isnt most of the data the pydis related projects generate GDPR protected anywazs

ornate moat
#

Scan for messages by helpers in the help channels and the context around them and teach the bot to answer common questions :)

stiff ice
#

That was an original idea of mine however I spoke with Frank previously and they do not keep data like that. Scanning it myself also requires breaking ToS

long garnet
#

I can't really think of ways to apply ML here since I'm not too familiar with it

#

we would need to provide the data, I suppose?

stiff ice
#

That's preferable yes, but if you think I can gather the data in a reasonable time I can do that as well

long garnet
#

mm I can't think of anything, maybe a way to detect at what moments #python-discussion or the help channels go off topic? that would give a lot of false positives probably but it would be fun if it kinda worked

#

not sure how feasible it would be, sorry

stiff ice
#

Yeah like I meantioned to Ava though they don't collect that kind of data for the server so I wouldn't have access to the messages sadly. That was originally one of my first ideas as well. Thanks for the idea though

long garnet
#

who's Frank? pithink

stiff ice
#

Ves Zappa, I just noticed his new nick and used it

long garnet
#

ohh right, I'm dumb

dusty crater
#

@crude gyro i could see it being used for security purposes too

#

when you ban someone you could load in a corpus of their messages and have it warn staffchat if someone with a high confidence of being that person joins

#

i absolutely wouldnt have it autoban because who actually trusts ML but

stiff ice
#

I was curious of that too and it doesn't sound like a bad idea

eternal owl
#

We can write an email bot that replies to emails automatically(common q) or a spam detector in discord

#

Or let's make a chat bot

hardy gorge
#

We currently don't store a lot of information; in fact, we don't want to. We do want to collect some summary data, like average channel activity per hour/day, in the future and display it on our site, but that's a project we want to tackle somewhere during the year.

#

So, the amount of data we have for a proper model is meager and I'm not sure if we want to collect/make data available that could in some way be considered private or personal. (I'm not staying that would be the case for this project.)

gusty sonnet
#

Hmm, we can probably do a question detection and auto suggest going to a free channel / adjust the amount of channels should we have high traffic ( basing on number of messages to see how active, not storing the content )

crude gyro
#

we have already designed a much simpler solution for that problem that requires no ML

green oriole
#

We could use it to detect people that post their question across multiple channels or advertise their question and trigger a mod alert, but yeah, we would need to collect some data

crude gyro
#

I don't really want to automate that

hollow lichen
#

Maybe a model to predict after what time without message a help-channel can be considerate free? Something more evolved than the !free command today (which is already great)

tough imp
#

if we're looking at this as an NLP task, you would need a lot of good data, that we don't have

#

your best shot would be annotating hundreds of help sessions manually, and the result wouldn't work in practice anyway, since sessions that just end very clearly at one point aren't that common, often once one problem is resolved the conversation just flows towards another problem / user that needs help

#

i don't think this is a good use case at all

#

i'm not sure if we have a good use case

crude gyro
#

again, solving the help channel system with ML is not interesting. We already have a much simpler plan for this that I believe will work well.

#

and if there's one place I don't want needless complexity it's in the very core of the community, in our help channels.

hardy gorge
#

Yes, I don't think it will work well in any case. The model will either be overly complex, require a lot of manual tagging, and probably won't even work that well or it would be a simple system that basically just estimates some kind of "no activity" period (which is something we've already rejected because of the high variability and the undesirable effect of having a lot of the shorter "short question, short answer" conversations hogging a channel for a far longer time out).

#

Anyway, like lemon says, we do have a system in mind that doesn't even need those measures

green oriole
#

I'm very curious about this new help channel system, can we have any hint about how it is going to work? ^^

eternal owl
#

maybe we should start a new project? discord bot has become kinda boring these days. Maybe starting an app

molten bough
#

I wonder if we have the right group of people to write our own Python tutorial

hardy gorge
#

@green oriole Sure, it's not a very complicated system and some of the details have to be worked out, but the general gist is that we want to have two visible help channel categories, one with "free" channels and one with "in use" channels, and a third "invisible" category with temporarily archived channels.

The "free" category will always have a fixed number of channels available (say two or three), with a message at the bottom explaining how it works. As soon a someone start talking in a "free" channel, it will be moved to the "in use" category just below it. When the activity in an "in use" channel dies down (and we may add a "mark as done" command), it will be moved to the third "invisible" category of archived channels. That last category will not be invisible, just at the very bottom of the channel list so the Discord search will still bring up older activity for those who want to read something back.

green oriole
#

Oh nice

molten bough
#

Are you using pycharm pro?

#

If you set it up to run your tests, there's a "run with coverage" button in the top toolbar (looks like a green circle grid kind of thing for me)

#

it'll show you exactly what your tests don't cover

green oriole
#

Oh nice

#

Now I need to copy the patch from a LF machine to a CRLF machine >.>

tough imp
#

you can also pipenv run coverage html to get a simple html report including partials

#

it will go in project root dir htmlcov by default

molten bough
#

Yup, that's a great option if you don't have pro

green oriole
#

I have a github education pack, so I have pro for free

#

Should be fine

#

error: corrupt patch at line 103

#

Thanks git

green oriole
#

It is a pretty cool tool

lapis hull
valid quest
#

Is this a good channel to look for contributors or project ideas?

#

and if not, where should i look?

hardy gorge
#

Hey @lapis hull, I'll have a look tomorrow

lapis hull
#

@valid quest This channel is really for discussion of the Python Discord Project (so the bots in this server, and the pythondiscord.com site).

#

Assuming you're not asking for paid contributors, the #303934982764625920 channel might be a good place to show what you're working on and seek help.

#

@hardy gorge Thanks Frank! Ves... Frank? Frank.

hardy gorge
#

Ah, yeah, I'll change that back

#

Neither Ves nor Frank are names I have in real life.

tough imp
#

hi @tawdry vapor , would you mind if I grab your attention for a minute

#

i'm having a little bit of trouble implementing the feedback you've given to me yesterday

#

the cases that pass (allowed messages) are easy to implement, and running them through a helper function is definitely useful, but there's the problem that in order to use the subTest context manager I need to pass the entire unittest.TestCase instance into the function, which is ok I suppose

#

but the amount of information that I need to bundle in order to pass a disallowed case out of the unittest itself is pretty big - the printout string is different, the way the relevant messages are generated differs (although as you pointed out, this is just a tuple of all recent_messages in roughly half the rules)

#

at the end, I found myself writing a get_expected_output function and passing it outside of the unittest, but this function essentially ends up being a replication of the rule itself, so I end up saying check the output of the rule and my own re-write of the rule

tawdry vapor
#

Subclass TestCase, probably defined in __init__.py, and define the method there. Make all test cases then subclass the new class.

tough imp
#

yeah I've already gone in this direction, I subclassed TestCase to annotate a bunch of extra instance variables, and the in the unittest itself I just assign self.config, self.rule, self.allowed_cases, ... and pass self into the function

#

but I didn't think to go this far

#

interesting, thanks I'll give it a go

#

I'm just worried of writing too much boilerplate to replace boilerplate and end up creating unnecessary indirection as you mentioned

tawdry vapor
#

I looked at three test cases and they were very similar

#

role mentions, discord emojis, and chars

#

At a glance it didn't seem that complicated to make something generic

tough imp
#

yeah the good thing about those is that relevant_messages = tuple(msg for msg in recent_messages if msg.author == culprit) holds for all

#

the only thing that differs in the expected output is the "template" string

#

so that's good, but for example if i then have

relevant_messages = tuple(
  msg
  for msg in recent_messages
  if (
    msg.author == last_message.author
    and len(msg.attachments) > 0
  )
)
#

i'm having trouble figuring out where to hide this

#

i figured i'd pass in a is_relevant predicate lol

#

but then i might as well pass in something that also generates the output string

#

and then i've basically rewritten the rule

tawdry vapor
#

Oh I forgot to make relevant_messages a function

tough imp
#

i didnt think to subclass like that

#

that's a super cool idea

tawdry vapor
#

To be clear this isn't final

#

If you find this to be more harm than good then you can abandon the idea

tough imp
#

no i definitely want to play with this a little more

#

i think i'm just still figuring out good practices for testing, so im being a bit of a pain

#

at the very least, i can make the test_allows function generic

tawdry vapor
#

If you wish you could either make config an arg too or go the other way and make func an attribute as well.

tough imp
#

yeah i had func as an attr

#

i think i like that better

tawdry vapor
#

Another idea is to have an abstract method for the relevant messages, which subclasses can implement

#
    @abc.abstractmethod
    def get_relevant_messages(self, recent_messages):
        raise NotImplementedError
#

and test_disallows will call that method

#

for the output message you could consider just checking parts of it

#

like if f"sent {total links}" in output

#

and if f"in {interval}s" in output

#

Or use regex

#

I don't really see value in testing the exact value of a string

#

Not in this case anyway

tough imp
#

i thought that maybe the rules could have a template string in module namespace

#

that that could be imported in the test cases

#

this way if the message should ever change the test cases won't need to be adjusted or at least not as much

patent pivot
#

new review request system is live for bot and site

#

it's a trial system for now just to see how things go

tawdry vapor
#

How is it used?

#

Does GH pick two people at random?

patent pivot
#

yep

tawdry vapor
#

How would I invoke that

patent pivot
#

so it's now on seasonalbot, bot, site, snekbox

#

from now on adding a new commit to any existing PR does it

#

and any new PR will receive them

#

we now have codeowners files which dictate all files belong to core devs

tawdry vapor
#

Thanks. I was wondering if I could do it for an existing PR

patent pivot
tawdry vapor
#

I'll try it

green oriole
#

_And what for non-core reviewers? _

glass pecan
#

they're welcome to review, as usual

#

they just won't be requested automatically

crude gyro
#

@green oriole the site changes for https://github.com/python-discord/bot/pull/630 have already been merged, and this is creating a critical bug with mod alerts. It probably should not have been merged, but the easiest solution now is for us to get the bot side PR merged ASAP.

How fast can you get this merged?

green oriole
#

Not now, sorry, I'm at school

#

I can try in 6h

#

I have a little patch if someone want to test it

#

I don't have access to any computer

eternal owl
#

How complicated is it?

crude gyro
#

@hardy gorge maybe you got an opinion, but I think this will be okay if it's merged today.

green oriole
#

You have to deep down in the code

crude gyro
#

I'll be available later today, @green oriole, to work with you for reviews and getting it merged, as long as you've got time to get the requested changes developed

green oriole
#

Okay nice

crude gyro
#

Alright, excellent. Then we have a plan.

#

thanks

#

ping me with reckless abandon when I can be of use.

hardy gorge
#

@green oriole If I understand you correctly, the field will also be missing if a message has no attachments? As in, the request will not contain an empty list in that case?

#

If that's the case, we either need a clever default value (if the rest of the code requires that field to be non-null in the database) or just allow null values

green oriole
#

Yes, master does not provide an empty list

hardy gorge
#

Oh, master

#

Okay, the PR will?

green oriole
#

It should

#

Last time I worked on it, it did, but mark worked on it in the meantime, and it looks like he reverted it, but that's not a problem

green oriole
crude gyro
#

yeah okay, let's get this reviewed.

#

@green oriole build seems to be failing

#

one of the tests is failing.

green oriole
#

KeyError?

#

What

#

It does run locally

#

Oh fuck, just saw it

crude gyro
#

did you add attachment_repost both to the python and the yaml?

#

with the right type?

green oriole
#

It is named attachment_repost in the config file, but the entry is called attachment_log

#

It runs fine, but the tests doesn’t like it

crude gyro
#

yeah. will you push a fix for that?

green oriole
#

Done!

crude gyro
#

cool cool.

#

will have a look now

#

okay, approved, requested changes dismissed since they appear to have been addressed

#

@hardy gorge @glass pecan @tawdry vapor can one of you do another review of this so we can get it merged? it's causing a problem with our mod-alerts at the moment, so slightly urgent. https://github.com/python-discord/bot/pull/630

glass pecan
#

ill have a look

crude gyro
#

cool, thanks

eternal owl
#

Hey guys, I wanna discuss about the emojis for the reddit command

glass pecan
#

those were a basic sample, i have not done any checks on our ability to use them regarding licensing

eternal owl
#

How can i check I can use an image as emoji?

#

or will the mods do that?

glass pecan
#

it was so long ago, i don't even think i have a reference to where i used them

eternal owl
#

oh

glass pecan
#

@crude gyro we're able to use Font Awesome icons as emoji's right?

crude gyro
#

yep

glass pecan
#

just use it then, ezpz

crude gyro
#

most of our emojis are just that

glass pecan
#

reddit icon

crude gyro
#

we even have a pro license available if we absolutely need to use it

eternal owl
#

we should add it to the server?

crude gyro
#

although we're not currently using it and would prefer not to, if possible

eternal owl
#

ohk

crude gyro
#

but all the FA Free icons can be used without that

#

which should be plenty

glass pecan
#

lol whoops i'm using pro ones

crude gyro
#

oh okay.

#

it's not a dealbreaker if you need them

glass pecan
#

in the new page

#

duotones

crude gyro
#

right right.

#

well, @molten bough has made a license available for us to use

#

but we may need to somehow add some stuff to the repo or whatever to indicate that we're making use of that

#

I don't know exactly how that works

#

didn't bother looking into it yet because we haven't used any pro icons until now

eternal owl
#

we should be good with the basic ones

#

I will just have to paint them red in gimp

molten bough
#

I don't think they have any particular requirement for print or web use attribution

glass pecan
#

pretty sure pro actually encompasses less attributions than free

molten bough
#

Yeah, I don't think you really have to attribute

#

I can double check if you like

crude gyro
#

yeah but I'm not sure if we've got access on the site because we may be using the django-simple-bulma fontawesome free stuff right now?

glass pecan
#

nah

#

it's working on pro

crude gyro
#

okay

#

well then I suppose we're good

molten bough
#

It doesn't even really have a domain lock anymore

glass pecan
#

it's enabled with a specific js thingo and the control panel

molten bough
#

I'm not sure quite how they "enforce"

#

since it doesn't seem like they care anymore

glass pecan
#

interesting

molten bough
#

basically in my panel I have this

#

which is what they call a kit

glass pecan
#

yeah, that's how i remember it too

molten bough
#

and then you just embed the JS they give you and it works

glass pecan
#

cool

crude gyro
#

enforcing rights can often be bad for business. it's not uncommon for businesses to realize that these days. Microsoft has been saving millions on that for years.

molten bough
#

You might be right

glass pecan
#

makes sense

molten bough
#

They did enforce with the old CDN but I suspect that was more trouble than it was worth

crude gyro
#

I mean, it's expensive to enforce strictly, and sometimes it might not have a net positive effect on the bottom line

glass pecan
#

colours don't matter

#

we can sort that out when we make the emoji

crude gyro
#

yeah that's fine

eternal owl
#

so we just download those and add them?

crude gyro
#

@eternal owl do you have some sort of image editing software?

eternal owl
#

gimp

glass pecan
#

it's preferred if it's a vector

crude gyro
#

maybe you wanna make the emojis then?

eternal owl
#

make???

#

you mean draw?

molten bough
#

These are the settings I have for you by the way, in case you want any changes

crude gyro
#

no, I mean use the stuff you just found to create the pngs we need

eternal owl
#

yea i can

crude gyro
#

no drawing involved

glass pecan
#

lol that redact

molten bough
#

haha

eternal owl
#

But I should be able to download those emojis right?

crude gyro
#

you download the font

#

and then just use it type "type" the glyph

eternal owl
#

svg?

molten bough
#

They provide a TTF/OTF font

crude gyro
#

yeah, that's by far the easiest way

#

get the otf, install it, and then use the copy glyph feature on the page, and just paste into a font field in gimp

#

it will magically appear

eternal owl
#

okay its a bit confusing, tell me how I can get them on my machine 😅

crude gyro
#

then crop it up the way you want it, make it.. I don't know, white? and we're good to go.

molten bough
#

This one

eternal owl
#

okay, thanks!

crude gyro
#

make pngs, make money, get famous, get laid.

eternal owl
#

👍

crude gyro
#

like the rest of us.

eternal owl
#

too young

molten bough
#

most of the rest of us. haha

#

if you do end up needing a pro glyph, let me know, Iceman

crude gyro
#

don't undermine my secret to success, guys

glass pecan
#

to be clear, they need to be at least 128x128

eternal owl
#

okay

glass pecan
#

and size must be a multiple of 2

#

so if you increase, you can only double

crude gyro
#

we usually go 512 I think?

eternal owl
#

Lemme take a video tutorial on how to use gimp first 😹

molten bough
#

Power of 2, yep

crude gyro
#

wait.. 256?

glass pecan
#

256 is preferred

#

128 is bare min

crude gyro
#

so not 512?

glass pecan
#

512 is for non-emoji elements we make

#

or higher

#

like logos

#

usually we make a proper svg too alongside for those assets

green oriole
#

usually

glass pecan
#

this is an older icon for example

#

max size is 128 for it

molten bough
#

512 might be good for future-proofing

#

screens are only raising in resolution

eternal owl
#

so i have to go from svg to png?

glass pecan
#

even a 4k phone wouldn't really make use of an emoji higher than 256 though

molten bough
#

Not yet

#

You have two options, basically, Icmean

glass pecan
#

no rohan, you're just using text

#

in gimp

molten bough
#

the easiest one is copying the glyph from the font-awesome site, going to gimp, using the text tool and pasting the glyph into it

#

if you hate yourself, you could also open the SVG in inkscape, edit it there, and export it as a PNG

#

but I assure you that is far more of a pain in the ass

glass pecan
#

i don't hate myself, i just like vectors

#

lol

molten bough
#

haha, fair

#

I actually like vectors too

eternal owl
#

lemme open gimp, guide me then

molten bough
#

but goddamn if the tooling isn't hard to get used to

glass pecan
#

imma do this review

eternal owl
#

@molten bough stick around, I need you to guide me through gimp

molten bough
#

It's not hard, don't worry

#

haha

eternal owl
#

okay

#

get me through one, I will do the others

molten bough
#

I mean it's really just a case of

#

open gimp, make an image the size you want

#

layers -> transparency -> add transparency (if it isn't greyed out)

#

select the text tool on the side, pick the FA font you hopefully just installed

#

pick a colour, click somewhere in the image, paste the glyph, modify the font size until you're where you want, then position it with the alignment tool

#

there's a tools menu at the top if the awful greyscale icons confuse you

eternal owl
molten bough
#

are you attempting to ask a question?

eternal owl
#

is it transparent?

molten bough
#

yes, that's what the checkerboard background is

eternal owl
#

the black and white checkboxes behind it

molten bough
#

transparency

eternal owl
#

okay

molten bough
#

when you're done, you can export it in the file menu

eternal owl
#

how to add custom font

molten bough
#

right-click the font file, install

#

that's it

#

(you may have to restart gimp)

#

@crude gyro @glass pecan I just read the license, and yep, there's no attribution or enforcement requirements

#

so go nuts

glass pecan
#

thanks for checking

eternal owl
#

there is no install

molten bough
#

extract it from the zip first

eternal owl
#

nvm i had to double click not right click

molten bough
#

Oh right, did they move it to the previewer?

eternal owl
#

installed all 3

molten bough
#

oh, linux

#

Yeah, that

#

You may have to restart gimp but it should be in the font selector now

eternal owl
#

what will be the name of the font?

#

I dont see any font name which has font awesome

molten bough
#

it should be called that, yeah

#

did you install the otf or the ttf?

eternal owl
#

otf

molten bough
#

and you restarted gimp?

eternal owl
#

yes

molten bough
#

I'm not sure then, check the fonts app

eternal owl
#

Laptop hung, restarting

#

Its Weared

#

I see the font in fonts app but not in gimp

molten bough
#

Try installing the TTF instead then

eternal owl
#

There is no ttf

molten bough
#

hm, yeah, you're right

#

I have no idea then I'm afraid

eternal owl
#

I googled it

#

I have to add the location to system fonts

#

any idea where the system fonts are located?

#

found it

#

now its working !!!!!!!!

molten bough
#

\o/

eternal owl
#

so what do I type

#

what is glyph

molten bough
#

Well find the icon you want to use on the font-awesome site

#

copy it, and paste it into the text input

eternal owl
#

I downloaded the icons

molten bough
#

yes, I know

eternal owl
#

where to put the text box

molten bough
#

Wherever you want it

eternal owl
#

okay

#

how to copy the icon

#

copy the unicode glyph?

molten bough
#

yup

eternal owl
#

done

#

pasted also

molten bough
#

so it should be in your image, right

#

modify the font size until it's big enough, set a colour, then use the align tool to center it

eternal owl
molten bough
#

well it's black so that's gonna be hard to see

eternal owl
molten bough
#

that the one you wanted?

eternal owl
#

yea

molten bough
#

Ok then

eternal owl
#

what does that thing do

molten bough
#

What thing?

eternal owl
#

that glyph

#

I mean why are we copy pasting it

#

what role does it play

molten bough
#

so you can get it into the image

#

I don't follow your question

eternal owl
#

I mean why do I have to copy paste it and then export

#

why not use the transparent image directly

brazen charm
#

do you have an align left key on your keyboard?

molten bough
#

What transparent image?

eternal owl
#

the icon

molten bough
#

The icons are in SVG format though

brazen charm
#

you paste it as a normal letter which is then rendered from the vector

molten bough
#

GIMP can convert from vector to raster actually, now that I think about it

eternal owl
#

i dont have that key @brazen charm

brazen charm
#

well you gotta copy it then

eternal owl
#

okay idk vector raster n stuff, lets move on 😂

molten bough
#

well that glyph doesn't look like the one you wanted

#

but I don't think you've entirely been following the instructions given

#

if you've opened some transparent image - and I have no idea where you got it from - that isn't what we're trying to do

eternal owl
#

I got it from the extracted zip file

molten bough
#

No, you got an SVG from the zip file

eternal owl
#

yes yes

molten bough
#

Where did you get an image?

eternal owl
#

svg = image?

molten bough
#

OK, so you imported the SVG into gimp?

eternal owl
#

yes

molten bough
#

yes, but not in the sense you're thinking

eternal owl
#

okay

molten bough
#

well why didn't you start by telling us that?

eternal owl
#

...

#

so now what do I do

molten bough
#

I mean I told you to make a new blank image, it looked like you'd just followed all the instructions

#

well, it needs formatting, doesn't it

#

I assume you don't just want a black image

eternal owl
molten bough
#

you'll also need to modify the canvas size

#

No, delete that text element

eternal owl
#

-_-

molten bough
#

Don't give me that face, you didn't follow the instructions I gave you

#

haha

#

I'm not sure if your emoji is going to need to have space around it or not

eternal owl
#

why is it so hard to change the color

molten bough
#

It's not

#

You want the colourize tool

eternal owl
#

no tool with the name colourize

molten bough
#

It's in one of the menus

#

I can't remember which one

eternal owl
#

nvm got it

#

now export?

molten bough
#

If you're happy with it, yeah, export

#

That image is not square, though

eternal owl
#

okay

#

yep

molten bough
#

You need it to be exactly 512x512

eternal owl
#

its not ment to me

#

ooh

molten bough
#

So, go to image and set the canvas size to something larger than what you have

#

basically so you can make it a square

#

and then you can scale it down

eternal owl
molten bough
#

No, I said larger

#

Not smaller

eternal owl
#

its 512x512

molten bough
#

you're not listening to me

glass pecan
#

you can just scale the icon down though pithink

eternal owl
#

how

glass pecan
#

but yeah you gotta follow gdudes instructions, he's painstakingly assisting you bro

eternal owl
#

1min

glass pecan
#

what gdude was saying is to:

  • undo the canvas change so it's back to what it was before
  • change the canvas size to be largest-side x largest-side
  • make sure everything is centred and looking pretty
  • scale the canvas down so everything is 512x512
molten bough
#

yup

eternal owl
#

largest-side x?

molten bough
#

when you change the canvas size, gimp has a thing for aligning the image as well, so you can center it there

glass pecan
#

your original size was 512 x 585, so largest-side x largest-side means 585x585

eternal owl
glass pecan
#

yep, so get it so it's centre

#

im sure there's some alignment tool around in gimp too

molten bough
#

There is, yeah

#

You can use the "select by colour" thing to select the actual pixels

#

and then the align tool will centre it for you

eternal owl
molten bough
#

I think that amount of padding looks nice

#

Anyway, you can use the image menu again to scale it down to 512x512

eternal owl
#

canvas size again?

molten bough
#

no, scale

eternal owl
#

done

molten bough
#

so it's now 512x512? Then you can export it

eternal owl
#

okay cool

#

export as svg only?

#

nvm its png

molten bough
#

PNG

eternal owl
#

🙂

#

🙌

molten bough
#

Well, we got there in the end

#

I guess you need to do the rest of them then

eternal owl
#

yea

#

thanks a lot!

molten bough
#

if these have something to do with a PR or issue, you can drag and drop them into the comment area

eternal owl
#

okay

crude gyro
#

...red?

#

I'm not crazy about that color tbh

#

@glass pecan how do you feel about this traffic light red

#

I know you used some sort of red in your mockup

#

but personally I think maybe just making all the icons white is gonna look the best

glass pecan
#

i don't feel anything

#

so white is likely fine

eternal owl
#

reddit logo also white?

glass pecan
#

no i'd make reddit the colour of the actual logo

eternal owl
#

okay

glass pecan
#

#FF4500

eternal owl
#

I will make all white now

#

I will upload everything within 2 hours

glass pecan
#

all g

#

@crude gyro actually on second thoughts, we can't do just white

#

it needs a backdrop of some kind if it is

#

bc light theme

#

could do it a middling grey pithink

crude gyro
#

yeah, nothing looks good on light theme

molten bough
#

Blurple?

#

that's usually my default

brazen charm
glass pecan
#

i'd rather red over blurple because of the reddit theme

crude gyro
#

yeah but not traffic light red

glass pecan
#

yeah i'd just go grey probs

molten bough
#

I guess orangered might look okay, yeah

crude gyro
#

it needs to be reddit orangered then

#

I think I'd prefer gray

#

and orangered for the reddit icon itself

glass pecan
#

yeah seems nice enough to me

#

reddit icon should defs be their trademark colour yep

crude gyro
#

I don't feel as strongly as you do about that either

#

but I can live with it

glass pecan
#

probs

crude gyro
#

maybe if it was a full badge

#

like, if we used this or something

glass pecan
#

wheres that from

crude gyro
glass pecan
#

its a bit big, maybe

crude gyro
#

yeah but that's not the point

#

not that exact image

#

but that style instead of making a FA icon in orangered

#

since that's what reddit tends to use

glass pecan
#

isn't that the fa icon style

molten bough
#

Their SVGs do support layered colours, but I don't think you could actually set them without inkscape or a browser

glass pecan
#

i see yeah, no middle white part

crude gyro
#

yeah, I kinda feel like it should be white, not transparent. but maybe I'm wrong.

#

you always see it like this

#

where it is clearly filled

molten bough
#

It should be white, yeah

#

FA prefers you to layer SVG icons for stuff like this, so the branding icons often don't have the dual tone icons

#

not that you even get those on free FA anyway

crude gyro
#

it's not hard to dig up this icon

#

without FA

molten bough
#

Oh, I know, just explaining why it's transparent above

glass pecan
#

there you go

crude gyro
molten bough
#

That is the creepiest blob I've ever seen

#

haha

crude gyro
#

socioblob

#

reminds me of the animation in the Worms games

molten bough
#

Haha, yeah, it does

glass pecan
eternal owl
#

I will add these icons/emoji/pictures in my reddit command and send ss soon

crude gyro
#

good.

glass pecan
#

if anyone gets a chance to do a quick lame review on my unbleach pr, feel free

crude gyro
#

merged.

glass pecan
#

thanks lemon

#

it's a massive change, ik.

crude gyro
#

nice of you to make a PR anyway

eternal owl
#

I will send the emojis tmw

glass pecan
#

ok

eternal owl
#

user can we have this white or is it fine as grey?

sullen phoenix
tawdry vapor
#

I wonder if you're able to edit it yourself

#

If you sign into the site with discord

#

I don't remember if helpers were given permissions to edit

sullen phoenix
#

i don’t think we can

#

i signed in a few days ago but i don’t think it gave any permissions

tawdry vapor
sullen phoenix
#

let me look again

#

oh 😮 my bad i see it now

eternal owl
#

Hey guys, in my reddit command, some images are really huge and take a lot of time to get displayed, what should I do for those?

sullen phoenix
#

could you lower the res on them?

#

also, should i edit that line on the site, and if so, what should i edit it to

eternal owl
#

how @sullen phoenix

#

should I use something like pillow

#

(btw by images, I mean images in the posts)

tawdry vapor
#

@sullen phoenix Don't think about it too hard just have confidence in your writing. I'm sure whatever you come up with is fine.

sullen phoenix
#

oh i'm not too sure then. pillow could possibly work

#

thank you @tawdry vapor

eternal owl
glass pecan
#

rohan, i think you missed something in the previous chat lol

eternal owl
#

oh the emojis

glass pecan
#

after a bit, we settled on gray being the preferred choice for the emojis yeah

eternal owl
#

i think white is cool, I thinking making the text, image and video emoji red will look cool

glass pecan
#

thought you were there still, sorry

eternal owl
#

I will give gray a try

glass pecan
#

white isn't good on light theme

#

it's invisible

eternal owl
#

ooh

#

I forgot we had light theme

glass pecan
#

lol

#

so if you can regen them in grey, it'll be for the best. it also means they don't stick out too badly, so it should work ok

#

your text needs some serious buffer between the icons btw

eternal owl
#

yea ik

#

spaces are not working

#

i dont think even \t is working

glass pecan
#

don't use tab, no

eternal owl
#

then how to add spaces in embed desc

glass pecan
#

a normal space will give at least something, but i'm thinking you'll want an en space on the left side of the value and an em space on the right

eternal owl
#

?

#

how to add en/em space

glass pecan
#

their codepoints are 2002 (en) and 2003 (em)

eternal owl
#

how to use them

glass pecan
#

with unicode codepoint formats. hang on

eternal owl
#

okay

glass pecan
#

\u2002
\u2003

#

!charinfo 1 2 .

stable mountainBOT
glass pecan
#

em is a full width space, en is half width

glass pecan
#

better.

eternal owl
#

okay

#

I think I can use format strings to get all comments and users in 1 line

glass pecan
#

the post types should probably be contained in the title

eternal owl
#

I think they look good where they are, I will give them a different color, then it will look better

glass pecan
#

mm dunno if i agree. the numbers are also unnecessary

#

also it seems you're using inline links instead of field titles here, meaning the titles don't stand out

#

if you do that, you should at least use bolding on the post titles

eternal owl
#

made it bold

eternal owl
glass pecan
#

I don't think it's necessary to add a new dependancy for this. I'd just implement it normally for now and when dpy's ext.menus releases at a later date it can be refactored to use the helpers it provides.

eternal owl
#

I will share a ss by today of the command when implemented with the paginator we have

eternal owl
#

Do you guys use the meetup website? (or any other similar website).
I was wondering maybe we can have a command which will get us upcoming meetups.
example:
.meetup [place] [topic]
then the bot sends an embed containing all meetups(as much as the embed can fit)

#

what do you guys think

#

I was also thinking about generalising the movie commands, I mean the commands which suggest a movie to watch, we have the following commands currently:
.romancemovie
.scarymovie

insted of having 2 for each season, we can have a general commands which will take an argument called genre and fetch the movie(s)

hardy gorge
#

I like the latter idea a lot; it's something that will fit in nicely with the removal of the season manager from Seasonal Bot.

#

I'm not quite sure about the former utility, but I haven't thought about for it for long.

#

I kinda feels outside of the core of what typically have, although there are quite a few Python-related meetups

eternal owl
#

not only python-related meetups, but people can ask for anything

#

should I open an issue for the movie thing?

hardy gorge
#

Sure, but make sure to check if there isn't already one; I know that some people have floated ideas similar to this one (but maybe for quizes).

eternal owl
#

okay

hardy gorge
#

Does anyone here have experience with SoloLearn's Python 3 course? It's been suggested as an addition to our resources.

molten bough
#

I've seen a lot of people recommending it over time

#

I've heard good things but I have no direct experience

crude gyro
#

I've used SoloLearn for other languages and it's tolerably useful

#

its strength is in its simplicity - it's basically a quiz that you can do while on the go. a good way to scrape the surface of what a language has to offer, to get a taste.

glass pecan
#

so not really a course?

crude gyro
#

but that's all it does. it scrapes the surface. barely. it frequently disregards best practices, every quiz features a comment section of extremely varying quality (sometimes useful, sometimes a total cesspool of misinformation), and once you've completely finished everything SoloLearn has to offer, you're still a beginner.

#

but I do think it might be a healthy way to expose someone to what a language looks and feels like

#

so long as they continue on to a real beginner resource afterwards

glass pecan
#

these things in reasources

#

University of Toronto: Learn to Program
MIT: Introduction to Computer Science and Programming
University of Michigan: Programming for Everybody

#

are these formal courses?

crude gyro
#

yes.

#

I've done two of them.

#

(haven't done the MIT one)

glass pecan
#

it feels courselike from the front

crude gyro
#

they involve video lectures, quizes, assignments with hand in deadlines..

#

basically a full class.

glass pecan
#

yeah, these dudes i'm making sure are in the courses page then

crude gyro
#

and can award certificates of dubious value once finished.

glass pecan
#

any others we could consider?

crude gyro
#

those are the three major ones that I'm aware of, but it's been years since I did python courses

#

we could include the automate the boring stuff one?

#

al's course on udemy

glass pecan
#

oh the udemy one is a good idea

crude gyro
#

basically the same content as the book, but under his tutelage.

#

probably a very good option for some.

glass pecan
#

that leaves Code Combat, exercism.io and Python Morsels left for interactives

#

does that sound right?

crude gyro
#

the first two, absolutely.

#

python morsels is.. well I guess so

#

you get emails with tasks to complete

#

it falls somewhere inbetween the two categories, I suppose.

glass pecan
#

doesn't feel very interactive pithink

molten bough
#

Codewars is kind of like that, I guess

glass pecan
#

the ongoing stimili sounds good, but i'm not sure if it's what i'd take as "Interactive" like the gamified ones

crude gyro
#

code combat is literally a game, so that's a perfect fit. python morsels may be more like a course than a game, though

#

it's lectures delivered in small installments, you know?

hardy gorge
#

I have done the MIT one

crude gyro
#

complete with assignments

glass pecan
#

but it's not a formal course either

hardy gorge
#

I am actually auditing the current one

crude gyro
#

it is not a formal course, no.

glass pecan
#

structure wise

crude gyro
#

that's why I'm saying it kinda falls between categories

glass pecan
#

hmm

hardy gorge
#

The MITx course is somewhere around introductory academic level and, unfortunately, it's now instructor-paced.

crude gyro
#

@woeful thorn has been involved with morsels a bit - which category would you say it falls in out of the new ones scrags has been mapping up that you may have seen in #admins ?

hardy gorge
#

It may even be slightly below academic levels; it's not difficult.

glass pecan
#

lol "unfortunately". i feel that pain ves

crude gyro
#

self-paced is nice

hardy gorge
#

It's not a great couse for beginners not on an academic thinking level (of willing to put in that kind of effort)

glass pecan
#

but structure-wise it's similar?

hardy gorge
#

I like self-paced, but the main issue with instructor-paced is not the tempo, but the availability

#

The course is now only available while it's being given, unless you sign-up and pay before February 20

#

You can audit it for free and do all the assignments/exercises (but not the midterm/exam), but it will unavailable after March 22.

glass pecan
#

makes sense

molten bough
#

Does it only cover beginner topics or does it go intermediate?

#

I'm still trying to find a useful Python cert

hardy gorge
#

The MIT one? It's an okay course. It's an "Introduction to Computer Science and Programming Using Python", so it's not a "learn Python" course.

molten bough
#

Oh, I see

hardy gorge
#

Still, the content is solid and they do teach a lot of Python

molten bough
#

it's probably below my level, but a lot of companies here don't know what github is

hardy gorge
#

At the same time, they also use it as a tool to explain CS concepts (recursion and the like) that you normally wouldn't really use in Python

#

yes

#

I'd say that you probably know a lot of that course already. They do spend some time on basic theory about algorithms and complexity in the second half

#

Most people without CS experience usually haven't learned a lot about that

molten bough
#

I haven't, yeah

#

Sounds worth a look, thanks

hardy gorge
#

Anyway, the course is now part of a larger block of 5 or 6 courses given over the course of the entire year, I think

glass pecan
#

Solo Learn honestly doesn't look too bad. I think this could likely be included. @crude gyro was there any major qualms when you were dealing with the other ones. It appears to be nicely structured modules. The usefulness of the cert can be disregarded, as long as it's genuinely helpful going through it.

hardy gorge
#

I may do them all

crude gyro
#

@glass pecan no major qualms. I found it to be more or less a pleasant experience, and a useful scratching of the surface. gave me enough SQL basics that I could feel a little bit more confident in an interview that expected SQL experience.

#

it's just important to clarify that it's not really a full course, or even a beginner tutorial.

#

it's just a taste.

glass pecan
#

most of these free course things are mostly just the tip of the knowledge base required for further learning though, no?

#

or is this entirely different to the others

crude gyro
#

I think many of the free resources in our list are more exhaustive beginner resources.

#

like A Byte of Python is pretty in-depth.

#

even Automate The Boring Stuff, if you work through the whole book, will have taught you faaar more about the versatility of Python. SoloLearn just teaches basic syntax.

glass pecan
#

specific to courses though

crude gyro
#

but all of that said - it's probably the best app of its kind

glass pecan
#

Automate does at least have the udemy and you said it goes through it pretty extensively, so that's fair

crude gyro
#

and I don't have any big issues with us adding it

glass pecan
#

ok. then in your opinion would it mostly suit as a nice interactive exercise thing or as a structured course thing

crude gyro
#

hard call to make. it really wants to be the latter, but might be more accurately described as the former.

#

I think I'd lean left.

glass pecan
#

interactive then, ok

#

mind if i do a reply in meta repo then for the ticket

crude gyro
#

knock yourself out

glass pecan
#

won't be able to type much then though lol

#

i'll give them the heads up

eternal owl
glass pecan
#

if it's not impacting your own prs, just leave it to core devs to deal with

eternal owl
#

okay

#

@glass pecan

#

I am sorry for the bad quality, idk how to make it better 😅
I need feedback, everyone

glass pecan
#

screenshots and showing things is good. but if you feel it's ready for getting feedback, then make a PR so feedback can be left on the ticket

eternal owl
#

okay, I will change the colour of those emojis by tonight

#

what do you think of the color(I have only applied it to the image emoji)

glass pecan
#

looks good

eternal owl
#

okay

molten bough
#

I like that

eternal owl
#

xD

#

hey @molten bough , in gimp, how can I see the current colour of a picture

molten bough
#

You mean of a pixel?

eternal owl
#

yea

molten bough
#

If you click on the colour picker thing

#

there's a dropper button

#

you can click that and then wherever in the image

eternal owl
#

Nothing happens when I click the dropper

#

nvm got it