#dev-contrib

1 messages · Page 136 of 1

static canyon
#

Lemme get on my PC because then it'll be half the amount of lines and more processing power

sour viper
#

Just write it to another file, dont display it ? would that work ?

static canyon
#

Stop being big brain smh

short snow
#

make it to a json, and upload it somewhere

#

maybe

#

or save it to a file

brisk brook
#

Wait what does that mean?

static canyon
#

I guess we want the dict format right

#

Or just a 1d list of all the anagrams put together?

short snow
#

dict format probably

sour viper
#

was looking at some other resources, how they have worked with jsons

short snow
#

from what i understand of maxy's appraoch

brisk brook
#

I am so confused, for all I know you may be cooking drugs

static canyon
#

It just means we then won't have a list of stuff to see if it's a valid anagram

#

I guess we just sort letters and get the values, nvm

brisk brook
#

What's the purpose of printing 5106 lines 😂

static canyon
#

That'll be even better because only checking possible matching anagrams (same letters and same length) rather than every anagram in existance

short snow
#

just get the first 1k lines and put it into a file

#

we aren't gonna need anymore

static canyon
#

I put the entire thing into a json easily

#

Wait shit that's the wrong one

#

Sec

#

There's just some words that are questionable as to whether they count

#

Like "aahed"

short snow
#
  "aaby": [
    "abay",
    "baya",
    "yaba"
  ],
  "aa
#

wow

#

did u verify those words?

#

or just generated them

static canyon
#

Neither

sour viper
#

"aanst": [
"antas",
"nasat",
"santa",
"satan"
]

static canyon
sour viper
#

its working

short snow
#

ah okay i saw your script

sour viper
#

i checked some random words, which i didnt think were words, they were words

static canyon
#

So this will make the actual command part really easy now

short snow
#

but those words lol

static canyon
sour viper
#

end product is gonna be like poor mans scrabble

short snow
#

yeah i know that

static canyon
#

But yeah there is some questionable words

short snow
#

i was looking into teh values

static canyon
#

I'll probably filter through it tbh

short snow
sour viper
#

just a small concern, other peoples resource files are around 36kb max then there's our file, around 2MB

static canyon
#

28kb

#

Although that's including 2 letter words which I don't think we wanted

sour viper
#

huh santa and satan not present

static canyon
#

Because they're not top 1k words I guess

gleaming jay
#

must've went on vacation

static canyon
#

The file has 9474 words that are 3 letters or more

#

And santa and/or satan aren't a part of them

sour viper
#

i see a potential problem not sure though, what if the word is anagram but not in the popular list ?

static canyon
#

Then it wouldn't match

sour viper
#

But it would fulfill the rules of anagram wouldnt it ?

static canyon
#

Like sayjson "aemn": [ "name", "mean" ],another valid anagram would be "mane"

#

But it's not included

short snow
#

welp

stable mountainBOT
#
It has arrived!

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

static canyon
#

I'm gonna filter through the massive file for a bit and see what comes of it

#

@sour viper if you fork the sir-lancebot repo, create a branch and add me to it I'll push the file when I'm done

#

Then I'll leave the rest of the issue to you

sour viper
#

Sure i have it forked, im creating the branch right now

static canyon
molten perch
#

Oh, no worries. The solution ended up to be StringIO

sour viper
clever wraith
#

i won’t have time to work on anagrams anymore so i’m just gonna same day the current code i have

#

y’all feel free to adjust do whatever

static canyon
static canyon
#

My wifi just died but fyi I've filtered a fair amount

#

Thing is there's just so much

#

I've done >5k words but then there's a total of like >70k (so only ~7% in 2 hours)

#

