#dev-log

1 messages ยท Page 76 of 1

odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

Relevant Issues

Closes #749

<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->

Description

Implemented the reverse command, which flips the users profile picture if no text is given, or the given text.

Did you:

  • [x] Join the Python Discord Community?
  • [x] Read all the comments in this template?
  • [x] Ensure there is an issue open, or link relevant discord discussions?
  • [x] Read the [contr...
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Sometimes, you want to add information to a nomination, possibly after getting to know the nominee better. This is currently not possible for helpers.

When a solution involving allowing staff to nominate the same member multiple times was proposed in #nominations, @wookie184 pointed out that the !tp edit command can be used to edit nomination reasons, but that it is currently restricted to moderators and admins. I propose that helpers should be allowed to use the command to update their ...

regal archBOT
regal archBOT
#
[python-discord/forms-backend] New branch created: unittest\_failures
odd spireBOT
regal archBOT
#
jb3
[python-discord/bot] branch deleted: discord\.li\-invite\-filter
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/forms-frontend] New branch created: display\-test\-failures
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#

With your current approach, you store the cached unloads into a dict, then remove successfully unloaded cogs from the dict in load_extension, then compare the dict with the cached unloads to find missing cogs.

A better solution would be to just go ahead with loading the extension (and checking presence in the cache before loading), and storing a set of successfully unloaded cogs instead. Then, you can get all the unloads from the cache and clean up the ones that were not in the successfu...

regal archBOT
#

@vcokltfre Then we should have a vote. In any case, this inconsistency is not good. It's either "PURGE THEM ALL" or "TRAILING COMMAS 4 LIFE"

Here are my thoughts on these end-trailing commas:

  1. Some argue that such a miniscule change won't affect readability and instead simply adds extra stuff, but I think that it makes code more symmetrical and pleasant on the eyes (all lines will have the same format).
  2. Easy extendability: if one needs to add one more entry, this will largely decrea...
#

Description

There is a project-wide inconsistency within Sir Lancebot's code. For multiline data structures and function calls such as

foo = [
    "yeet",
    "cat",
    "lololol"
]

, some people think we should add a trailing/"dangling" comma at the last line while others don't.

In the code, there are instances where the dangling comma is used and instances where it is not. This can be misleading for new people wanting to contribute (such as me, last time I was discu...

#

So there shouldn't need to be a discussion about this nor should we have to go back and update our codebase.
Dangling commas should be the standard, see PEP8. It also ensures the git blame is accurate if someone adds another option to an already existing list.

Our style guideline falls back to PEP8 for this, so there really isn't a need for a discussion about this.

#

No. Adding trailing commas isn't critical enough to warrant a project-wide refactoring. Those types of PRs are generally bad ideas and hell to review. While we try to maintain a standard this is still Sir Lancebot, which is a project designed for new people to learn how to contribute to open source projects. It's not critical that we follow the style guideline 100%, but when noticed we should try to follow it and make sure the code follows it.

#

@janine9vn

While we try to maintain a standard this is still Sir Lancebot, which is a project designed for new people to learn how to contribute to open source projects. It's not critical that we follow the style guideline 100%

I noticed the same kind of inconsistency in our main bot project as well... would that be not worth a refactoring either? I'm sure this can be automated with some more Python Magic :tm:

regal archBOT
odd spireBOT
regal archBOT
#

With your current approach, you store the cached unloads into a dict, then remove successfully unloaded cogs from the dict in load_extension, then compare the dict with the cached unloads to find missing cogs.

A better solution would be to just go ahead with loading the extension (and checking presence in the cache before loading), and storing a set of successfully unloaded cogs instead. Then, you can get all the unloads from the cache and clean up the ones that were not in the suc...

#
jb3

No, it's not worth refactoring on any of our projects.

Minor modifications like this can be amended as and when the code is touched, if we have automated PRs with hundreds of lines changed then it just results in conflicts that someone has to work out. It's the same thing as typehints, we're not going to retroactively upgrade them to 3.9 style (dict[str, str] vs. typing.Dict[str, str]) because it doesn't bring us anything, it just adds extra labour for the poor soul who has to ensure t...

regal archBOT
regal archBOT
#

After some discussions with other mods, we have decided that we don't like the idea of users being allowed to upload arbitrary images and have the bot parrot them. This is a policy decision we are going to stick to going forward, along with removing similar features like this that are already in the bot.

As such, could you please delete this part of the cog, update the doc string to reflect this changed behaviour, and remove the unused import.

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: vcokltfre/chore/star\-imports\-smallening
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: vcokltfre/chore/star\-imports\-smallening
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: vcokltfre/tag/async\-await
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: poetry\-in\-docker\-bug\-fix
#

Description

The previous way would error out when building due to not being able to find a file on the overwritten
path. https://paste.pythondiscord.com/alixoqaxuc.py

Did you:

odd spireBOT
regal archBOT
#
jb3
[python-discord/sir-lancebot] branch deleted: poetry\-in\-docker\-bug\-fix
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Sentry Issue: BOT-136

The command may raise a LockedResourceError (perhaps among other things). Normally, the command error handler will take care of this, but I suppose the error handled doesn't get triggered because this is a manual ctx.invoke call. Not sure on the exact cause of this. In any case, it any errors raised should be redirected to the command error handler again.

regal archBOT
#
[python-discord/site] New branch created: update\-integrity\-pattern\-for\-postgresql\-13
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/site] New branch created: fix\-content\-app\-tests\-on\-macos
#

