#dev-contrib

1 messages · Page 66 of 1

green mesa
#

now will i push changes?

nocturne hare
#

I might ask a lot but can you format the dates?

#

To just something like 20. Jan - 18. Feb etc

#

Or rather January 20 - February 18 maybe

#

¯_(ツ)_/¯

green mesa
#

Ok let me try😅😂

nocturne hare
#

Probably worth making a static helper function for that if you dont already have it, that takes the zodiac object, and created the from - to string

green mesa
#

Hmmm

nocturne hare
#

Do you have an idea how to approach it?

green mesa
#

Yes

#

First I will break the str with -

#

Or I will do %d-%m-%y

#

And then I will convert that to string

nocturne hare
#

they're already datetimes right?

#

so format strings should work

green mesa
#

Yeh

nocturne hare
#

%B %d should be good

#

you don't need to include year, as its not year related

green mesa
#

Ok

stable mountainBOT
#

@obsidian patio

It has arrived!

Here's your reminder: Review PR above /\.
[Jump back to when you created the reminder](#dev-contrib message)

nocturne hare
#

Might need to make an edge case for the dec to jan one?

obsidian patio
#

Right

#

!remind 2h Review PR

stable mountainBOT
#
Of course!

Your reminder will arrive in 2 hours and will mention 0 other(s)!

green mesa
#

Yes only that's the problem

#

It will show Jan to Dec😅

nocturne hare
#

wait, will it?

green mesa
#

Let me try

nocturne hare
#

it should show December 22 - January 19

#

so that should work

green mesa
#

Yeh this only

nocturne hare
#

!e py from datetime import datetime print(f"{datetime(2020,12,22):%B %d} - {datetime(2021,1,19):%B %d}")

stable mountainBOT
#

@nocturne hare :white_check_mark: Your eval job has completed with return code 0.

December 22 - January 19
nocturne hare
#

Ye that should be fine

#

So you dont even need a helper method

#

just do that^

green mesa
#

Ok tnx

#

Now pushing changes

nocturne hare
#

May i also suggest making the numbers same size? either by 0 prefixing or doing `{i:>2}`

green mesa
#

Ok

nocturne hare
#

That looks a bit messy

#

tbh

#

What about py f"`{i:>2}` **{name}**: {zodiac['start_at']:%B %d} - {zodiac['end_at']:%B %d}"

#

Maybe italic the dates

#

@green mesa

green mesa
#

Ok

#

@nocturne hare

nocturne hare
#

I don't really like the codeblocked dates

#

Makes my eyes jump around the embed instead of going left to right, or down with the names

green mesa
#

hmm

nocturne hare
#

Since they're not aligned, and they should'n't be, it's hard to make black boxes in text look good

#

is my opinion. Just hvave it be either normal text, or all of the from-to dates be italic to draw less attention to it

#

idk what would look best as i can't visualize it

#

The names is the main focus, to show what you can use. The dates is like a bonus & filler for the embed to not look huge and still empty.

green mesa
nocturne hare
#

uuuuuuh

#

That's way too big for an error message

green mesa
#

Ok let me try something different

nocturne hare
#

what about just f"`{i:>2}` **{name}**: {zodiac['start_at']:%B %d} - {zodiac['end_at']:%B %d}" ..?

green mesa
nocturne hare
#

Else you could just shorten the whole thing by doing py these are available: + ", ".join(names)

#

Is that bold: normal?

green mesa
nocturne hare
#

!embed 1 Text hello world
2 Text hello world

stable mountainBOT
#

1 Text hello world
2 Text hello world

green mesa
#

Else you could just shorten the whole thing by doing
these are available: + ", ".join(names)
I think I like this idea

nocturne hare
#

Try it

green mesa
#

Ok

nocturne hare
#

imma switch pc, so i can give it a core dev review as well

green mesa
#

Ty

stable mountainBOT
#

@obsidian patio

It has arrived!

Here's your reminder: Review PR /\.
[Jump back to when you created the reminder](#dev-contrib message)

green mesa
#

@nocturne hare

surreal gulch
nocturne hare
#

can you line break it after leo?

green mesa
#

let me try

nocturne hare
#

@surreal gulch Seems good to me? If not you can just move it afterwards in review

surreal gulch
#

ok

green mesa
#

With list comprehension it looks like this

#

@nocturne hare

ruby pulsar
green mesa
stable mountainBOT
#

@obsidian patio

It has arrived!

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

nocturne hare
#

@green mesa looks alright imo

green mesa
#

Changing code rn😅

nocturne hare
#

@green mesa Commiting suggestions in general is kinda bad practice. Just as a headsup

#

You wont see the syntax highlighting, be able to run it, test it, or run it through any local pipelines

green mesa
#

I don't know how to run suggestion

#

In vsc how I can test?

nocturne hare
#

I'm unfamiliar with that seasonalbot has, but in general you should see the code in your editor, and preferable run it as well before commit it

#

Just like you've been doing outside of commiting github suggestions before

green mesa
#

Ok

green mesa
#

@nocturne hare now u can check the pr

nocturne hare
#

I'm bissi till tomorrow, sorry

surreal gulch
#

Where am I supposed to run pipenv lock and pipenv run lint?

subtle kraken
#

iirc, you dont have to use lock unless you have changed the dependencies, lint should be used before you commit/pr anything @surreal gulch

green mesa
#

Np take your time Chibli

surreal gulch
#

When I try to run pipenv run lint I get 'pre-commit' is not recognized as an internal or external command, operable program or batch file.

vocal wolf
#

have you ran pipenv run precommit?

surreal gulch
#

no not yet

#

I just tried @vocal wolf

#

same error

vocal wolf
#

which repo are you trying to run?

surreal gulch
#

I am running my fork of the seasonal bot

#

so I can make pull request

vocal wolf
#

alright

#

have you modified Pipfile in any way?

surreal gulch
#
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
aiodns = "~=2.0"
arrow = "~=0.14"
beautifulsoup4 = "~=4.8"
fuzzywuzzy = "~=0.17"
pillow = "~=7.2"
pytz = "~=2019.2"
sentry-sdk = "~=0.14.2"
PyYAML = "~=5.3.1"
"discord.py" = {extras = ["voice"], version = "~=1.4.1"}

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

[requires]
python_version = "3.8"

[scripts]
start = "python -m bot"
lint = "pre-commit run --all-files"
precommit = "pre-commit install"
#

I don't think so

vocal wolf
#

yeah doesn't look like it

#

pipenv sync --dev

#

then pipenv run precommit

surreal gulch
#

ok

#

Installing dependencies from Pipfile.lock...

vocal wolf
#

yep

#

may take a little, these are relatively heavy libraries.

surreal gulch
#

All dependencies are now up-to-date!

#

pre-commit installed at .git\hooks\pre-commit

#

im running pipenv run lint now

#

I think it's wokring

#

this is for the checks?

vocal wolf
#

ye

surreal gulch
#

wow it checks styling?

#

should I make the changes and run it again?

vocal wolf
#

yeah make the linting changes and then when it doesn't error out at all you're good to go

surreal gulch
#

cool

#

thanks for the help

vocal wolf
#

np

neon garnet
#

.issue bot 1197

#

.issue 1197 bot

neon garnet
#

If anyone's free this'll be up for review

ruby pulsar
#

@obsidian patio what do you think? I saw comments like this on a few other commands so I added it too, but my thing already has quite a few comments like you pointed out 😅

short snow
#

well it is nice if you add comments

#

it lets others know about the code, and makes it easy to understand the code

obsidian patio
#

From the next lines, it’s obvious that you’re building an embed

#

According to PEP 8, you should try to use inline comments sparingly

#

They clutter things up when they explain the obvious

short snow
#

well that comment isn;t necessary tho, since it is clear from the next line

ruby pulsar
#

Okay then, thanks!

obsidian patio
#

@ruby pulsar have a look through the code and see where you’re explaining the obvious. More often then not in these scenarios, it’s better to improve variable names and similar, though

ruby pulsar
#

Ahh alright

obsidian patio
#

Perfect

green oriole
#

Hey @cold moon, it seems like you aren't assigned on the issues linked in https://github.com/python-discord/bot/pull/1016, although I can't assign you because you apparently never interacted with those, can you add a comment on them please?

nocturne hare
#

.pr 414

green mesa
neon garnet
#

Looks nice!

green mesa
#

now only one condition i need to handle for none

neon garnet
#

Thinking about it, what would it look like if the emojis are on the left hand side?

#

I feel like it'd look more symmetrical that way

green mesa
#

ok

#

let me change

#

yeh now its symmetric

neon garnet
#

Cool cool, maybe you could reword it to "There are 2 emoji in the et category"

green mesa
neon garnet
#

Right, you could also remove the code block for the number I guess

green mesa
#

async def ec(self, ctx, *emoji: str = None):
y this is invalid syntax

neon phoenix
#

@green mesa the star

#

if you want it to be a list or none use emoji: typing.Optional[typing.Sequence[str]]

green mesa
#

tnx

#

@neon phoenix i have to remove star?

neon phoenix
#

yeah of course

green mesa
#

ok

#

@neon phoenix now its not accepting any value

neon phoenix
#

What do you mean?

#

Send code

green mesa
#
    async def ec(self, ctx, emoji: typing.Optional[typing.Sequence[str]]):```
neon phoenix
#

huh weird

#

did you try to print the type of emoji?

#

print(type(emoji))

green mesa
#

<class 'NoneType'>

neon phoenix
#

huh

green oriole
#

Well, you made it optional

#

ctx needs to be typehinted, doesn't it ?

neon phoenix
#

async def ec(self, ctx, *emoji: str = None):
y this is invalid syntax

#

he wanted it to be also none if nothing is specified, and that's why I told him to use optional

green oriole
#

So the emoji is passed in ctx because it isn't typehinted, isn't it?

green mesa
#

fixed

#

async def ec(self, ctx, *, emoji: str = None):

#

this fixed the issue

neon phoenix
#

but now emoji is just a string, ignoring the whitespace :|

#

you'd want to split it later

rapid igloo
#

@green mesa i think there are x emoji in the **x** category (with the) might make it more grammatically correct

green mesa
#

ok

#

@neon phoenix i use to think same

#

but thats not happening

#

if i give multiple category it splits automatically

green mesa
#

@green oriole i have installed pre-commit but pre-commit didnt told me anything

#

but when i pushed my changes it failed

green oriole
#

Mhm

#

Well, can you run pipenv run lint before opening a PR then?

green mesa
#

then it lint the all folder not just which i updated

#

but when i commit it runs the pre-commit hook

#

but dont know how it passed

#

now i have pushed the changes and pr is ready for review

obsidian patio
#

I think the returned reminders embed makes it a bit hard to read the message

stable mountainBOT
#
No problem.

Your reminder will arrive in 1 second and will mention 0 other(s)!

#

@obsidian patio

It has arrived!

Here's your reminder: Here's some sample text to remember!.
[Jump back to when you created the reminder](#dev-contrib message)

obsidian patio
#

Especially on mobile

green mesa
#

discord mobile is buggy lol

obsidian patio
#

It is

green mesa
#

and specially android

obsidian patio
#

I guess

#

🕐 It has arrived!
Here's your reminder: ```
Here's some sample text to remember!.

#

I think doing it like this, with it in a multi line code block may make a bit more sense

green mesa
#

hmm 👍

obsidian patio
#

Any more opinions on this?

#

@green oriole

green mesa
#

locally i get this earlier

Check Yaml...........................................(no files to check)Skipped
Fix End of Files.........................................................Passed
Mixed line ending........................................................Passed
Trim Trailing Whitespace.................................................Passed
check blanket noqa.......................................................Passed
Flake8...................................................................Passed

when my hook failed before i pushed lol

obsidian patio
#

Have you set up a precommit hook?

green mesa
#

yup

#

it popped error for annotation missing at class method

#

but didnt raise error for ctx

brazen charm
#

Did you install all the dev packages?

green mesa
#

yeh

brazen charm
#

do flake8 --version

green oriole
#

@obsidian patio sounds good to me

green mesa
#

ok

#
pycodestyle: 2.6.0, pyflakes: 2.2.0) CPython 3.7.7 on Windows```
#

@brazen charm

green oriole
#

Try again with pipenv run flake8 --version

#

You are hitting your global install, most probably

obsidian patio
#

I'll open a PR about it. Minor enough that it probably doesn't even need an issue

green oriole
#

Yeah, no needs for one

green mesa
#
3.8.3 (flake8-annotations: 2.3.0, flake8-bugbear: 20.1.4, flake8-docstrings: 1.5.0, pydocstyle: 5.0.2, flake8-string-format: 0.3.0, flake8-tidy-imports:      
4.1.0, flake8-todo: 0.7, import-order: 0.18.1, mccabe: 0.6.1, naming: 0.11.1, pycodestyle: 2.6.0, pyflakes: 2.2.0) CPython 3.8.0 on Windows```
#

this i got

green oriole
#

Looks like our setup

#

Do you have a file at .git/hooks/precommit?

green mesa
#

yeh

green oriole
#

What does it contains?

green mesa
#

not showing

#

when i try to search

green oriole
#

Okay, precommit isn’t installed then

#

you need to run pipenv run precommit again

green mesa
#
#!/usr/bin/env python.exe
# File generated by pre-commit: https://pre-commit.com
# ID: 138fd403232d2ddd5efb44317e38bf03
import os
import sys

# we try our best, but the shebang of this script is difficult to determine:
# - macos doesn't ship with python3
# - windows executables are almost always `python.exe`
# therefore we continue to support python2 for this small script
if sys.version_info < (3, 3):
    from distutils.spawn import find_executable as which
else:
    from shutil import which

# work around https://github.com/Homebrew/homebrew-core/issues/30445
os.environ.pop('__PYVENV_LAUNCHER__', None)

# start templated
INSTALL_PYTHON = 'c:\\users\\hp\\.virtualenvs\\seasonalbot-d0oxspsl\\scripts\\python.exe'
ARGS = ['hook-impl', '--config=.pre-commit-config.yaml', '--hook-type=pre-commit']
# end templated
ARGS.extend(('--hook-dir', os.path.realpath(os.path.dirname(__file__))))
ARGS.append('--')
ARGS.extend(sys.argv[1:])

DNE = '`pre-commit` not found.  Did you forget to activate your virtualenv?'
if os.access(INSTALL_PYTHON, os.X_OK):
    CMD = [INSTALL_PYTHON, '-mpre_commit']
elif which('pre-commit'):
    CMD = ['pre-commit']
else:
    raise SystemExit(DNE)

CMD.extend(ARGS)
if sys.platform == 'win32':  # https://bugs.python.org/issue19124
    import subprocess

    if sys.version_info < (3, 7):  # https://bugs.python.org/issue25942
        raise SystemExit(subprocess.Popen(CMD).wait())
    else:
        raise SystemExit(subprocess.call(CMD))
else:
    os.execvp(CMD[0], CMD)
nocturne hare
#

@green mesa i meant that link aswell

#

everything github would be constants/variables

green oriole
#

Sorry anubhav I forgot to anwser, yes, the precommit is now installed

green mesa
#

ok tnx

#

github link right of seasonal bot?

#

!src

stable mountainBOT
green mesa
#

like this

#

?

subtle kraken
#

What Chibs meant is to use variable for the link instead of hardcoding it
E.g. of what you do

foo = "abcd/efgh"
bar = "abcd/11000"
baz = "abcd/39iik"

Meaning if we ever wanted to change the abcd to something else, we'd have to change it 3 times in 3 different places as opposed to

base = "abcd"
foo = f"{base}/efgh"
...```
In the 2nd case you'd only change the `abcd` once in one place and it would take the effect in all places it is used
green mesa
#

ohk

#

i have made var of github_avatar_url and github_url

#

changes pushed senjan now u can review pr

green oriole
#

Hey @surreal gulch, can you try to commit from this command line just this time to see if github desktop is faulty or not?

surreal gulch
#

ok

#

I think that's it

#

how should I do that?

nocturne hare
#

@surreal gulch you dont need to put the embeds in a list, unless you dont care about searching for some.

#

for the json i mean

surreal gulch
#

yeah I working on some of the reviews thomaspet left me

green mesa
#

actually he is thomaspet

nocturne hare
#

that would be me

surreal gulch
#

haha

green oriole
#

You need a shell in the bot folder, and enter git commit -am "<commit message goes here>"

green mesa
#

am?

green oriole
#

Your real name isn’t “floppy”, family name “fish sauce”? 😮

#

am?
@green mesa a is stage all files, m supply the commit message with the next argument

#

Also, -a -m can just be -am

green mesa
#

ok tnx btw can u review my pr 😄

surreal gulch
#

it told me flake8 failed again

glass pecan
#

i wouldn't recommend suggesting -a to people who aren't sure about git yet

surreal gulch
#

even though pipenv run lint works

glass pecan
#

instead i'd suggest using the staging workflow

green oriole
#

Yeah, I expected it to fail anyway

surreal gulch
#

Should I do something about Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning. 'flake8' is not recognized as an internal or external command, operable program or batch file.

green oriole
#

You need PIPENV_IGNORE_VIRTUALENVS=1 I think

surreal gulch
#

ok

#

in which file?

green oriole
#

I’m not sure about the proper way to set it on windows though, if anyone here knows

#

As an environment variable

surreal gulch
#

oh I can do environ vars

green oriole
#

Okay well

#

You might need to restart github desktop after that

surreal gulch
#

ok

obsidian patio
#

@ruby pulsar after you’ve marked my comments as resolved, I’ll go over it for a second review

hardy gorge
#

You don't need to set that environment variable

#

It's just to suppress that warning

#

Basically, this happens when you use a pipenv run command, which you'd normally use when you've not activated the venv

#

However, if you have an activated venv, pipenv detects that and will respect that (not try to active its own venv)

green mesa
#

looking forward to work on this issue nxt

#

.issue 127

green mesa
#

how i need to approach this

#

i meant why its called love poem genrator

tough imp
#

It would probably be a good idea to look at the linked PR and review the comments there

#

a good solution will take all that feedback into account

#

also please make sure that you're familiar with what a Markov chain is

green mesa
#

Ok

subtle kraken
#

I'd also recommend finishing the PR's you already have started rather than taking issue after issue while PR's still require changes

cold moon
#

I have to find issues for Hacktoberfest

#

I hoped I can do Dewikification, but my 2 current dewikification PRs block my work

subtle kraken
#

are they ready to be reviewed?

cold moon
#

Yes

subtle kraken
#

I can look into them over the weekend

cold moon
#

OK

subtle kraken
#

!remind 18h ^

stable mountainBOT
#
No problem.

Your reminder will arrive in 18 hours and will mention 0 other(s)!

cold moon
#

Just my idea for one issue is displaying resources

#

But I need YAML dependency from guides PR and resources app from resources home PR

green mesa
#

I'd also recommend finishing the PR's you already have started rather than taking issue after issue while PR's still require changes
Waiting for review 😔

subtle kraken
#

@cold moon could you maybe resolve the conflict on 860 (bot) ?
I'd like to review it and merge it soon~ish

tawdry vapor
#

I'm just gonna fix it myself

green mesa
#

@subtle kraken this is what it gives

subtle kraken
#

suppose this can do

green mesa
#

I have made these changes and pushed to GitHub

#

Already

subtle kraken
#

think it looks good

green mesa
#

These changes are pushed to GitHub already

subtle kraken
#

thanks @green mesa

green mesa
#

🙂 happy to contribute

neon garnet
#

Shouldn't the thumbnail be the white on black logo?

green mesa
#

It matters 😅

#

!source wolfram

stable mountainBOT
#
Bad argument

Unable to convert 'wolfram' 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.

subtle kraken
#

!src ban

stable mountainBOT
#
Command: ban

Permanently ban a user for the given reason and stop watching them with Big Brother.

Source Code
green mesa
#

Oops

subtle kraken
#

its not here

green mesa
#

!source

stable mountainBOT
green mesa
#

Only this shows the thumbnail

subtle kraken
#

might want to change it I suppose

green mesa
#

Will I change thumbnail?

subtle kraken
#

white does seem bit out of place

green mesa
#

Ok

subtle kraken
#

other than that it looks good for me

green mesa
#

Only one var need to change for changing thumbnail , tnx to chibli

#

😁

green oriole
#

I think we should use the org icon to be honest

#

Great work so far btw

green mesa
cold moon
#

@subtle kraken Sorry, I was walking with my dog.

subtle kraken
#

no worries, mark got it

#

it all looks solid

#

just waiting if someone also can look at it had I missed something, but I doubt anything is wrong with it

#

I should also review 836 this week if I don't forget @cold moon

cold moon
#

OK, just I'm unable to get this 1 percent. There is one loop that I don't know how to cover.

subtle kraken
#

unit tests for things that aren't very important (core/api/moderation) don't matter too much so while unit tests are welcome, we won't require them

cold moon
#

.issue 397 site

cold moon
#

So this should just ensure in /docker-entrypoint-initdb.d that database and table exists?

eternal owl
ruby pulsar
#

@ruby pulsar after you’ve marked my comments as resolved, I’ll go over it for a second review
@obsidian patio I've already marked them

obsidian patio
#

Perfect

surreal gulch
#

@nocturne hare when you said convert to embed on the fly does that mean also load the json then too, or keep that in memory?

nocturne hare
#

Keep that in memory

#

and i mean.. you can keep the embeds in memory too

#

I just didn't like the kind of parses it did by converting json to some other json just to use Embed.From_dict

#

Embeds have more readable methods to build embeds, or have the finished json format already written in the file

surreal gulch
#

so in the json have them ready to be put into Embed.from_dict?

nocturne hare
#

Yeh

surreal gulch
#

got it

nocturne hare
#
json_embeds = json.load(file)
for key, embed_json in embeds.items():
  self.embeds[key] = Embed.from_dict(embed_json)```
#

That way you can create a look up function as well, if we want to show off a specific save the world embed

surreal gulch
#

gotcha

#

ok

obsidian patio
#

@ruby pulsar something to keep in mind in the future: try to make commits “atomic”. Here’s a message from Ves about what that really means

ruby pulsar
#

TIL, noted!

obsidian patio
#

There’s also the art of writing great commit messages. “Fix a bug” or “Add stuff” aren’t really good messages. “Fix issue where user ID wasn’t shown” and “add user class” are generally better and more specific messages. This also has to do with making the commits atomic, so message will have a single, clear focus

#

This just takes time and practice

lime mural
#

is it okay to ask about the bot here? more specifically how does the !docs command work? does it read the docstring of the item?

obsidian patio
#

!source docs

stable mountainBOT
#
Command: docs

Lookup documentation for Python symbols.

Source Code
obsidian patio
#

This is exactly what how the docs command works

lime mural
#

ok I'll take a look thanks

#

what if you had to give a tldr

obsidian patio
#

I don’t know how it works myself

lime mural
#

oh okayy

brazen charm
#

The docs use inventory files provided by libraries to map symbols to their places in the documentation pages, the relevant part of the page is then parsed and sent as the result

lime mural
#

okay, which docs are included in it?

brazen charm
#

You can check the current inventories with !d

lime mural
#

ohh okay

#

okay I was trying Django docs specifically

#

!docs django.contrib.humanize.intcomma

#

returns nothing 🤔

brazen charm
#

They named the symbol intcomma, probably because it's not a direct python name

ruby pulsar
#

There’s also the art of writing great commit messages. “Fix a bug” or “Add stuff” aren’t really good messages. “Fix issue where user ID wasn’t shown” and “add user class” are generally better and more specific messages. This also has to do with making the commits atomic, so message will have a single, clear focus
@obsidian patio okay, be more specific, got it!

obsidian patio
#

Yep! Or be more “atomic” hahah

obsidian patio
#

@ruby pulsar I think this is my last review before I approve 😄 It's looking good

green mesa
#

y this is happening

#

!d

stable mountainBOT
green mesa
#

!d aiohttp

stable mountainBOT
#

Common data structures used by aiohttp internally.

green mesa
#

When I search !d django it retruns none?

#

But other works

#

Same for discordpy also

#

And same for others

brazen charm
#

Doesn't really seem to be worth the special case to me, maybe more info in the listing

#

Django should be a symbol so not sure what's going on there, maybe loaded behind something else; or a bug

green mesa
#

Hmmm

neon garnet
#

Re: infraction append @tawdry vapor
I guess I could also change the parameter name although I'm not quite sure what to do about changing the publicly available interface

tawdry vapor
#

Yeah it's weird in the code if it's named infraction_id but is a dictionary

#

Renaming it to infraction is the best move IMO

#

Still fairly clear what the argument should be to users

#

If you want to be safe you can amend the docstring slightly to clarify it should be an ID

#

e.g. "Append text and/or edit the duration of an infraction given its ID"

neon garnet
#

Alright, will push changes later

green mesa
#

.issue 455 Got two review approved

dusky shoreBOT
#

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

green mesa
#

.issue 455

dusky shoreBOT
green mesa
#

Got two review approved waiting for it to get merged UwU

#

.issue 469

dusky shoreBOT
green mesa
#

Apart from thumbnail what I need to change ,need 1 more review to pass

#

.issue 473

dusky shoreBOT
green mesa
#

Need review on this

green mesa
#

tnx ks for approving

#

source cmd avatar_url changed and changes pushed to github

rapid igloo
#

hi im currently setting up my test server for seasonal bot and i used the template link from the pins. in the tutorial it says it needs the channel dev-log ID, i could only find a channel dev-logs under development category. Is the channel supposed to be that, or do I create a new one called dev-log?

#

nvm i made my own

green oriole
#

You could have used dev-logs, that's not an issue

green mesa
#

@green oriole partnerzodiac and source command have 2 successful check ,can u have a look at it too ,if it looks ok can u press the magic button 😄

green oriole
#

I'm not home, but I'll have a look later, sure

green mesa
#

ty

#

np take your time buddy

green oriole
#

!remind 6h30M anub's PRs

stable mountainBOT
#
Affirmative!

Your reminder will arrive in 6 hours and 30 minutes!

green mesa
#

@cold moon i have pushed the changes, i am pinging u here bcz i am not able to request review at githublemon_sweat

lime mural
#

bro wrong channel

stable mountainBOT
#

@subtle kraken

It has arrived!

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

patent pivot
cold moon
#

About this logging cleanup PR, is possible to get this merged before end of October because I hope this can be part of Hacktoberfest

patent pivot
#

@cold moon yep, I can get that done for you

#

if we don't get it merged I'll add the label for you 👍

#

it shouldn't be a huge review anyway

#

just validate that the things that need to go are gone

green oriole
#

Damn this merge ninja

patent pivot
#

lul

#

I'm excited!

#

I always get excited when I write prod features

subtle kraken
#

!relay when joe

patent pivot
#

lol

#

@sullen phoenix

#

make him do it

#

i can't be bothered

subtle kraken
#

Lol

cold moon
#

Thanks

green mesa
#

Seasonal bot pr will be counted for hactoberfest?

cold moon
#

Yes, all PRs opened in October, that get approved and is in not blacklisted repo count

green mesa
#

Ok tnx

patent pivot
#

@cold moon they changed it slightly

#

however, I have added hacktoberfest to bot, site and seasonalbot (while we are not encouraging contribution en masse, since that burns out our reviewers, we do want to reward contribs)

#

and if you want your PR to count and it doesn't get merged or approved then ping me and I will add the accepted label

green mesa
#

I have 2 pr waiting for merge can u add those 😁

#

.issue 469

dusky shoreBOT
green mesa
#

.issue 473

dusky shoreBOT
patent pivot
#

done @green mesa

green mesa
#

Tnx joe😁

eternal owl
#

however, I have added hacktoberfest to bot, site and seasonalbot (while we are not encouraging contribution en masse, since that burns out our reviewers, we do want to reward contribs)
i have 3 PRs open, but none of them opened in october, lol

cold moon
#

@patent pivot About this Machine Learning what we talked yesterday, maybe you can submit this to other staff too in next staff meeting, because I really think analysing moderators actions and then later AI that suggest actions to moderators should be nice. And maybe even make this learning from help channels. But I think biggest thing on it is how to make this data so anonymous how is possible, but how this still have good data to analyse.

patent pivot
#

lol i forgot to reply to this i had thought about it and everything

#

sooooo

#

I think it's a very long-term project

brazen charm
patent pivot
#

anonymity is not my top concern providing we have very easy methods to opt out and we open source as much as we can (generated models probably won't be open sourced because message contents n' shtuff)

#

I'll have a think about it, but it is a very long-term thing

hardy gorge
#

@brazen charm Not that I know of, I'll have a look

#

@brazen charm I've changed it, but it appears that it has been this way for a while

#

It's now using the stable links, which will currently autoredirect to 3.1

brazen charm
#

Was just confused why looking up django didn't work and the link seemed to be the missing slash

hardy gorge
#

Does it work now?

brazen charm
#

yep

#

My local db that I built from a dump that joe gave me a while ago had the stable link

hardy gorge
#

Alright. It's now picking the "stable" version automatically, so that's better as well

#

Interesting

#

Not sure when or how that got changed then

#

It must have happened manually, because I did use the "stable" one when I set up django

lime mural
#

fire did it yesterday i think

#

because it wasn't working previously either

#

#bot-commands message

green mesa
#

I tried today it was not working 6-7 hrs before

hardy gorge
#

right, he used the shortcut commands

#

I think something went wrong with fetching the inventory when the bot started

#

and it was not necessarily related to having the wrong settings

green mesa
#

👍

hardy gorge
#

Although

#

It seems to have been working before his change. What exactly didn't work?

lime mural
#

Wait

#

#bot-commands message

hardy gorge
#

That's just how it works

#

It tries to look for the "django" symbol and finds an install page within the django docs

#

!docs flask

stable mountainBOT
#

This appears to be a generic page not tied to a specific symbol.

hardy gorge
#

This does more or less the same

brazen charm
#

Afaik it's just the missing trailing slash, the bot just does concat for urls

#

So missing slash means invalid urls

hardy gorge
#

Yeah, but it was also changed to 3.1 urls directly. I've changed it back to "stable" with a trailing slash now.

#

It will fetch the exact same inventory object (as Django redirects)

#

So I'm wondering what this change @sullen phoenix made fixed

sullen phoenix
#

my change didn’t fix anything, and i also asked in #dev-core about it

hardy gorge
#

What is the supposed problem?

sullen phoenix
#

i also did !d django.db.models.Model

#

it didn’t work yesterday

hardy gorge
#

The commands you issued in #bot-commands above your change return the same as they do now

#

Which makes me want to know the behavior you think is wrong

#

!d django.db.models.Model

stable mountainBOT
sullen phoenix
#

hmm yeah, that didn’t work yesterday

sullen phoenix
hardy gorge
#

I think it was a fluke then, because it appeared to be working just before that

#

and after that before you changed the url as well

#

maybe a temporary connectivity issue?

sullen phoenix
#

i’m not sure

lime mural
#

would it work better if we used readthedocs version of django docs instead

brazen charm
#

connectivity issues would propagate up to the error handler

lime mural
brazen charm
#

The html should be the same between them so it wouldn't help with the parsing

stable mountainBOT
#

@green oriole

It has arrived!

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

green mesa
#

👀

late wolf
#

@green mesa

#

ye what were u saying

green mesa
#

Run the bot in test server and look at code and try to understand

#

U will understand it eventually

late wolf
#

i dont think we understand like that, we understand by doing it ourself

green mesa
#

I answered this already

late wolf
#

i think open source is for reviewing others stuff

#

ik i just wanted to bring it up again

#

lol

green mesa
late wolf
#

well i just need the logic for how the antispam works

#

i think I can work out the code myself

green mesa
#

👍

green mesa
#

Random response?

patent pivot
#

lol

#

no

#

that was to me

green mesa
#

Oook

worldly condor
#

alt account?

green mesa
#

Our real joe did it

patent pivot
#

no me

worldly condor
#

where did all your roles go?

patent pivot
#

i'm feeling blue

green mesa
#

This color suits your name

worldly condor
#

fair enough

short snow
#

i can still see blue when u have not blue high role thinkmon

patent pivot
#

when i was playing with roles

short snow
#

hmm, i think my discord is slow

#

it just became normal reddish orange colour

patent pivot
#

cache update

green mesa
#

Now I can work on new issue?

#

My all pr are almost done

subtle kraken
#

Unless they are merged, they are not done

green mesa
#

Can u have a look at partnerzodiac it has two successful check

#

.pr 455

dusky shoreBOT
green oriole
#

Well, the successful checks are just the CI

green mesa
#

I meant two review approved

#

😅

green oriole
#

There's only one approval though

green mesa
#

Iceman and Chibli both approved

green oriole
#

Oh sorry, my bad, I didn't notice it github isn't rending it the same way

#

I guess it is a merge then lemon_pleased

green mesa
#

Ty🙂

sullen phoenix
#

make him do it
@patent pivot i need to figure out a betterrrr solution

#

unless you just want me to PR the bad one

patent pivot
#

lol

#

just PR something

#

eventually

#

not urgent

sullen phoenix
#

lol okay

green mesa
#

.pr 473

dusky shoreBOT
green mesa
#

Can someone plz check this out

sullen phoenix
#

someone will review it when they have time

green mesa
#

Actually I wnt to complete my all pr in October only 😅

#

For hacktoberfest

green oriole
#

I mean

#

We are only the 3rd haha

green mesa
#

I have 2 pr done for hacktoberfest need 2 more

#

Wnt to complete by contributing to seasonal bot only 🙂

surreal gulch
#

who is gustavwilliam?

#

on github

#

what is his discord username?

lime mural
#

yeah man it's only 3rd Oct lmao

obsidian patio
#

@surreal gulch That's me

surreal gulch
#

awesome

#

I made the changes you suggested

#

.pr 471

dusky shoreBOT
obsidian patio
#

Perfect!

surreal gulch
#

.hackstats

#

oops

cold moon
#

I hope I have enough time tomorrow to start with Voice Gate project.

obsidian patio
#

@surreal gulch FYI, I may not be able to have a second look at it today

surreal gulch
#

ok

#

What is going on with issue #237?

#

.issue 237

surreal gulch
green oriole
#

@cold moon you have some pretty old open PRs with requested changes, that'd be great if you can address them first

#

I'm gonna close this issue, the feature already exist

surreal gulch
#

@green oriole It doesn't use the API though, I think that would make it better

empty sluice
#

.pr 1196 bot

dusky shoreBOT
empty sluice
#

Why aren't we using the presence intent here, even if it's just for the member count?

subtle kraken
#

Presence takes a lot of power of the bot

#

It eats through CPU like strong acid through metal

#

Since the bot was online we have received almost 700k presence updates

empty sluice
#

How long has the bot been online?

subtle kraken
#

In comparison on 2nd place is message create at below 7k

empty sluice
#

Oh lemon_eyes.

subtle kraken
#

Almost 4 hours now

#

Presence is just pure useless spam

#

What we lose? Some stats
What we gain? Less spam, less strain

brazen charm
#

The member count is really not important to anything

subtle kraken
#

Only thing mods found "semi" useful is client status in user command

#

!user

stable mountainBOT
#
Senjan21#6658

hypesquad_brilliance

User information

Created: 2 years, 5 months and 27 days ago
Profile: @subtle kraken
ID: 431861021968302108

Member information

Joined: 1 year, 4 months and 24 days ago
Roles: <@&352427296948486144>, <@&267630620367257601>, <@&587606783669829632>, <@&267629731250176001>

Status

status_offline Desktop
status_offline Web
status_online Mobile

Infractions

Total: 4
Active: 0

subtle kraken
#

Desktop web mobile thing.

#

I hope that clarifies why. @empty sluice

empty sluice
#

The desktop/web/mobile status is from presences?

subtle kraken
#

Yes

#

Presence tells you activity and status of a member

#

So you'd imagine why we get a lot of those events

#

People go online and offline all the time

empty sluice
#

Yeah I guess we aren't losing much with the presence intent.

subtle kraken
#

Rest was disabled as we dont use them

empty sluice
#

I'm reviewing that PR now, I know I can't really approve it, but why not take a look at it.

subtle kraken
#

Feel free to approve it I suppose
It doesnt really hurt much

#

And its nice if someone can spot some tiny mistake that others missed

empty sluice
#

@subtle kraken Why did you completely remove the test for the server info command?

subtle kraken
#

Tests for that cog arent particulary useful

empty sluice
#

Couldn't you mock an Invite and use it to test the server info command?

#

Tests for that cog arent particulary useful
@subtle kraken But 100% coverage is cool. lemon_swag

subtle kraken
#

It ties down to why I closed so many unittest issues as well

#

It isnt feasable on d.py bots

#

At least without pain

brazen charm
#

The bot won't ever have 100% coverage with that many api interactions

subtle kraken
#

I dont see gains of having such command tested

#

And I'd much rather see mod stuff tested

#

If we have all important stuff tested then sure

empty sluice
#

If we have all important stuff tested then sure
@subtle kraken Yeah I know we don't really have to test the !server command, I was kinda making a joke with the "100% coverage is cool" statement.

subtle kraken
#

Ah lol

#

Yeah am bad w jokes so sorry lol

empty sluice
#

I also should have added the :lemon_swag: emoji earlier lemon_pleased.

#

@subtle kraken Why did you put discord.py in quotes in the Pipfile?

subtle kraken
#

I didn't touch pipfiles at all

#

But afaik pipenv had some issues with the fact that there is dot in name

#

Kwzrd was testing smth else as well and pipfile was later attempting to lock file as
discord = {py ~=1.4.0} due to lack of quotes iirc

#

I think quotes were required

#

Notice how first commit in pr was done by kwzrd

empty sluice
#

Oh I didn't realize kwzrd did the first commit.

subtle kraken
empty sluice
#

You guys both have cats as your PFPs.

subtle kraken
#

This is what happened on other project

#

Ohh

empty sluice
#

Oh Pipenv messed up discord.py because of the dot.

subtle kraken
#

Pipenv actually added quotes @empty sluice

#

I'm okay with it being like that
It works
It doesnt break

empty sluice
#

As long as it works, I guess having discord.py in quotes doesn't matter.

subtle kraken
#

Seems like it matters for pipenv so theres that

empty sluice
#

@subtle kraken What I meant was that if "discord.py" works always, but discord.py may break, lets keep it at "discord.py".

subtle kraken
#

Ahh okay

empty sluice
#

@subtle kraken Do we use the guild_typing intent?

subtle kraken
#

We will

#

As in we will use the event

#

Im sure we actually do for moderation already

empty sluice
#

@subtle kraken I approved your PR (not that it matters, I'm not a member of the repo).

subtle kraken
#

It matters dont worry

obtuse arrow
#

I'm trying to set up the Python bot locally, and I'm getting an exception connecting to redis. What have I likely missed?

subtle kraken
#

Whats the error?

empty sluice
#

Are you using Docker?

obtuse arrow
#

Are you using Docker?
@empty sluice Nope.

subtle kraken
#

Fake redis setup?

sullen phoenix
#

the bot is pretty difficult to setup without docker

obtuse arrow
#

I don't know what you're asking.

#

I would like to be able to debug.

#

Which is why I chose not to.

brazen charm
#

Do you need redis?

obtuse arrow
#

I don't know what it's used for.

brazen charm
#

It enables persistence for some parts of the bot

empty sluice
#

Redis is a cache for the bot so it can cache certain information between restarts.

brazen charm
#

it doesn't really matter most of the time, even for things that use it

empty sluice
#

What does it cache, by the way?

obtuse arrow
#

I see. I don't have any particular goal in mind right now, so I guess it's probably not a priority.

empty sluice
#

You can set fakeredis to true in the config file so you don't have to install Redis.

obtuse arrow
#

Ok, cool.

sullen phoenix
#

help channels claimants, verification status, silences, and a few other things i believe

empty sluice
#

.pr 1202 bot

dusky shoreBOT
sullen phoenix
#

unless that silence PR hasn’t been merged yet

empty sluice
#

This looks ready to merge, if anyone wants to merge it.

brazen charm
#

It hasn't

sullen phoenix
#

it’s awaiting kosa’s response

empty sluice
#

Oh, about the simplified word matching?

sullen phoenix
#

and the sets vs lists

obtuse arrow
#

Now I'm getting an invalid token error from what I assume is the site API.

#

I've set the BOT_API_KEY variable with the default value specified in the setup guide.

#

And the site is running locally.

brazen charm
#

How are you running the site?

obtuse arrow
#

Not with Docker.

brazen charm
#

May need to set the debug flag

obtuse arrow
#

On the site?

#

It is set, I think.

#

DEBUG=1

brazen charm
#

try true, or ... run --debug

obtuse arrow
#

DEBUG=1 was from the setup guide. run --debug also.

#

So I'm already doing that. But I can try DEBUG=true as well.

empty sluice
#

Did you set your hosts file to allow pythondiscord.local:8000 or some other site URL?

obtuse arrow
#

The former.

brazen charm
#

not sure then, I guess recheck the everything and if it's correct then check on the site if debug is on, or can go check the token from the site side

obtuse arrow
#

Where do I check the token on the site side?

brazen charm
#

It would fail before rejecting the token if the problem was with the hostname

empty sluice
#

I know this probably isn't the cause of the issue, but did you install Postgres?

obtuse arrow
#

With the Windows installer.

#

Ah, you asked "did you", not "how did you", sorry.

#

Yes, I installed it.

#

I just followed the instructions, but it would be nice if I could check that the token I'm supplying matches what the site expects, but I have no idea how that is stored on the site.

brazen charm
#

Try opening a shell to the site and doing

from rest_framework.authtoken.models import Token
print(Token.objects.get_or_create()```
empty sluice
#

@brazen charm You missed a parentheses.

obtuse arrow
#

@brazen charm It printed out the same token as in the bot setup guide. However, even if I copy and paste it into my environment variable, it still fails with invalid token.

#

So that's weird.

empty sluice
#

Are you using environment variables or a .env file?

obtuse arrow
#

I'm using environment variables on a Pycharm run configuration.

#

I debugged the bot and it is loaded properly.

#

It is populated on the auth header in the API client instance.

tawdry vapor
#

The site logs out the token it's going to use when it starts up

#

Something like this. ```
web_1 | Creating a superuser.
web_1 | Admin superuser already exists.
web_1 | Existing bot token found: badbot13m0n8f570f942013fc818f234916ca531
web_1 | Starting server.
web_1 | Watching for file changes with StatReloader
web_1 | Performing system checks...
web_1 |
web_1 | System check identified no issues (0 silenced).
web_1 | October 03, 2020 - 23:01:38
web_1 | Django version 3.0.9, using settings 'pydis_site.settings'
web_1 | Starting development server at http://0.0.0.0:8000/
web_1 | Quit the server with CONTROL-C.

#

May be a slightly different log message if it's creating the token for the first time

obtuse arrow
#

@tawdry vapor Yes, it's the same one.

tawdry vapor
#

Can you try to make a request to the api with curl or postman?

obtuse arrow
#

Sure, give me a sec.

tawdry vapor
#

This doesn't make sense

#

Looks in order

#

I have a hunch the bot may be trying to connect to our production API rather than your test site

obtuse arrow
#

You are correct.

#

I guess I missed some flag or setting or something on the bot.

#

Ah, I see now.

#

Sorry for the bother.

#

Educational though.

subtle kraken
#

Hi @tranquil topaz could you resolve conflicts on your PR & do the changed f1re requested? It'd be nice to merge it

obtuse arrow
#

Cool, I got it up and running it seems. Thanks.

obsidian patio
#

@surreal gulch do you know about list comprehensions?

surreal gulch
#

I just looked at your review, I didn't know about them

obsidian patio
#

Aah, alright

surreal gulch
#

pretty useful

obsidian patio
#

!listcomp

stable mountainBOT
#

Do you ever find yourself writing something like:

even_numbers = []
for n in range(20):
    if n % 2 == 0:
        even_numbers.append(n)

Using list comprehensions can simplify this significantly, and greatly improve code readability. If we rewrite the example above to use list comprehensions, it would look like this:

even_numbers = [n for n in range(20) if n % 2 == 0]

This also works for generators, dicts and sets by using () or {} instead of [].

For more info, see this pythonforbeginners.com post or PEP 202.

obsidian patio
#

It’s really convenient. There are also dict and tuple comprehensions, if you ever need them

surreal gulch
#

wow cool

#

!dictcomp

stable mountainBOT
#

Dictionary Comprehensions

Like lists, there is a convenient way of creating dictionaries:

>>> ftoc = {f: round((5/9)*(f-32)) for f in range(-40,101,20)}
>>> print(ftoc)
{-40: -40, -20: -29, 0: -18, 20: -7, 40: 4, 60: 16, 80: 27, 100: 38}

In the example above, I created a dictionary of temperatures in Fahrenheit, that are mapped to (roughly) their Celsius counterpart within a small range. These comprehensions are useful for succinctly creating dictionaries from some other sequence.

They are also very useful for inverting the key value pairs of a dictionary that already exists, such that the value in the old dictionary is now the key, and the corresponding key is now its value:

>>> ctof = {v:k for k, v in ftoc.items()}
>>> print(ctof)
{-40: -40, -29: -20, -18: 0, -7: 20, 4: 40, 16: 60, 27: 80, 38: 100}

Also like list comprehensions, you can add a conditional to it in order to filter out items you don't want.

For more information and examples, check PEP 274

brazen charm
#

Tuples don't have comprehensions, just generator expressions that you can pass into the tuple constructor

obsidian patio
#

Right

#

I believe there are set comprehensions, though?

brazen charm
#

Yes

#

Just don't overdo it with comprehensions, sometimes they can be replaced with a simpler construct like calling list on an iterable directly, or are better off using the more verbose, but cleaner syntax of an append in a normal for loop

obsidian patio
#

Yeah

#

@brazen charm ugh, I assume this would be better off using list(): ```py
[embed for embed in json.load(f)]

brazen charm
#

What's in the json? If it's an array the load returns a list already and if it's a dict it may be better off with .keys() unless indexing is needed

obsidian patio
#

Right, yeah

surreal gulch
#

it's an array

obsidian patio
#

It would probably work to just do json.load(f), then

cold moon
green mesa
#

.pr 469

dusky shoreBOT
green mesa
#

pr ready for merging, got approved from senjan and ks

#

.pr 473

dusky shoreBOT
green mesa
#

got two approval on this one also from akrays and ks

eternal owl
#

is it possible to have a voice channel just for contributors or a channel that is meant for discussion about the pydis projects?

#

like if we need any help with something, then we can use that instead of #code/help voice channel

green mesa
#

guild.webhooks is referring to channel in which webhook has to be sent?

green mesa
green oriole
#

Done

green mesa
#

ty buddy

#

y getting this

subtle kraken
#

You didnt setup website properly

green mesa
#

but i wnt to run bot only

subtle kraken
#

Bot is tied to site

green mesa
#

so i need to run both?

subtle kraken
#

For majority of stuff, yes

green mesa
#

ok

#

and bcz of site defcon error is happening too?

green oriole
#

Yes

green mesa
#

ok

crude gyro
#

@cold moon

Hey, I've left you a review for the dewikification guide system on site, it'll require some changes before we can get it merged but you did a great job getting started on it.

https://github.com/python-discord/site/pull/393

short snow
#
AttributeError: 'Bot' object has no attribute 'http_session'``` getting this on reddit comand
#

on seasonal bot

green mesa
#

umm weired

#

its defined

#

have u imported it?

short snow
glass pecan
#

'Bot' object
wat

#

you shouldn't be using Bot

#

it should be SeasonalBot

#

either you're showing us a linting error which is due to bad typehints, or you're showing an error that shouldn't exist and there's no actual useful info in what you posted if so, as there's no traceback

#

anub, there's no need to do that, he already sent the source link

green mesa
#

woops actually blue avatar is of pybot also

#

so i forgot its not bot 😅

glass pecan
#

??, if you mean the above image thumb, that's the pic of our org icon

green mesa
#

yeh i forgot thats thumb not bot

cold moon
#

@crude gyro About guides app:

  • Name should stay guides, I think, because changing it now may create confusion for some users
  • python-markdown2 metadata extension don't allow passing list, so I have to remove contributors anyway
  • I think current way for getting last modification of file works, because like when you clone from Git, this last modified time is same than in Git.
  • So this should automatically attach IDs to headers? There is extension for it, but still users have manually put links to there.
patent pivot
#

I disagree strongly about the guides name @cold moon.

#

Are data reviews guides?

cold moon
#

Oh, everything will be there?

patent pivot
#

the "guides" system will just be any static content which cannot be dynamically generated

#

e.g. rules, faq, privacy, data reviews, code of conduct

cold moon
#

I thought that we get another pages app too

patent pivot
#

I think we are redirecting /pages/ to the guides/content app

cold moon
#

I really don't know how we will be able to migrate contribution guides to this app. This design is just so different

storm crescent
#

What is this channel abt?

short snow
obsidian patio
crude gyro
#

@patent pivot @cold moon
the dewikified site will have three kinds of pages

  • content pages, which will be rendered from markdown. This is for all the simple stuff that doesn't need fancy bulma features.
  • template pages, which will use Django Templating Language to allow you to add anything you want. This will be used for the front page, probably for event pages, and for contributing pages.
  • list pages, which is stuff like the resources. These will probably be automatically populated by yaml.
#

we'll still refer to some of those content pages as guides, but I think the system itself should maybe just be called content

patent pivot
#

yep, this is what I thought

crude gyro
#

or we could go ahead and name them something even more obvious, like markdown pages

cold moon
#

But contribution pages need Bulma stuff I think

crude gyro
#

yes, so they'll be template pages

#

we're not trying to make everything markdown.

#

just the simple stuff

cold moon
#

Okay, then I have to start renaming one-by-one everything from guide(s) to content?

storm crescent
obsidian patio
#

Right now, a feature on the site is being discussed, yeah

storm crescent
#

Ok

cold moon
#

But what about naming this app content, but individual former guides to articles?

crude gyro
#

articles is a nice word

#

yeah that works for me, ks123

#

but with that said, I still want the resources section to be called guides

cold moon
#

These can be in category named guides

crude gyro
#

talking about this screen

#

we're still keeping this

#

so when you click this, we should get a list of these content pages that we consider to be guides

#

but there isn't a one to one relationship between Guides and these content pages

#

we're gonna use this content app for making all sorts of stuff

#

including data review

#

that's not a guide

#

the issue spec you're working on is really just to create the system that will be able to render a content page

#

from markdown

cold moon
#

Ok, I'll apply this to my second PR too then later. Next thing I have to now figure out is how to provide functionality for multiple category levels

crude gyro
#

sorry, this is a bit complicated. I hope you follow.

green mesa
#

in line paginator can we keep lines = None

glass pecan
#

whats the context anub?

#

@green mesa do you have any pending PRs or assigned tickets atm

green mesa
#

nope

glass pecan
#

alright

green mesa
#

i will propose one bug pr

glass pecan
#

you can propose it in an issue, sure

green mesa
#

ok

#

have u checked out ec command

glass pecan
#

not personally, no

#

i'm just going through github emails and seen your comment on claiming the pride leaders command

green mesa
#

ok

#

my all pr got merged 😄

glass pecan
#

good good. that means your workflow has been smoothed out now, right?

#

no linting/testing issues?

green mesa
#

yeh its going smooth

#

🙂

glass pecan
#

assigned

#

now, what was your original question about re: line paginator?

#

@green mesa

green mesa
#

actually what is happening is embed description is exceeding the limit thats y its erroring out

glass pecan
#

yeah im not understanding the context

#

what error for what command

green mesa
#

.ec

#

embed description limit exceeding

#

for emoji_count command

glass pecan
#

right, makes sense

#

just needs to be paginated then

green mesa
#

yeh

#
            msg = ''
            for key, value in emoji.items():
                emoj = random.choice(value)
                e_info = f'There are **{len(value)}** emojis in the **{key}** category\n'
                if emoj.animated:
                    msg += f'<a:{emoj.name}:{emoj.id}> {e_info}'
                else:
                    msg += f'<:{emoj.name}:{emoj.id}> {e_info}'
            embed.description = msg
glass pecan
#

is there an issue ticket about the bug

green mesa
#

nope i noticed when i tried to invoke

#

i will create issue soon

glass pecan
#

Alright, good. Can be an opportunity to make a really top quality issue ticket since it's relatively straight forward, since you haven't had a lot of chances to make bugfix tickets yet iirc.

#

Once you open it, we can go through it.

green mesa
#

ok sure

glass pecan
#

Hello <@&295488872404484098>!

We have important news for those of you contributing to @stable mountain.

The master branch now uses discord.py v1.5, so please make sure to merge this change into your feature branches and update your environments and containers.

Additionally, running the bot locally will now require enabling the Server Members privileged intent in the developer portal.

We have extended the contributing docs to include this information: https://pythondiscord.com/pages/contributing/bot/#privileged-intents

P.S. @dusky shore may be soon to follow, so keep an eye out.

glass pecan
#

For every ping emoji, a pair of kneecaps will be claimed

obsidian patio
#

challenge accepted

glass pecan
#

Lets hope ak has 2 pairs of kneecaps

obsidian patio
#

3*

glass pecan
#

does it count if i wait until he heals

obsidian patio
#

Sure does

glass pecan
#

convenient

obsidian patio
#

On the matter of emojis in categories with only 1 emoji, I think sorting all of those into one category (Uncategorized) would be nice. Right now, .ec yert will think that "yert" is a category

glass pecan
#

it is

#

it's that important

green mesa
#

we have paginator which take embed as input?

glass pecan
#

yes

#

LinePaginator

green mesa
#

which one

#

it takes line also

#

i dont wnt to give line

glass pecan
#

you can initialise it with an embed

#

the lines get put inside it

green mesa
#

line?

glass pecan
#

doesn't matter anyway, you only need to make an issue ticket atm lol

#

you have a different PR to work on after that

green mesa
#

yeh

glass pecan
#

who knows, I might be able to squeeze in the new paginators by the time you come back around to it too

#

¯_(ツ)_/¯

obsidian patio
#

What do you mean @glass pecan? Do you think that yert should be an entire category?

glass pecan
#

/s

obsidian patio
#

Phew haha. Almost thought you'd gone insane or whatever

#

.ec yert

dusky shoreBOT
#
Emoji Count

There are 1 emojis in the yert category

glass pecan
#

Almost thought you'd gone insane
definitely have, just for other reasons

obsidian patio
#

Fair enough

#

Do you have any invalid and spam PRs from hacktober?

#

Aka if you know of any. Not that you have invalid ones yourself

glass pecan
#

i haven't seen any invalids yet personally

green mesa
#

@glass pecan issue fixed boom

#

i figured out

#

now let me create pr and issue

obsidian patio
#

Me neither

glass pecan
#

@green mesa if you mean the bugfix, you should have made the issue first before fixing it lol

green mesa
#

oo

#

i thought before introducing pr issue is required

glass pecan
#

is that not what i said

#

"make the issue first before fixing it"

#

so yes, issue is required before make a PR

green mesa
#

ok let me make

glass pecan
#

its too late now

#

if you have a PR of a bugfix, don't bother with an Issue, but please don't skip to the fixing first in future

obsidian patio
#

I found some invalid ones on the CPython repo. When checking for the author on this server, I get that no contributions were found. When checking on my locally hosted SeasonalBot, I get that 4 PRs were made lemon_thinking

#

Odd

glass pecan
#

hmm not sure vest, wonder if there's caching at play somehow

green mesa
#

so will i introduce my pr directly? for this time

obsidian patio
#

I'm trying out a PR, but can't see why it wouldn't work. Probably, there's some bug with the implementation of the feature

#

Odd

glass pecan
#

since it should be a simple fix and you've already destroyed the entire typical document -> discuss -> assign process, sure, but in return for skipping it this once, you better put together the highest quality, cleanest PR you possibly can so it doesn't result in a back-and-forth of fix commits that could have been avoided during the discuss step

green mesa
#

ok i will take care from nxt time

cold moon
#

Issue is not thing that is always required, some small things maybe approved here, but mostly it's better to have issue opened

glass pecan
#

it's required for newer contribs and when someone has explicitly asked for an issue ticket, ks

green mesa
#

this is simple fix

#

i have added pr

cold moon
#

@crude gyro But when I move to markdown2, then I have to remove relevant links too from content app.

green mesa
#

.issue 208

green mesa
#

@patent pivot can u add hacktoberfest accepted label on this also lemon_long

obsidian patio
#

@green mesa That's not an approved PR?

green mesa
#

accepted is only for pr?

#

or for issue also

glass pecan
#

PR

green mesa
#

ok

obsidian patio
#

Hacktoberfest isn't about opening issues

green mesa
#

i am trying to give my best

short snow
#

make .game only the msg owner react

#

like if i called it then only it will count it in my reactions

glass pecan
#

@short snow atm this is a limitation of all our paginators

#

it'll be updated in the coming weeks though

green mesa
#

When u guys work on @stable mountain ,u run site also?

glass pecan
#

we do, yep

brazen charm
#

You have to for almost everything, not much of a choice

glass pecan
#

the compose has one ready to deploy

#

our contrib guide should go through all that stuff though, so read it over

crude gyro
#

@crude gyro But when I move to markdown2, then I have to remove relevant links too from content app.
@cold moon

hmm. it doesn't support this metadata stuff then I guess? okay.

well, I think good GitHub Markdown compliance is more important than the markdown metadata, which is a fun idea but not really part of the spec.

green mesa
#

After making some more contribution to seasonal bot I will try to contribute to main bot also🙂

crude gyro
#

actually @cold moon it looks like markdown2 does support metadata as one of its extras

#

so it seems like we can still do related links

#

it also solves the IDs in the headers problem

#

with another extra

#

and supports various github flavored markdown, like tables and code fences

rapid swallow
#

why does seasonal bot's hacktstats command say Top 5 Repositories?

#

I know that previous hacktoberfests used to need 5 PRs

#

alright I think I get it

green mesa
#

It fetches top 5 repo where u contributed in hacktoberseason of current year