So it's at this point I think we have to make a decision:

  • Use the smaller word list and accept that it's going to have missing anagrams

  • Use the bigger dataset without refining any further, and accept there may be some false-positives in terms of anagrams (means we may have "unwinnable" games)

  • Use the bigger dataset and keep refining, but instead of removing bad words, we keep things we know are right and remove everything else (will have missing anagrams, but less than option 1)

  • Use the bigger dataset and fully refine removing all bad (will probs take days to fully refine and don't think is worth it)

I personally would probably go for the third option but interested in your input @sour viper (and I guess @short snow & anyone else if you'd like)

stable mountainBOT
#
It has arrived!

Here's your reminder: do this if you haven't already
[Jump back to when you created the reminder](#dev-contrib message)

fervent sage
#

I am in need of a list of safe english words to use for other things, what we could do is create a quick & easy website that shows a word and a yes/no button give it to a bunch of people and it should be done fairly quick

static canyon
#

Yeah I mean that's basically what I've got rn just locally so only me doing it

#

This word list would also have other uses tbf (like the hangman PR)

#

But then this is a list of anagrams, not a complete list of all safe words, so I suppose that's something to keep in mind

#

The full list of words is 369,646 words, whereas list of anagrams from those words is currently 72k ish (can't get exact number rn)

#

So to make a full list is 5x more work

#

It makes more sense to remove from the 370k list though and then just regenerate the anagrams since anagrams can be generated in <1sec

sour viper
#

I was thinking a mix of option 1 and 2

#

We can have a list of missing anagrams, whenever someone enters the missing anagram we run through 2 checks same letters as scrambled and check if that word is present in original list of all words to see if it's valid?

static canyon
#

Eh I don't think that's a good solution personally

#

We want to be minimising what we store, so not storing both

#

Especially when as you pointed out earlier it's like 4Mb

static canyon
fervent sage
#

do as we do in minecraft@home

#

create 2 (or more) tasks for each word

#

give the tasks to different people

#

if the results match eachother accept it

#

else put the tasks back into the pool

stable mountainBOT
#
It has arrived!

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

static canyon
#

Right, yeah. What do you mean by "tasks"? Just having at least two people verify it?

#

I guess, two different people

#

So it'll require two "votes" for accepting, and one for denying? @fervent sage

fervent sage
#

So basically you have a database (it can be sqlite, not important) of "tasks" which in this case will just be words, when a user visits the website an uncompleted task is selected and given to them, they send a result and the task is marked as validating, then that task is sent to another user to complete, and that also gets marked as validating. When both (3 may be more reliable actually) are marked as validating you check those results to see if all of them have the same completed result, if not you release the tasks back into the pool of tasks and they get sent out again. Repeat until that check returns true

#

That's what we do for validating mc@h results to make sure people dont just send in bullshit results

#

the db would look something like

CREATE TABLE Tasks (
  word VARCHAR(255),
  status INT, -- An enum for the status of the task, `uncomplete`, `validating`, `complete`
  result BOOLEAN -- whether the word is good or not
);
static canyon
#

Right, that makes sense

austere hornet
#

Hey @vale ibex , could you please review sir-lancebot#843 when you have a moment? I would greatly appreciate it. Thanks!

dusky shoreBOT
trim cradle
#

@cobalt sun tells me that there are python to js transpilers and I wonder if this is something we could use for our projects

#

In particular, it would give me a lot more ability to work on smarter resources.

cobalt sun
#

I am new to hear about it as well, and I'll try to find out whether it's worth looking into seriously by tomorrow, unless anyone already has experience

trim cradle
#

Sounds like Joe and Alex aren't into it

patent pivot
#

Transcrypt is something we should avoid at all costs

#

it's just writing JS in python flavor, it's not Python stdlib at all

trim cradle
#

Well fuck

patent pivot
#

no stdlib packages, still got to use functions like addEventListener and so on, still got to use document

trim cradle
#

So it doesn't even save you any work

fervent sage
#

not only do you need to write it in js format, but you have to forget certain things you'd normally do in python

clever wraith
#

i know this has been long and really annoying, but sir-lancebot#849 could use reviews

dusky shoreBOT
remote wigeon
#

Does anyone know why the converters are classes and not simply functions

#

you can iterate over functions as well

trail pilot
#

What if…
geeksforgeeks command

#

That grabs an article from geeksforgeeks

#

I might make an issue for it on sir-lancebot once I’m done with one of my two current PRs

eternal owl
#

Sounds like a great idea, maybe we can combine other sites similar to geeksforgeeks for the command ? I guess there are a few more notable ones @trail pilot
A thing to consider is, does geeksforgeeks provide a rest API to interact with which is robust and convinient ?

placid ermine
trim cradle
#

What

trim cradle
brisk brook
#

Yeah I'm gonna vote for a no on geeks for geeks.

#

Just read RealPython

trim cradle
#

What changes? We discussed what the MVP is in the staff meeting yesterday and I finished implementing it except for an issue with some redirects

#

That's not what mine looks like

short snow
#

🤷‍♂️ My branch is upto date, and i ran task start

gritty wind
#

I had that same problem when I checked the branch out a while ago (but I can't replicate right now because I'm getting warnings about the lockfile being out of date, and navigating to the page throws an error)

#
  File "pydis_site\apps\resources\views\resources.py", line 11, in _parse_checkbox_options
    return set(options.split(",")[:-1])

Exception Type: AttributeError at /resources/
Exception Value: 'NoneType' object has no attribute 'split'
#

Working around that bug, this doesn't seem to be a problem anymore

short snow
clever wraith
#

can anyone tell me how to setup snekbox inside my discord.py bot

green oriole
#

After that, you can add a cog to your bot calling the API. You can take inspiration or even copy our own implementation.

#

!source eval

stable mountainBOT
#
Command: eval

Run Python code and get the results.

Source Code
clever wraith
#

the thing is, i want to set it up inside heroku

green oriole
#

Ah, I don't think that's possible. You should look at public evaluation API for that, I believe Piston is often suggested? Or something like that, I don't remember honestly

clever wraith
#

and will it use too much memory??

green oriole
#

Snekbox is a totally different service, most probably incompatible with heroku

austere hornet
trail pilot
brisk brook
#

Any other article you'll find is usually better covered than geeks for geeks, sometimes it may be the only result

#

But at that point, a command isn't enough. You need to Google search with a bit more effort

trail pilot
#

Hm, what if realpython could be refactored to article, as a generic one, and G4G could be a fall back if RP doesnt exist

cold island
#

Yeah I wouldn't like a command for a learning resource we wouldn't show on our website

green oriole
#

I really don't want to like to G4G, their "article" suck sooooo bad

#

They are badly formatted, outdated and sometimes even outright not working

trail pilot
#

Hm

#

I’ll look at some other resources on the website and see if there’s any alternative

clever wraith
#

Yeah g4g is sketchy

surreal venture
#

w3schools?

#

realpython would probably be better than g4g, true

surreal venture
#

Is it possible to add a "practice" section to the resource page of the pydis website?

vale ibex
#

The resources section is being overhauled as part of site#582

dusky shoreBOT
cold island
surreal venture
#

really? isn't w3schools like regularly updated and is maintained by a set group of people?

vocal wolf
#

w3schools is pretty bad, lots of incorrect information and what not

#

tbh I'd prefer if we'd stay away from both g4g and w3, realpython will do.

vale ibex
#

Yea, I don't see a need to expand further than real python

late wolf
#

Why the use of ] prefix?
#bot-commands message

thorny obsidian
#

It's a temporary bot and other common prefixes would collide

late wolf
#

ah didn't notice the differnece

cold island
#

Don't get me wrong, I still sometimes use g4g and w3 for quick reference sometimes if they're in the first google results, but I wouldn't use it as a teaching aide

#

Lately though I just use the python docs more often than not

dim pelican
#

At what point do we have too many article grabbers? It would be interesting to have a generalized one, but at that point google is probably better and faster

#

(I did the realpython one, so I definitely see the potential to adding more, just raising the question)

clever wraith
#

Realpython is probably all we need imo

molten perch
#

Hey! Could someone take a look at sir-lancebot#857 ? 🙂

clever wraith
#

sir-lancebot#849 could use your reviews

dusky shoreBOT
surreal venture
#

I'll check out both ¯_(ツ)_/¯

fallen patrol
#

oof

#

so discord py will need to be patched by april 2022 cri

clever wraith
#

Why?

fallen patrol
#

the message intent?

#

even if monkey patched, still will need to be patched

vale ibex
#

Discord py has the message intent already

fallen patrol
#

no

vale ibex
#

the change discord's end is jsut making it privileged

fallen patrol
#

that's different

#

no?

#

its really not lol

#

message content != messages

#

bot still can know that messages are being sent, but not see the contents

fallen patrol
thorny obsidian
#

Isn't that only for verified bots?

vale ibex
#

The way I read the announement is that you will be sent messages as normal via the gateway with the message intent, but if your bot doesn't have access to the privelidged intent, you just won't receive content, embeds, attachments, components in the message object

vale ibex
fallen patrol
#

yes, but then the bot still needs to request said intent on logging on

vale ibex
#

possibly

fallen patrol
#

just look in the ddevs server smh

#

its a new intent which has to be declared like any other

thorny obsidian
fallen patrol
#

also on that page

dim pelican
#

So the bots in the repo are only used here right? Which is less than 100 servers and therefore unverified?

fallen patrol
#

just like presence and guild member data.
eg. turn on in developer settings and declare intent when connecting

patent pivot
#

enabling in settings does not necessarily mean that there is a new intent, it just means that message data comes through with messages

#

you are jumping to conclusions with pretty limited evidence, if there are links please send them, if there are messages in ddevs also feel free to link them, but as far as I can see this is just a toggle that attaches data already, you have it or you don't at the app level, not the session level

#

I could well be wrong, but as far as I've seen there is no evidence pointing towards your suggestions either

fallen patrol
#

@vale ibex someone with your exact pfp, username, and ID has entered the chat where I asked 👀 is that u

vale ibex
#

yea

#

currently waiting for someone from discord to weigh in

#

rather than someone saying it's implied

silent walrus
#

Where is the code that implements the bot responding, when a user incorrectly enters python code? on the pybot github.....

vale ibex
#

!e Are you referring to this error? ```py
print(n)

stable mountainBOT
#

@vale ibex :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | NameError: name 'n' is not defined
vale ibex
#

or some other error?

silent walrus
#

something like that ^

#
x = 1
vale ibex
#

can you link to an example?

#

I don't quite get what you're referring to

silent walrus
#

when the above is incorrectly inputted

vale ibex
#

ahhh yea, that makes sense

silent walrus
#

@brazen charm can the bot edit a user's previous post?

vale ibex
#

No, you can't edit another user's messages

#

even bot's can't

silent walrus
#

I'm curious if it's possible to "auto-correct" incorrectly pasted Python code

vale ibex
#

You could have the bot reply with what it thinks is correct

#

but then you have 2 messages with the code taking up a lot of screen space

silent walrus
vale ibex
#

if you delete the user's "incorrect" code, they then lost the ability to edit it

vale ibex
silent walrus
#

so much for that then...

vale ibex
#

it's quite a lot of effort to allow that, since if a user edit's another user's message, then you need to store the fact that the original author didn't type the new message, and have that visible in the client somewhere

#

otherwise a mod could change a user's message to say whatever they want, and possibly lead to the user being banned

silent walrus
#

I see...

vale ibex
#

and it's effort that Discord just hasn't deemed worth it so far

silent walrus
#

is the "python" tag used to paste python code, markdown?

vale ibex
#

both py and python can be used

silent walrus
#

or part of the discord client itself..?

vale ibex
#

Yea, it's part of the client

silent walrus
#

interesting

cold island
#

Idea for lancebot because I'm on the bus and bored: a command to convert a sentence to pirate speech invoked with .arrgh

clever wraith
#

Hey I don't know why but why list methods are not in !d

#

letting people know about list methods is needed IMO.

brazen charm
#

the python docs do not expose them

clever wraith
#

you mean its coming from some api call of theirs?

brazen charm
#

The bot parses the html of the looked up symbol by going through the HTML tag's id, the base list methods don't have symbols associated with them so they don't have ids to look them up with

clever wraith
brazen charm
#

The source doesn't provide anchors for them, so the file we parse for symbols doesn't contain the methods and it's impossible to find them directly on the page without knowing their contents

clever wraith
#

oh so str works perfectly because they gave it out there!!

#

so I mean, if we can do a little bit of conditioning and parse that html for list, wouldn't it be worth?
reasoning: lists are the data structures which are anyways going to get used a lot. and !d helps in helping a lot. and it would not affect the speed since it just involves 1 static conditioning.

dim pelican
#

Preview not rendering a created .md or .txt file

brazen charm
clever wraith
#

wouldn't disagree with can be explained easily part, but seems worth to me.

#

should i make an issue or just ping Xith here? so that atleast we can see opinion on this. i kinda feel it may worth.

brisk brook
dim pelican
brisk brook
#

Yeah, neither options (Markdown file or embed) are perfect

dim pelican
#

I think the embed with a link to the section is ok for both mobile and desktop

#

But the original issue author reached out mentioning they wanted to add this additional feature

gritty wind
# clever wraith should i make an issue or just ping Xith here? so that atleast we can see opinio...

You can make an issue at any time (no need to ping Xith unless you explicitly want his opinion). Opening an issue is by no means an indication something is approved or will happen.

In terms of the idea itself... eh, I don't care much for it. There isn't a great place in that docs page to link to begin with. Like the main mention I'm seeing of it is under Mutable Sequence Types, and that's literally a single line among a list of other functions that will probably be more confusing than helpful to someone (espically if it's someone just starting out and needing to learn remove)

gritty wind
#

Still, not particularly convinced it's all that worthwhile

clever wraith
#

yeah that's where its currently referring to i think.

#

oh alright, thanks!
I'll leave this idea then.

gritty wind
#

(Are the tutorial pages actually included in the symbols?)

#

Thanks for suggesting the idea

#

Different opinions and creativity are what keep things alive

cold island
#

@vale ibex how available are you?

vale ibex
#

cooking dinner rn

#

could you repull the metricity image?

cold island
#

I just built it

vale ibex
#

if docker has the image cached, it won't update

#

since it's tagged to latest

cold island
#

I didn't pull the image, I built it locally

#

Since I needed to configure metricity to the test server

vale ibex
#

The metricity image?

cold island
#

yeah

vale ibex
#

oh, that's odd

#

I'll take a look after dinner

cold island
#

👍

#

Oh wait

#

Is it because it added CR's?

vale ibex
#

are you able to exec into the metricity image and cat entry_point.sh

cold island
#

Because I'm on windows?

vale ibex
#

uhhh, not sure, I'm on windows and didn't have a similar issue

gritty wind
#

Isn't this running inside docker anyways?

#

That should be OS independent

cold island
#

yyyeep

gritty wind
#

Ah

cold island
clever wraith
gritty wind
#

You can configure git to not add CRLF on it's own, but for whatever crazy reason that isn't the default, so it may not be the most viable

vale ibex
#

Ah, I'm guessing this isn't an issue for the image I built locally as I have autoclrf set in my global git conf

#

git config --global core.autocrlf input

gritty wind
#

!docs getdoc python

vale ibex
#

it could, if we had one

gritty wind
#

That wasn't helpful lol

#

Now you probably wouldn't actually browse that by hand

cold island
#

yeah ok, it doesn't go insane anymore

gritty wind
#

But from the docs command, it doesn't seem to pull them

clever wraith
#

wait that made me download this inv file

gritty wind
#

Yeah

#

It's the file that contains all the symbols, which the bot parses

cold island
#

However it seems it failed to set up the database

clever wraith
#

i tried opening with vscode, didnt work lol

gritty wind
#

It's a compressed file

#

Sphinx inventory version 2

Project: Python

Version: 3.10

The remainder of this file is compressed using zlib.

cold island
#

I'll kill all the containers and try again

cold island
vale ibex
#

If you're still having issues in ~45 min I can debug over screenshare if you want

clever wraith
# gritty wind It's a compressed file

oh i see so python docs are created using this Sphinx thingy and that creates this compressed file where symbols(not sure what they are 100% tho) are, and you guys basically do crawling depending upon those symbols?

brazen charm
#

the inv file tells the bot what symbols (e.g. str etc.) are available and where they are, then it uses that information to scrape the doc pages and convert that to Markdown to show here

#

There are no symbols for the list methods in the tutorial page so the bot can't parse them as it would be impossible to find them. Then linking to it would be weird without an anchor too if it had something to accommodate them

gritty wind
#

Well considering we're trying to solve the problem so people don't need to run other things themselves 🤡

green oriole
#

okay you sorted it out akarys_spin

gritty wind
#

Basically, the thing Zig and Chris are working on is the fix for the issue, so manually running the sql is not an option

#

The plan is to have docker running it

clever wraith
green oriole
gritty wind
#

There probably is no way to know from context, I've just been following this for days lol

cold island
green oriole
#

because if the child container hasn't been updated it will cause issues

#

oh

#

well

#

you are running the site, right?

cold island
#

The only thing I can think of is that metricity isn't speaking with the DB, which happened last time I set it up

green oriole
#

but did you made a change to the compose to use a local image?

cold island
#

yes

green oriole
#

Interesting

cold island
gritty wind
#

Yup, sorry that wasn't my intention 😅

vale ibex
#

free now @cold island

#

lol

#

not for me

#

shows this

#

right click for me

vale ibex
#

work project

#

lol

#

it's a bot that integrates with slack

#

forgot I had it open tbh

#

just using vsc as a terminal rn lol

#

I never mute

gritty wind
#

I'm muting because I've got a terrible mic 🤡

#

Discord is having a day, and I can't watch the stream

#

Good luck you two

vale ibex
#

debugging metricity

cold island
#

I'll be available in like 10 minutes

#

Ok I'm around

#

Don't have a mic Wave

#

Sec

#

Need to make sure I'm not streaming something I shouldn't

#

By the way

#

When I set up metricity

#

ok

#

could just build lol

green oriole
#

time for me to go, cya 👋

merry bone
#

bubye

green oriole
#

Debugging nights with Chris and Zig, sounds like an event title to me

cold island
#

It is true

#

@vale ibex

#
# The guild ID that Metricity should be reporting about
guild_id = 476190141161930753

# This is the role ID of the role that should identify staff members, for Python Discord this is the helper ID
staff_role_id = 476190429960732672

# Channels that should be flagged as staff only by category ID
staff_categories = [
    609529926366003201,
    686646323985907808
]

# Don't report messages for the following categories
ignore_categories = [
    609530625233387540
]
#

What I set ^

gritty wind
clever wraith
#

What is this code about?

gritty wind
#

We're working on setting up

clever wraith
#

I didn't follow from the start

brisk brook
#

Tl;Dr Docker being a whale needs to blow out water from it's nose-thingy

vale ibex
#
    volumes:
      - ./config.toml:/metricity/config.toml
cold island
#

Which line?

#

btw @vale ibex invoking the user command gave me this

patent pivot
#

yo I wrote this project

#

poggers

gritty wind
#

join us

cold island
#

yes

#

amazing

patent pivot
#

lol, I'm probably going to be uhhh

#

30-45 mins

gritty wind
#

👀

cold island
#

Mounting the volume failed

#

yuck

gritty wind
#
        for key, value in config.items():
            if isinstance(value, dict):
                if env_var := value.get("env"):
                    if env_value := environ.get(env_var):
                        config[key] = env_value
                    elif default := value.get("default") is not None:
                        config[key] = default
patent pivot
#

did I write that

#

I should just move to pydantic

gritty wind
#

And you wrote most of it - I wrote the last two lines (the broken ones)

patent pivot
patent pivot
clever wraith
#

Lol

cold island
#

gotta go for now @vale ibex @gritty wind ttyl

#

Good luck lol

gritty wind
#
if env_value := environ.get(env_var):
    if (key_type := value.get("type")) is not None:
        if key_type == "int":
            env_value = int(env_value)
    config[key] = env_value

🤡

#
        for key, value_type in dictionary["__annotations__"].items():
            config[key] = value_type(config[key])
        dictionary.update(config)
vale ibex
#

@patent pivot we need your opinion on a fix

#
                    _type = dictionary["__annotations__"][key]
                    if type(_type) is type:
                        config[key] = _type(config[key])
#

🤡

cold island
#

Wtf is this

vale ibex
#

lol

#

it so that env vars get converted to the right type

cold island
#

Every day we stray further from God

vale ibex
#

lol

gritty wind
#

I'm sure some amount of comments will save this

#

Not sure what that amount is

vale ibex
#

1 word

gritty wind
#

Go on 👀

vale ibex
#
                    # magic
                    _type = dictionary["__annotations__"][key]
                    if type(_type) is type:
                        config[key] = _type(config[key])
gritty wind
#

Thank you for your infinite wisdom good sir

vale ibex
#

does python refer to str int float etc as primitive types?

#

or does it use a different term

brazen charm
#

I don't think it uses that term anywhere around builtins

patent pivot
#

but

vale ibex
#

I can explain the reasoning in vc if you want

#

there's a bit of context

patent pivot
#

I revised tihs config system in Olli to have type support with pydantic, so long term I could look at something like that

vale ibex
#

oh yea that would make sense

#

would be less of a hack

patent pivot
vale ibex
#

I might just do it here

#

instead of metaclass magics

patent pivot
#

lul

vale ibex
#

the issue all came from wanting to run metricity via the bot compose

#

so we need to give it guild id etc

#

so env vars sounded good

#

but env vars are strings

#

🙃

patent pivot
#

imagine env vars

vale ibex
#

imagine a place

cold island
#

Putting it in an .env doesn't seem any better

vale ibex
#

yea true

#

that's an easy fix too

#

actually

#

it should be done with that commit

cold island
#

Did you just push the dev config file? Lol

vale ibex
#

yup

#

No point in pushing the actual config-default, since this will never be used in prod

#

so might as well use our dev values lol

patent pivot
#

this is so webscale

vale ibex
cold island
#

Hmm. I'm not sure how I like it in the repo

patent pivot
#

i am also somewhat hmming it

vale ibex
#

yea, it doesn't feel right

cold island
#

I imagined we'd add it like config.yaml

vale ibex
#

the file needs to be present in order to mount a volume

patent pivot
#

hmmmm

#

if we could do init scripts we could pull down the example config

cold island
#

But it doesn't need the file in prod

vale ibex
#

We use docker-compose to shove this file into the metricity container, since that's what needs it

#

docker-compose won't let you use a volume if the file doesn't exist

cold island
#

Right, but we don't want a volume in prod

vale ibex
#

nope, and prod doesn't use docker-compose

#

so it's fine

cold island
#

Hmmmmmm

vale ibex
#

but yea, how do you see init scripts working joe?

#

we'd need to get the local config into the metricity container on bot somehow

cold island
#

And it only mounts a volume when you set use metricity to true?

vale ibex
#

it always mounts the volume

cold island
#

Hmmmm

vale ibex
#

there isn't a way to conditionally mount a volume as far as I could find

patent pivot
vale ibex
#

yea, we need a way to overwrite with local values

patent pivot
#

maybe the pydantic approach with env vars is the best

vale ibex
#

yea, it's just a decent peice of work due to the number of env vars

#

so we'd need to write a bunch of validators

patent pivot
#

hmmm

vale ibex
#

actually, it's not so bad if we force the use of env vars

#

even in prod

#

rather than having config default and env vars

patent pivot
#

what other service did i write that does this

#

oh king arthur

#

hold on

#

this also works

#

if we force env vars, which I'm not opposed to

cold island
#

You lose the yaml structure though

patent pivot
#

hmmmm

#

I guess

vale ibex
#

lists in env vars are yikes too

patent pivot
#

grafana solve this by using _ as a .

patent pivot
vale ibex
#

yea

#

I'm guessing pydantic base settings supports csv

patent pivot
#

would assume so, haven't tested though

#
METRICITY_BOT_TOKEN=X.Y.Z
METRICITY_PYTHON_LOG_LEVEL=INFO
METRICITY_DATABASE_URI=postgres://foo:bar@baz/qux
#

I will have to double check whether pydantic allows that

#

but doesn't show the env vars

#

ah

#

yeah it does

#

hm

#

export my_prefix_more_settings='{"foo": "x", "apple": 1}'

#

thta's not friendly

vale ibex
#

yeaa

#

there is parse_obj

#

which we could pass in the output of the current get_config()

#

which merges the toml files

#

so we could use a combination of toml and env vars

#

hmm, still not the best if you need to overwrite a value of a sub model via env var

patent pivot
#

hmmm

vale ibex
#

we could flatten the config into 1 class

#

and prefix certain things that need it

#

I'd prefer that to json encoded env vars

fallen patrol
#

ah

#

nvm

torn idol
#

yes

#

we love

#

coding

austere hornet
#

Do you get the contrib role after making at least 1 contribution to one of the open-source projects or is there a set number of contributions that you have to reach to get it?

brazen charm
austere hornet
#

Thx

clever wraith
#

Hey all, sir-lancebot#867 is ready for review!

dusky shoreBOT
fallen patrol
#

hmmmmm

#

I have some other things on 867 to review

clever wraith
#

i rebased

patent pivot
#

we can squash at PR level, which for a PR implementing a single feature isn't a bad bet

clever wraith
#

oh i already squashed :P

patent pivot
#

yea all good - just saying that's an option for those that don't want to get into deep git for really small PRs

clever wraith
#

kay

fallen patrol
#

which the guide above literally says 😛

Since squashing a Pull Request is an exceptional operation, we don't allow squash merge, you will have to do it from the command line, let's jump right into it!

patent pivot
#

don't have notion on this machine

#

yet

fallen patrol
#

ah

#

although weren't those docs going to be migrated to github anyhow?

patent pivot
#

uh

#

not to my knowledge

#

let me actually see where this page is hosted in terms of on notion

clever wraith
#

This PR is pretty small yeah lmao

#

It's a 7 line file

patent pivot
#

i'm not sure whether we set aside an area on notion for this

clever wraith
#

For what

patent pivot
#

hmmmm so

patent pivot
#

code review guide, squashing and then I think an internal poetry vs pipenv page

#

code review guide got migrated to site, so I guess at some point the plan may be to convert this to a guide, it's not a part of anything else I think we just drafted it on notion to get things together quickly

green oriole
#

I wrote that as an internal reference, but it will probably need some polish before becoming an article

#

Hey @cold island @vale ibex, so what was the issue?

cold island
#

But we're now trying to understand how to allow development with metricity on a different server. Since that's the whole point of the changes

#

The issue being that you need to change metricity's config from the bot

green oriole
#

I see, I see

#

do we use a config file for metricity or env vars?

vale ibex
#

toml files

#

with a default & override

#

with some values being pulled from env vars

#

I think the consensus atm is to migrate metricity to pydantic

#

We still need to discuss it a little more, since we need to figure out a nice way to deal with it

#

see my conversation with joe last night

#

yea, scroll up like 2 pages

green oriole
cold island
#

We did

#

But then the file is required always, even if you don't need metricity

green oriole
#

Hmmm

#

What about mounting the current folder, since it will always exist? Then we will be able to look whenever there is a config file on that folder

cold island
#

Mount the bot folder in the metricity container?

green oriole
#

Yeah

#

We could have the entry point try to move the config to the right place

#

So it is transparent for the app

cold island
#

Not sure how to do that. Maybe Chris knows

green oriole
#

We could have compose mount . to /tmp/bot and add cp -f /tmp/bot/metricity-config.toml ./config.toml to the entry point

#

Well, at least that's the rough idea

cold island
#

cc @vale ibex

gritty wind
#

Eh the whole idea feels like a lot just to set one variable

#

I like the idea of pydantic (totally unbiased), so if we’re considering doing that anyways

#

Might as well save the extra effort

#

We’re in no rush either, things work as is, the only reason we need this is for people that want to run metricity

#

So basically only people who are working on very limited features

green oriole
#

I'm not a pydantic pro, how will that help with configuration?

gritty wind
#

Well basically we already have it working cleanly with env vars

#

What Chris and I were working on was just getting that env var to the right data type since meta classes do not type casting at all

#

Pydantic on the other hand

#

Does

#

Unrelated, but it would actually be great if we could just drop the toml configuration. I dislike it in all projects we use it in.

For most of our projects it’s literally just forcing us to define the same content in two different spots. The only project it sort of makes sense for is bot, because it makes it easier for people to clone and change the variables they need

#

But even bot can just be completely circumvented if we have smart config

#

Which is, ya know, one day™️

green oriole
#

I mean, we could roll smartconfig to more projects than the two bots

gritty wind
#

What other projects need it?

#

Isn’t smartconfig creating a server and setting the IDs?

green oriole
#

I mean, any project that uses a large config file can benefit from it

#

The core of smartconfig is about having a modular config system

#

Then there will be an extra to add a discord integration

gritty wind
#

I don’t follow, what would a modular config look like

green oriole
#

Don't mind me, I'll copy paste my message from the staff channel so it is publicly available

#

So, smartconfig. You might have heard that name here and there, the goal of this library is to make our whole configuration system easier to use.

Right now, we rely on this huge default-config.yml file, which has more than 500 lines or so. Additionally, all of those constants are repeated in a constants.py file for typehinting sakes. This is far from ideal, and we can do better.

Smartconfig will allow us, instead of having centralized constants, to move them to their parent cog if you will. Additionally, smartconfig will automatically parse your configuration file and allow you to override constants using the module path.

I know this is quite confusing at first, so here is an example: everyone's favorite cog, DuckPond ! It has a related constant, ducky_thresold

# file: bot/exts/fun/duck_pond
class Config(smartconfig.ConfigEntry):
    ducky_thresold = 7
```and `Config.ducky_thresold` can be used like normal. But here is the cool part! Imagine I have a config file:
```yaml
# file: config.yaml
bot.exts:
  fun:
    duck_pond:
      ducky_thresold: 1
```then the constant will be overridden.

The advantage of this are:
- It is clear what constants belongs to where
- You don't have a massive and daunting config file
- You only override what you need to override
- Pulling changes isn't a mess

And more importantly, we now have easy to parse configuration classes, which will allow us to create a test server and fill up the configuration file. All of that automagically with a single command! At least that's the plan ![pithink](https://cdn.discordapp.com/emojis/652247559909277706.webp?size=128 "pithink")
#

There, so everyone can follow

#

So like here you have a small configuration entry for the duck pond cog

#

You could imagine having different entries (you could also call them units or modules) for the different parts of your app

#

Or even just have a single constants file, but you can override it out of the box

#

Anything is possible, really

gritty wind
#

I don’t think that’ll be too helpful for the other projects that use toml configs, but it seems cool for bot

cold island
#

Hmm how do the config classes help with creating a test server

green oriole
#

It is a lot easier to attach metadata saying "this should be that emoji" for instance

#

It isn't required per se, but it will be much easier to do both at the same time

vale ibex
#

Yea we could mount the whole bot folder, it just felt wrong lol

cold island
#

Honestly for dev purposes it seems the simplest and most flexible solution

vale ibex
#

we also lose the ability to rename the file, IE we can't do ```yml
volumes:
- ./metricity-config.toml:/metricity/config.toml

#

so it would need to be named config.toml or config-default.toml

cold island
#

You can rename the file in the entrypoint

#

If you're already copying stuff

vale ibex
#

wdym?

vale ibex
#

hmm

#

I wonder what cp behaviour is if the file doesn't exist

cold island
#

If you have cp then I guess you can check if the file exists?

vale ibex
#

I guess we could wrap it in ```bash
if [ -e /tmp/bot/metricity-config.toml]
then cp -f /tmp/bot/metricity-config.toml ./config.toml
fi

#

lol ye

#

it seems less effort than migrating metricity to pydantic lol

cold island
#

definitely

#

If you'd like to do it by all means lol

vale ibex
#

Yea I'm gonna do it now

#

I want this done with lmfao

cold island
#

haha

green oriole
#

Don't ask me why

vale ibex
#

lol how odd

#

I used the if statement anyway so that I could echo something conditionally

#

ok that should be it @cold island

#

I've force pushed some changes, so I'm not sure if a git pull will be fine, or if you need to git reset

#

someone with more experience of git can answer that 😄

remote wigeon
#

git pull --force should do the trick

vale ibex
#

nice

remote wigeon
#

👍

molten perch
#

Hey! Can I get a review on sir-lancebot#857 and maybe on api#16 ? 🙂

clever wraith
patent pivot
#

hmmm working for me?

#

what do you see

#

also this is for pydis projects lol, better pinging in off topic

clever wraith
#

Oop

clever wraith
#

sir-lancebot#867 needs reviews! Should be quick, it's a 7 line file 😄

dusky shoreBOT
brisk brook
#

Where is that used btw?

#

Ah, Gitpod the like online thingy?

clever wraith
#

Yeah

vale ibex
#

dance @cold island

cold island
#

Hmm our site uses django-simple-bulma, which says bulma-collapsible is available, but I can't seem to get it to work

#

Ahh, I think it's just not enabled

#

And with the extension it doesn't un-collpase

#

@crude gyro if you're available maybe it's something you're familiar with? I did see an open issue in the repo related to collapsible

crude gyro
#

@cold island make sure the extension is actually turned on in settings.py

#

there's a config dict where extensions must be added for them to be available.

cold island
#

Yeah, without the extension the card doesn't collapse, with the extension it doesn't un-collapse

green oriole
#

It would be a dict move to not add it

crude gyro
#

okay. sounds like a bug.

#

not familiar with it.

cold island
#

👍

#

I'll open an issue

stable mountainBOT
#
Bad argument

Unable to convert 'this' to valid command, tag, or Cog.

#
Command Help

!source [source_item]
Can also use: src

Display information and a GitHub link to the source code of a command, tag, or cog.

dim pelican
#

Hello github issues page
Include me in the screenshot

molten perch
#

I don't think that's a good idea, if it's not a valid Cog or tag, the bot should give some feedback about it.

#

I see, but it's not a valid Cog or tag, regardless. 🙂

austere hornet
#

Hey @vocal wolf, could you please review sir-lancebot#843 when you have a moment? I will greatly appreciate it. Thanks so much!

dusky shoreBOT
austere hornet
#

Ok, what do you suggest instead?

dim pelican
#

json?

austere hornet
#

Can you link pls?

dusky shoreBOT
austere hornet
#

Thx

#

Alr

clever wraith
#

@vocal wolf could you please re-review sir-lancebot#849

dusky shoreBOT
vocal wolf
#

@austere hornet @clever wraith I shall.

austere hornet
dim pelican
#

any recommendations for sir-lancebot#859? I tried the file preview thing with the .md and .txt file creation but that didn't work. Anything left to do for it?

dusky shoreBOT
austere hornet
#

Love the reasoning in your PR description @dim pelican lol

dim pelican
#

And copied their reasoning too

austere hornet
#

Lmao

patent pivot
#

btw this is a thing now

green oriole
#

That's coooool

#

It is lacking an image though

patent pivot
#

true, true

#

PR PR PR PR PR PR PR

green oriole
#

You know I cannot PR at that time of the day haha

patent pivot
#

true, true

green oriole
#

But with some in-line html you can do some cool stuff

patent pivot
#

yea

brazen charm
#

isn't the logo enough?

green oriole
#

!remind 10h get those swag points

stable mountainBOT
#
No problem.

Your reminder will arrive on <t:1631689679:F>!

patent pivot
#

it is sourced frommmmmm

#

uhhh

#

here

green oriole
#

I feel like having a banner would look cool

patent pivot
#

we could remove a bit of the blurb and add some action items

#

visit webpage, join discord, read contribution guides, etc

green oriole
#

Huh, it isn't python-discord/python-discord

#

Ya ya

#

Buttons would be nice too

#

Lmfao @patent pivot github just published the changeling for the org readme

#

How fast did you added one

patent pivot
#

lmfao

#

I added it weeks ago

green oriole
#

Oh really, was it not yet released back then

patent pivot
#

they had a bug where this rendered

#

on the repo

#

and i was editing policyfiles

green oriole
#

Aaaaah

brisk brook
#

One sec

austere hornet
brisk brook
#

Tl;Dr it's all about capitalization today

austere hornet
brisk brook
#

Okay that should be submitted

austere hornet
#

Thanks

#

Will have Fronto take a look

#

Lmao

patent pivot
#

lol

fallen patrol
#

lol github revealed some things in that screenshot they probably weren't supposed to

fallen patrol
#

no

#

look at it closer

#

3.0k members

#

4.9k repos

stable mountainBOT
brisk brook
remote wigeon
#

damn 1.8k teams

vale ibex
#

IE including the global check

gritty wind
#

Yeah?

vale ibex
#

I see this passes it through to the whitelist_check, which removes all the kwargs for when it hit in_whitelist_check

#

but since channels, categories and roles are all empty, that means that it'll always be denied right?

#

since the global check still applies

gritty wind
#

I don’t remember much of the code rn, I could look at it in a bit

#

It’s entirely possible I missed testing it

vale ibex
#

alr, just mentioning it since I was reviewing sir-lancebot#856

dusky shoreBOT
vale ibex
#

and saw that it's already pretty much implemented

gritty wind
#

Lol I was wondering why that issue was taking so long

green oriole
stable mountainBOT
#
Aye aye, cap'n!

Your reminder will arrive on <t:1631720996:F>!

gritty wind
#

Right, so now I remember. The idea was to allow you to block it even in the globally allowed channels

#

Not the other way around

vale ibex
#

ahhh

#

so the command can't be used anywhere?

gritty wind
#

Wording should be fixed

vale ibex
#

unless you have staff perms ofc

#

wait, no

#

since it resets roles too

gritty wind
#

Well, maybe, but I think it would allow you to add a channel that isn’t in the whitelist, and only that channel

#

Same for roles

vale ibex
#

ah yea, it resets first, then iters

gritty wind
#

So I can enable this channel, but disable OT

vale ibex
#

makes sense

#

possibly needs updating the wording then yea

gritty wind
#

Could also update it to have both behaviors

vale ibex
#

since I'm going to suggest we call the kwarg in sir-lancebot#856 bypass_all_checks rather than every

dusky shoreBOT
gritty wind
#

Would most likely be more helpful then

#

Yeah I don’t really like every 😅

vale ibex
#

same 😄

vale ibex
#

fwiw bypass_defaults isn't used anywhere rn 😦

gritty wind
#

Actually yeah never mind I’m misunderstanding the intention here

#

Yeah, this was created as mainly a util I aim to port to bot-core at some point

#

So it has some redundancies

vale ibex
#

yeaa makes sense

#

alr cool, I'll write my notes on the pr later today

gritty wind
#

Is this being implemented on the wrapper or the actual check function

#

It should probably be implemented on the wrapper to avoid unnecessary overhead

vale ibex
#

ah yea seems like it's in the check

gritty wind
#

It doesn’t seem to be?

#

Actually I know what’s happening

#

Confusing wording again lol

#

Wrapper I'm referring to is whitelist_check

vale ibex
#

yea, it's added to the in_whitelist_check

#

ahhh

gritty wind
#

check is in_whitelist_check

vale ibex
#

I was referring to the wrapper whitelist_override

gritty wind
#

We could probably add it there too using a lambda or something

vale ibex
#

I think we implement it the same as bypass_defaults is

gritty wind
#

Yeah that's probably the most reasonable

vale ibex
#

have it a a kwarg on whitelist_override and then getattr in whitelist_check

gritty wind
#

This could actually be easier solved by using the everyone role, no?

#

No actual changes to the wrapper or anything lol

vale ibex
#

yea true lol

#

267624335836053506

gritty wind
#

It also means we don't get DM invocs

vale ibex
#

@green oriole I've noticed that my bot is getting gateway events for messages even if the bot isn't in a thread

#

So doing that thread join for every new thread isn't needed

#

but could be useful to just have the bot in the member list

#

not sure how many api requests it'll end up being joining every single thread automatically

green oriole
#

Huh, that's interesting

#

I use that on Python to keep track of what new thread we logged or not

#

In term of rate limits it is impossible we reach it unless we get raided

vale ibex
#

Yea, I don't think it's an issue, just pointing it out

green oriole
#

That's good to know, yeah

cold island
#

Reviews on bot#1793? sad

dusky shoreBOT
cold island
#

Also, does someone know of an easy way to create collapsible elements on the site without bulma?

austere hornet
#

sir-lancebot#843 needs reviews as well. At this point it would be best for contrib/core dev reviews since there weren't any yet. Thanks again to @clever wraith, @dry folio, @brisk brook, @dim pelican, and @vale ibex for your reviews!! They were really helpful to me and Fronto :)

dusky shoreBOT
trail pilot
#

Also sir-lancebot#860

dusky shoreBOT
static canyon
#

@trail pilot would you like nitpicky comments as well?

#

Like # there are --> # There are (capital)

#

Just keeps your code consistent with the style of the bot

static canyon
static canyon
clever wraith
#

Hey there everyone, does anyone have a gitpod account? I'd like someone to test the .gitpod.yml

trail pilot
static canyon
trail pilot
#

Ah, it’s on Hangman?

static canyon
#

Challenges

trail pilot
#

Hm, I don’t see it

#

Maybe it’s cause I’m on my phone

static canyon
#

I may have fked up

#

Try clicking on the link to it

trail pilot
#

I see it

#

Kat said taht we should use trailing commas tho?

static canyon
#

Where? Because when I looked around lancebot there's basically none

thorny obsidian
#

Our style guidelines and PEP8

#

Trailing commas are a good practice to make sure the git blame is accurate

static canyon
#

Other than when it's making a datatype into a tuple e.g. aliases=("x",)

thorny obsidian
static canyon
#

I thought we had a thing of consistency was more important

green oriole
#

I am honestly thinking about suggesting to remove that rule because of consistency

brazen charm
#

consistency is important, but commas aren't going to make things confusing on which to choose and there is an actual non style benefit to it

thorny obsidian
#

If it's an area where it might make sense in the future to expand on it, then I think trailing commas are a good practice. Sir-Lancebot is also a learning repo so I'm hesitant about opting for consistency over good practice to make it more "consistent" because that very well could mean making things consistent with bad practice

static canyon
#

I'm not strongly against trailing commas myself, just thought we had a thing of not doing them

thorny obsidian
#

Maybe we do? But you'd have to point me to that discussion

static canyon
#

just thought we had a thing of not doing them
By this I just mean "I've seen people say to remove them"

dim pelican
#

I think its not using trailing commas in a function definition right? Since they are usually not going to add additional arguments

static canyon
#

e.g. here (this is just the first one I found)

thorny obsidian
#

Well, that makes sense because it's not correct usage of a trailing comma, if you're referring to the decorator

static canyon
#

Well then what defines as "correct usage"?

thorny obsidian
#

Having a trailing comma on a single line does nothing to help with git blame. The trailing comma is used when you split it up on multiple lines, because adding an element will only assign you the blame for the single line you changed, not the line previous as well (when you have to add a comma)

static canyon
#

So do you always add a trailing comma when it's over multiple lines, or would you leave it out p.e. in a function defintion since you're unlikely to get extra added arguments (what brad asked above)

thorny obsidian
#

When trailing commas are redundant, they are often helpful when a version control system is used, when a list of values, arguments or imported items is expected to be extended over time.

dim pelican
static canyon
#

is expected to be extended over time.
So if it's not expected to be extended (like a function definition), it shouldn't have a trailing comma

thorny obsidian
#

For instance, let me pull an example from our AoC cog

brazen charm
#

There's nothing to lose if the comma is included, and even if you don't expect it at the time of writing, functions are commonly extended

static canyon
#

I think in the case of this PR it makes sense for the list of valid languages, since that will change as codewars add more languages

#

But it doesn't make sense in the function definition because that won't change

thorny obsidian
#

The function definition is a single line, no?

stable mountainBOT
#

bot/exts/events/advent_of_code/_cog.py lines 167 to 172

info_str = [
    "To join our leaderboard, follow these steps:",
    "• Log in on https://adventofcode.com",
    "• Head over to https://adventofcode.com/leaderboard/private",
    f"• Use this code `​{join_code}`​ to join the Python Discord leaderboard!",
]```
static canyon
thorny obsidian
#

aaaah, okay

static canyon
thorny obsidian
#

But I'm also with Numerlor in that it doesn't hurt much. So if it's there I'd leave it. If it's not *shrug*

static canyon
#

I think if we're going to have a "rule" we should stick to it

#

If it's likely to be changed (or is being used to make a tuple), including a trailing comma, otherwise don't

thorny obsidian
#

Now, where the bike shedding enters: how do we determine likely?

dim pelican
#

Add black to the ci and try to survive?

static canyon
thorny obsidian
#

But I don't have a horse in this race, I just like trailing commas and will generally advocate for them where they make sense~

static canyon
#

will generally advocate for them where they make sense
Do you think it makes sense here?py def __init__( self, language_embed: Embed, tags_embed: Embed, other_info_embed: Embed, main_embed: Embed, ): ...

#

I'm assuming that wouldn't classify as a "logical" place to have it

static canyon
dusky shoreBOT
thorny obsidian
#

spray you keep mypy out of lancebot

static canyon
#

lol

dim pelican
#

I haven't used mypy very much, is it a general formatter?

thorny obsidian
#

ooooh... hurmmm...
Okay, this is for the Information Dropdown, which I can imagine being changed if we want to add other embeds / more info in the future

thorny obsidian
static canyon
thorny obsidian
#

give me true dynamic typing or give me death (not really, I just think mypy would be worse for 1st time contribs and lance is aimed for 1st time contribs it's not appropraite)

brazen charm
static canyon
#

I mean I don't think of it as adding a commit to reverse because I'd just squash it but yeah, I do agree

thorny obsidian
#

In that specific case of __init__, I can imagine that changing in the future since it's adding new/more embeds to the dropdown

static canyon
#

I mean yeah, I guess I can see that potentially happening

#
SelectOption(
    label="Main Information",
    description="See the kata's difficulty, description, etc.",
    emoji='🌎',
),```you wouldn't add a field to these though(?)
#

Yeah, doesn't look like it

clever wraith
#

Hey @brisk brook, I'll add the log.error after school. GitHub mobile is having a bad time at the moment so I'm responding here

brisk brook
brisk brook
remote wigeon
brisk brook
#

Pyright is better imo

dim pelican
#

Hmmm. What are the choices for type checkers? I guess I should do my own research but curious what the people think in this channel

brisk brook
#

Pyre, Pyright and Mypy

#

You can also use Cython, but that requires cythonizing your code

patent pivot
#

@thorny obsidian do we have plans to revert code jam on frontpage?

thorny obsidian
#

No because it totally slipped my mind. Will make a PR for it today

patent pivot
#

👍

clever wraith
brisk brook
#

That's not a static type checker

#

It enforces types at runtime

#

Not statically, that's the difference 😉

clever wraith
#

Ah

surreal venture
#

Wait now that discord has released replies and threads, would it be a good idea to change spooknamerate game to use threads?

#

sir-lancebot#509

dusky shoreBOT
surreal venture
#

Now I realise that it is in serious need of updating

stable mountainBOT
thorny obsidian
surreal venture
#

alr

dim pelican
#

Here to learn forms

thorny obsidian
#

So! Forms! I'd like to use forms for our upcoming esoteric challenges (cc: @placid ermine) and also get the full functionality for future code jams.

placid ermine
#

i will watch your progress with great interest

thorny obsidian
#

@gritty wind is our fearless leader for forms, but joe and Akarys also help out a bunch. I think we may have conned Blue into helping as well.

dim pelican
#

Interesting. I must say that I would be starting at 0% for TypeScript as well as Web Apps in general

thorny obsidian
#

I will also be starting at 0% as well, but I do plan on contributing to forms :D
But I believe we have a few issues to conquer regarding forms which should be ... fun? definitely intersting

dim pelican
#

Sounds a lot like my manager saying "We have a great opportunity for you"

gritty wind
#

Hey hey brad - you may be currently unable to contribute because the issue board and setup guides aren’t public yet (it’s on my agenda I swear), but in the mean time, it’s probably best to get familiarized with TS and react from a basics perspective

dim pelican
#

I do agree with that statement lol

gritty wind
#

The contributing guide may be public, my memory is not 100%

thorny obsidian
#

But looking to future contribution stuff, forms is going to be a top priority for me in the coming months

dim pelican
#

Sounds pretty neat, looks like I have a good bit of projects to learn with! Besides sir-lancebot I'm trying to help out the catcord peeps, and now forms

thorny obsidian
gritty wind
#

!remind 23H Forms stuff ^

stable mountainBOT
#
No problem.

Your reminder will arrive on <t:1631804537:F>!

gritty wind
#

Thanks Kat

#

I’ll get back to you soon

molten perch
#

Now that you're talking about projects, may I ask what's the situation of the API migration? 🙂

gritty wind
#

I think that’s been a little slow because Ves was busy with real life (that makes two of us!)

#

But I’m not too sure

thorny obsidian
#

I honestly don't know. Uhhhh @last patio and @hardy gorge would know iirc

remote wigeon
#

if you need help with frontend dev i can help as well

gritty wind
#

I’ll be making the entire repo public eventually, probably will put out a call to action then

#

Err, the repo is actually public, issues are not

thorny obsidian
#

(I think I'll be helping Scale do some of the converting)

hardy gorge
#

I've unassigned myself from the one ticket on API I was assigned to, but if no one else has taken it in the mean time, I'm going to work on it again this weekend

molten perch
hardy gorge
#

We can probably configure it with only the declarative base of SQLAlchemy, although that is not very useful in itself

#

I'll see if I can run the codegen for the models this weekend

#

Although I guess anyone with the Django site setup could do it

surreal venture
#

Also, would it be a good idea to migrate the pagination to use the new buttons feature instead of reactions?

molten perch
hardy gorge
#

It will probably generate some bare Table definitions instead of Models as well

#

I'll approve the issue; I think it's an approach worth trying

gritty wind
#

Lmfao

#

Soon™️

#

Tomorrow’s the weekend, I’ll hopefully do a large push

sour viper
#

? Isn't tomorrow Thursday ?

dim pelican
#

Yes, unless you are 12 hours ahead and it is already Thursday

#

Or their weekend is Thursday lol

sour viper
#

I would joke that this isn't true and earth is flat and time is same everywhere, but people may actually take it seriously

molten perch
gritty wind
fallen patrol
thorny obsidian
#

The repos have always been public, we're working to migrate the guides & issues to the repos

austere hornet
thorny obsidian
#

we're working on making it open for contributions from non-staff

#

Because it was an internal project and we didn't see a need to at the start when it was first getting off the ground.

celest charm
#

sorry, I reread your message and understand the point

#

If we don't want beginners to care about the type hinting, why do the linting rules require type hints on all public functions? Beginners will (and do) use the wrong type hints, which will hurt readability, not assist. So maybe we drop this requirement from lancebot?

thorny obsidian
#

Well, d.py actually uses type hints for conversions, right?

celest charm
#

for that, yes

#

but not all functions are d.py handlers

thorny obsidian
#

True, I'd be fine with not type hinting all public functions. But that's going to be a core dev and admin decision.