macOS uses /var/... as its temp directory, causing issues with the hardcoded
usage of /tmp as the temporary directory. As /tmp is also used in some
tests (for now), population of the directory is done regardless.

I have also attempted completely removing the /tmp path in tests in favour of
the platform-specific temporary directory, however, with the current
implementation if directory traversal for wiki content, this is currently more
complicated to implement (in the tests) th...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Yes, well, sort of. I've tried doing so, but it start looking into subfolders of the platform-specific directory. As mac has a nesting of folders in /var/, this crashes in test_get_context_data_for_category_with_page:

$ python manage.py test --no-input --force-color pydis_site/apps/content/tests/
System check identified no issues (0 silenced).
.E..................
======================================================================
ERROR: test_get_context_data_for_category...
#

Yes, but also no.

The problem is that when you make it populate the subfolder and the subfolder only (e.g. the result of tempfile.gettempdir()), it starts breaking because it expects an _info.yml in the top-level directory:

    ...
FileNotFoundError: [Errno 2] No such file or directory in the fake filesystem: '/var/_info.yml'
    ...
FileNotFoundError: [Errno 2] No such file or directory in the fake filesystem: 'var/_info.yml'

... so there doesn't seem to be a "one...

#
[python-discord/site] New branch created: include\-metricity\-db\-creation\-for\-local\-setup
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: update\-config\-docs
odd spireBOT
regal archBOT
#

What does it involve? I was under the impression you'd just have to prefix all the paths used in tests with the subdir name.

Yes, that's correct - more specifically, os_tmpname is just adjusted to be the complete path obtained from tempfile.gettempdir().

That said, I expect that moving into the temporary file directory to create the files in subdirectories and below should be a bit more involved, especially as the logic of the tests would need to be updated accordingly. That also ...

#

I will assume that you meant "it's just not the most ideal solution"

Yes, I did. Sorry.

That said, I expect that moving into the temporary file directory to create the files in subdirectories and below should be a bit more involved, especially as the logic of the tests would need to be updated accordingly.

I don't see why it would be more involved. It all seems straightforward to me, and there aren't even that many tests. I'll try to play around with it.

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

e8b110d Fix infraction rescheduler breaking with more t... - bast0006
0c17bde Cleanup styles in infraction rescheduler - bast0006
130e28e Merge branch 'main' into bast0006-infraction-sc... - Xithrius
9ef426f Merge pull request #1609 from bast0006/bast0006... - Xithrius

odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#

current behaviour

if the bot tries to embed lines from a GitHub link with a line count over 15 or more than 2000 characters it silently fails, not responding with anything.
image

proposed behaviour

there should be a response with at least some lines, ideally containing some notification that lines were omitted
![image](https://user-images.githubusercontent.com/24855949/1208...

odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: update\-integrity\-pattern\-for\-postgresql\-13
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: include\-metricity\-db\-creation\-for\-local\-setup
odd spireBOT
regal archBOT
#

Yes, but also no. The setup.md now links to the contributing guide. However, the configuration information is not part of the contributing guide. That said, I'm not sure how important the configuration information is for someone starting to contribute, as the setup guide documents how to run the app locally & configuration.md mostly documents additional options.

odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

Sentry Issue: SIR-LANCEBOT-5M

AttributeError: 'PrideAnthem' object has no attribute 'anthems'
  File "discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/exts/pride/pride_anthem.py", line 42, in prideanthem
    anthem = self.get_video(genre)
  File "bot/exts/pride/pride_anthem.py", line 27, in get_video
    return random.choice(self.anthems)

U...
#

Sentry Issue: SIR-LANCEBOT-5K

AttributeError: 'PrideFacts' object has no attribute 'facts'
  File "discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/exts/pride/pride_facts.py", line 85, in pridefact
    await self.send_select_fact(ctx, option)
  File "bot/exts/pride/pride_facts.py", line 60, in send_select_fact
    await target.send(embed=sel...
regal archBOT
#
[python-discord/sir-lancebot] New branch created: fix/attribute\-errors
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: swfarnsworth/smarter\-resources/update\_labels
#
[python-discord/site] New branch created: md\-link\-fix
odd spireBOT
regal archBOT
#
jb3
[python-discord/site] branch deleted: md\-link\-fix
odd spireBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#

Description

Over time, this project's test suite has grown to be very large, and so too has its operation time. On my machine, the test suite currently takes about 80s to complete. You can see a full breakdown here.

This issue proposes parallelization to help shorten the run time of tests.

Approaches

Naturally, there are many ways to go about doing this, each with varying degrees of difficulty.

Approach 1: [unittest-parallel](ht...

regal archBOT
#

I'm fine with using it as just a runner.

As for using pytest fully, I'll paste what I wrote before in Discord:

We have developed a bunch of utilities that are tightly coupled to unittest, so we would have to maintain pytest equivalents where necessary unless we rewrite all existing tests. Maybe they would still work with pytest, not sure.

I think it'd be awkward to have tests written in two different libraries. Also my point about maintaining utilities (mostly mocking stuff) for...

regal archBOT
#
[python-discord/site] branch deleted: fix\-content\-app\-tests\-on\-macos
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: new\_zapped\_formats
regal archBOT
#

Closes https://github.com/python-discord/bot/issues/943

Users sometimes post .csv or .json files without being redirected to the paste system.

This PR resolves that issue by still deleting their file, but mentioning what file got deleted, which file extension it contained, and how they can access our pasting service.

  • [x] Functionally works after posting text, JSON, and Comma Separated Value files.
  • [ ] Tests written.
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#

Current behavior

If a !docs invocation cannot find the appropriate symbol, the invocation and the bot answer is deleted after a few second, even if the message was a ping reply or contained a ping, which lead to a ghost ping.

Suggested behavior

The bot answer is or is not deleted (maybe we can just have a :x: reaction instead?) but the message stays to avoid getting a ghost ping (only if it contained a ping).

regal archBOT
odd spireBOT
regal archBOT
#

@Akarys42 I included that in my original discord writeup, but omitted it here for brevity. In short, it really doesn't matter because the current output isn't all that great tbh. The only thing that truly sucked was unittest-parallel, but I won't be including it in this report. (You should really be looking to integrate some sort of proper test result display tool into your dev workflow regardless of the test runner)

Current unittest output is . to represent success, some other charact...

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

Sentry Issue: SIR-LANCEBOT-5N

TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
  File "discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/exts/halloween/scarymovie.py", line 27, in random_movie
    selection = await self.select_movie()
  File "bot/exts/halloween/scarymovie.py", line 50, in select_movie
    params["page"] = ra...
regal archBOT
#
[python-discord/site] branch deleted: update\-config\-docs
#
[python-discord/site] New branch created: move\-config\-docs\-to\-contributing\-guide
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: swfarnsworth/resource\_suggestion\_template
#

Here's a template for incoming resource suggestions. It prompts the individual to provide some information about the resource, though the information that I think can most easily be inferred (like topic or type) or which I think should be left up to the reviewers (like difficultly level) are omitted. We might go with a different template before we start actively encouraging people outside the staff to start submitting resources.

odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: swfarnsworth/resource\_suggestion\_template
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: docker\-compose\-restart\-policy
#
[python-discord/sir-lancebot] New branch created: docker\-compose\-restart\-policy
#

Description

Since we use the same port for redis on all out projects, having this always restart causes conflicts for people starting up docker and wanting to use redis for any other project.

Did you:

odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: docker\-compose\-restart\-policy
#
[python-discord/sir-lancebot] branch deleted: docker\-compose\-restart\-policy
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

Closes #1622

This PR makes a few changes to the way tests are handled:

  • Switches to pytest purely as a test runner.
  • Adds pytest-xdist
  • Switches to pytest-cov to generate .coverage files, but leaves coverage.py to process them.

The last point about pytest-cov is due to the simple fact that coverage.py doesn't support xdist as far as I could tell, and pytest-cov did not support manipulating the data after the fact. The intention here is to minimize any changes one might experie...

odd spireBOT
regal archBOT
regal archBOT
#

I've made another change. I split the test task into two: fast-test and test. test is unchanged, but fast-test has been added to run the tests without coverage, since including coverage can take up 2x the time.

As a sidenote, I now realize the original numbers in the issue are incorrect, as they included coverage for unittests, but not pytest. I've updated the numbers there to reflect that.

odd spireBOT
odd spireBOT
regal archBOT
#

Afaik the reason to include the tests themselves in the coverage report is that it becomes easier to find test code that wasn't used, or tests that didn't run, when they probably should have. You may also find yourself patching in a block of code that mocks something and is defined in the tests package; seeing coverage for it may be useful.

I don't know how compelling these arguments are to you, but I remember them from reading Ves' docs on the testing utils they had prepared.

#
[python-discord/bot] branch deleted: new\_zapped\_formats
#

a71d37b Allowed text format warning to have multiple fo... - Xithrius
4edecf6 Added .txt file extension to antimalware test. - Xithrius
d510a6a Added subtests for .txt, .json, and .csv ... - Xithrius
aeaef8f Added new formats to unittest docstrings. - Xithrius
a305d39 Renamed blocked_extension_str to blocked_extens... - Xithrius

odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
regal archBOT
#

The current game loop is fragile.

  • DEFAULT_QUESTION_LIMIT is hardcoded to 6 in 4430760c, which seems to be because there are only 7 questions in the retro category.
  • Using the default question limit bypasses the topic length check
  • The game loop only ever exits if the number of done questions go above the question limit
  • The current question is retrieved in an infinite loop calling random.choice on the available questions and checking if it's done

These points result in the...

odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#

Resource location
https://regex101.com/

Payment type
Free, but solicits donations

Why it should be included
We don't currently have any regex resources, and it looks like this one combines both regular expression testing (as a tool) and interactive regex tutorials.
I've always used pythex, which is just an expression tester with a syntax cheat sheet, but this seems to have more features and is the one I've seen more staff members using.

**Po...

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

closes #1567

This PR is for the help channel participant DMs, me and Griff went on and tested this in and we ran into no problems at all, we even went as far as testing it with multiple people.

This is the embed that the user receives in DMs.
image

Also added feedback if the user already has help DMs turned on already(this is the same for when the user turns them off)
![image](...

odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#

I've been using regex101 for years, and I don't think it's ever come up short for what I needed. I hadn't used pythex before, so I checked it out in order to compare.

Benefits of regex101 over pythex:

  • Supports multiple programming languages. I don't know how much we care about this given our focus on python, but from the user's perspective it would be convenient to have one tool for regex rather than one for each language.
  • The big one: gives the user a breakdown in English of w...
#

There's quite a bit of repeated code in these two subcommands, I think they could both be brought into a single command which takes an argument of on/off.

See bot.converters.allowed_strings on how to limit input like that.

you could do something like

      requested_state_bool = requested_state.lower() == "on"
      if requested_state_bool == await _caches.help_dm.get(ctx.author.id, False):

where requested_state is the string yes or no from the function args. This if wil...

#
[python-discord/site] New branch created: subdomains\-to\-query\-paths
#
[python-discord/bot] New branch created: kill\-subdomains
#

After reviews are OK on the pull requests, @jb3 needs to perform updates to the Kubernetes deployment.

Per our DM on Discord:

bot needs to be told to call site.default.svc.cluster.local and append /api onto that
we don't need a separate DNS record anymore because we're not doing subdomains
so we can do away with that ingress route and the internal API service

Adding as assignee to keep track of it.

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

There are two issues here

Summing it up,

--- a/bot/exts/evergreen/t...
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

Relevant Issues

<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #771

Description

In tic_tac_toe.py, I changed the description being returned in the embed for the show_tic_tac_toe function from -

description=f"{game.winner} :trophy: vs {game.loser}\n\n{game.format_board()}"

to -

`description=f"{game.winner} vs {game.loser} (draw)\n\n{game.format_board()}" if game.draw else f"{game.winner} :trophy: vs {game.loser}\n...

odd spireBOT
regal archBOT
#
[python-discord/quackstack] New branch created: vcokltfre/feat/package\-ready\-rewrite
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

While setting up locally I didnโ€™t see there are two projects that need to be cloned and initialized for the bot to initialize. Initially I thought it was one project (the bot) that would also include the site.. but the site required adding additional parameters to the .env file . i understood that after adding those environment variables to the .env the bot would also initialize the site with it .

can suggest adding a link to the correct repository to this page [site repo page](https...

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

Before I push this, should I change anything? (I am going to add logging and the docstring)

@commands.command(name="helpdm")
    async def helpdm_command(
            self,
            ctx: commands.Context,
            state: allowed_strings("on", "off") = None
    ) -> None:
        state_bool = state.lower() == "on"

        requested_state_bool = state.lower() == "on"
        if requested_state_bool == await _caches.help_dm.get(ctx.author.id, False):
            if await...
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

That's pretty close to what I'd do, just 3 things

  1. I don't think making the default value be None is needed, we want the user to be required to give this arg.
  2. The extra if statements aren't needed inside the if requested_state_bool == await _caches.help_dm.get(ctx.author.id, False): line. As this if statement is only entered if they are trying to set their status to what's already stored. So this could be simplified to just
if requested_state_bool == await _caches.help_dm.ge...
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/workers] New branch created: label\-webhooks
regal archBOT
regal archBOT
#
[python-discord/site] New branch created: swfarnsworth/asking\_good\_questions
odd spireBOT
regal archBOT
regal archBOT
#

I did some digging into this. This is caused by rest_frameworK replacing commas with spaces and then splitting the string:

    def get_search_terms(self, request):
        """
        Search terms are set by a ?search=... query parameter,
        and may be comma and/or whitespace delimited.
        """
        params = request.query_params.get(self.search_param, '')
        params = params.replace('\x00', '')  # strip null characters
        params = params.replace(',', ' ')...
regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: new\-github\-emoji
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#

Description

looking to add " Which recently discovered Python module has changed your general use of Python?"
as a question to the #python-general channel

Reasoning

i see it's a great topic to have a discussion about . I've just picked up sql alchemy and i've seen it makes a great difference in how i use python . i first heard about it in voice chat on the discord

Proposed Implementation

add " Which recently discovered Python module has changed your general use of ...

#
[python-discord/bot] New branch created: infraction\-dm\-utc
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: infraction\-dm\-utc
odd spireBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
#

Doc item doc_item.symbol_id='environment-variables' present in loaded documentation inventories not found on site, inventories may need to be refreshed.

regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/forms-frontend] New branch created: form\-metadata
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
#

Description

A command, .colour that would allow people to input a given colour and Lance will show the actual colour in an embed/image.

  • .colour hex
  • .colour rgb
  • .colour hsl
  • .colour cmyk

Reasoning

Especially with things like the pixels event, and in cases like Discord embeds, it would be nice to be able to see what a specific colour is, as well as being essentially able to convert colours.

Proposed Implementation

The commands would result i...

regal archBOT
#

A quick review for now as there are some things preventing the scheduling from fully working.

The functionality should account for users leaving the moderation team and remove the scheduling when that happens.
There should also be a command to remove the schedule for yourself.

Would need confirmation as I'm not sure if I got it right myself but I don't think the 16 hour limit was meant in this way, but the other way around (as a maximum). With a 16 hour minimum the moderator will alway...

regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: new\-github\-emoji
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: swfarnsworth/help\_channel\_message
#

Having spent more time in the help channels lately, I don't think the "available help channel" message is having the intended effect. I suggest this version, which eliminates the part explaining that the channel will be allocated specifically for the one user (I think everyone knows this or infers as much), and more directly instruct them not to "ask to ask" and to avoid posting code as screenshots.

![image](https://user-images.githubusercontent.com/32915757/121791038-87088880-cbb3-11eb-8b...

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: poll\-for\-partners
odd spireBOT
oak estuaryBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#

I recall somebody mentioning that the main reason it takes a while is because it fetches message count from metricity. It only needs to do this in mod channels as this is the only place the counts are displayed, but it seems to make the api call anyway: https://github.com/python-discord/bot/blob/f2ef6c12b0a872413bad33186bc60bbbdd17f304/bot/exts/info/information.py#L244

Moving this to only happen after the mod channel check should speed it up in most cases, and I don't really think the typi...

regal archBOT
regal archBOT
#

The staff meeting seems to agree on this rewording of the first bullet point:

Ask your Python question, not if you can ask or if there's an expert who can help.

Another point that came up is shortening the first paragraph to just "Send your question here to claim the channel."

The result could be:

Send your question here to claim the channel.

Keep in mind
โ€ข Ask your Python question, not if you can ask or if there's an expert who can help.
โ€ข Provide a code ...

regal archBOT
#

Sentry Issue: BOT-13C

Forbidden: 403 Forbidden (error code: 50007): Cannot send messages to this user
(2 additional frame(s) were not displayed)
...
  File "bot/utils/lock.py", line 108, in wrapper
    log.debug(
  File "bot/utils/lock.py", line 108, in wrapper
    log.debug(
  File "bot/exts/help_channels/_cog.py", line 583, in notify_session_participants
    await message.author.send(embed=...
regal archBOT
#

Double quotes are currently preferred by the style guide, but aren't enforced in any way in the project. This leaves the project in a bit inconsistent state ands adds more work for reviewers and contributors during the PR process.

The flake8-quotes plugin can be used to raise linting errors if the preferred quote type is not used. From testing, everything seems to work fine except for multi line strings with implicit concat https://github.com/zheller/flake8-quotes/issues/82, but this is ea...

regal archBOT
regal archBOT
#

I'm not sure if we really want to change them all at once, mainly for all the conflicts it will arise. We can just change them as we go on, and perhaps look at this once we only have a few double quotes remaining?

I am personally not a fan of the rule that enforces double quotes, I use each type of quote depending on the context. Also, this does not automatically change the quotes, which is pretty silly if you ask me, I'd rather have it as a precommit hook.

Poke @Xithrius, @jb3, @Hassa...

regal archBOT
#

I'm not sure if we really want to change them all at once, mainly for all the conflicts it will arise.

From a quick replace I found conflicts when merging #1602, #1568, #1539, #1487 and #836; it affects less PRs than I thought it would, but still a considerable number. Although conflicts coming from here should be mostly trivial to resolve.

We can just change them as we go on, and perhaps look at this once we only have a few double quotes remaining?

I really doubt this will ever...

regal archBOT
regal archBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#

If you review the more in-depth contributing guide on the website, this is listed and can be avoided by using Docker.

please provide a reference to where it shows the repository links in the contributing guide for the bot and the site.
When i used these guides i was between the pages for 4 hours , and i am sure there are not repository links directly on the contributing guide pages.

As i said, this is where i see the confusion stems from .

these are the pages
https...

regal archBOT
regal archBOT
#
[python-discord/site] New branch created: cj8\_announcement
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
jb3
[python-discord/site] branch deleted: cj8\_announcement
odd spireBOT
regal archBOT
#
jb3
[python-discord/site] New branch created: jb3\-cj8\-patches
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

please provide a reference to where it shows the repository links in the contributing guide for the bot and the site.

image
i almost thought i missed this .
but
this hyperlink brings you to this page https://pythondiscord.com/pages/guides/pydis-guides/contributing/site/
that page doesn't have a link to the github repo, showing that it's two seperate projects.

can...

regal archBOT
#
jb3
[python-discord/site] branch deleted: revert\-528\-cj8\_announcement
regal archBOT
#
[python-discord/site] New branch created: cj8\-updates
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT