#dev-log
1 messages ยท Page 34 of 1
Build 20190916.5 succeeded
Requested by
Leon Sandรธy
Duration
00:07:17
Build pipeline
Bot
Connected!
Build 20190916.6 succeeded
Requested by
GitHub
Duration
00:07:38
Build pipeline
Bot
Connected!
Postgres backup completed!
@larswijn Would you like to revisit this if you get some time.
I understand it's probably in order to keep parametrize decos shorter, but I'm not a fan of the single-letter function name. Something a bit more self-explanatory would be nicer.
_, kwargs = ctx.send.call_args
_, kwargs = ctx.send.call_args
Tested: works well;
Review: Looks good and I learned couple of things about pytest; nice.
8d04b38 Implement !otn search. Closes #408. - jchristgit
70b7ef7 Update discord.py version to 1.2.3 - SebastiaanZ
230bd00 Adjust to new cog method names. - scragly
9b21455 Update discord.py version to 1.2.3 (#433) - scragly
2b4b0a5 Merge branch 'master' into otn-search-command - lemonsaurus
Build 20190917.1 failed
Requested by
GitHub
Duration
00:01:14
Build pipeline
Bot
Build 20190917.2 succeeded
Requested by
GitHub
Duration
00:03:05
Build pipeline
Bot
Build 20190917.3 succeeded
Requested by
GitHub
Duration
00:08:10
Build pipeline
Bot
Connected!
[python-discord/bot] branch deleted: bot\-utils\-checks\-use\-fixture
[python-discord/bot] branch deleted: add\-converter\-tests
Connected!
Build 20190917.4 succeeded
Requested by
GitHub
Duration
00:08:00
Build pipeline
Bot
[python-discord/site] New branch created: infractions\-default\-ordering
0576b70 Make API return infraction list with newest first - SebastiaanZ
The most recent infraction a user has is usually the most relevant to us. This PR aims to make the life of moderators easier by sorting the infractions by their inserted_at date, with the most recently inserted infractions first.
Note: The id field does not have an entirely chronological order, because we did not import historical infractions in chronological order. That's why the inserted_at field is chosen instead of the id field.
Build 20190917.5 succeeded
Requested by
Scragly
Duration
00:02:54
Build pipeline
Bot
Build 20190917.1 succeeded
Requested by
GitHub
Duration
00:04:03
Build pipeline
Site
Build 20190917.6 succeeded
Requested by
GitHub
Duration
00:03:06
Build pipeline
Bot
39a28ca Add coverage reporting to tests. - jchristgit
8346c36 Update lock to new coverage dependancies. - scragly
f23cc37 Remove duplicate coverage.xml gitignore - scragly
6036e1a Merge branch 'master' into add-pytest-cov - scragly
d2a036c Add coverage reporting & JUnit XML to tests. (#... - scragly
[python-discord/bot] branch deleted: add\-pytest\-cov
Build 20190917.7 succeeded
Requested by
GitHub
Duration
00:08:15
Build pipeline
Bot
Connected!
Build 20190917.8 succeeded
Requested by
GitHub
Duration
00:02:58
Build pipeline
Bot
Build 20190917.9 succeeded
Requested by
GitHub
Duration
00:08:08
Build pipeline
Bot
Connected!
Build 20190917.10 failed
Requested by
GitHub
Duration
00:03:21
Build pipeline
Bot
Build 20190917.11 succeeded
Requested by
GitHub
Duration
00:03:06
Build pipeline
Bot
Build 20190917.12 succeeded
Requested by
GitHub
Duration
00:07:39
Build pipeline
Bot
Connected!
We've recently added a search feature for off-topic names. It's a really cool feature, but I think it can be enhanced in a couple of ways. (Use the informal definition of "couple": "an indefinite small number.")
For all the examples, this is the list of off-topic-names in the database:

**1. Use OffTopicName co...
[python-discord/bot] New branch created: enhance\-offtopicnames\-search
cfb6b63 Enhance off-topic names search feature - SebastiaanZ
There's a more colorful description, with examples, in the issue: #435. The examples there were generated using this code.
Taken from commit cfb6b63:
This commit is meant to enhance the search feature in three separate, but related ways:
-
By changing the type annotation of the query to OffTopicName, we will use the same character translation table for the query as we did when storing the off-topic name, leading to better matches.
-
By adding a membership test,
query in name...
Build 20190917.13 succeeded
Requested by
GitHub
Duration
00:02:56
Build pipeline
Bot
I've done some refinement for the Dockerfiles. This has resulted in the following improvements:
- Build time is reduced from 1:08 to 0:50 when tested on my machine.
- Image size is reduced from 549.2 MB to 466.2MB
Change Details
-
Dockerfile.localhas been changed tolocal.Dockerfilefor better filetype detection. -
Changed from interactive
addusercommand that resulted in logged warnings to the non-interactiveuseraddcommand.--systemmakes it a homeless non-lo...
Build 20190917.2 succeeded
Requested by
GitHub
Duration
00:04:35
Build pipeline
Site
As a sidenote on the above dataclasses suggestion, snekbox is now Python 3.7 so it's included :smile:
Looks good. None of the Python dependencies need to be built with GCC, right?
ENTRYPOINT ["uwsgi"]
CMD ["--ini", "docker/app/uwsgi.ini"]
Correct, it was only uwsgi. I was sure to actually run the resulting containers to ensure things still worked just in case I was mistaken beforehand.
I'm curious, what's the difference?
I think doing ENV PIP_NO_CACHE_DIR=false would be helpful since that'd also affect the dependencies pipenv installs, right? Could throw in a couple more to perhaps make logs nicer too:
ENV PIP_NO_CACHE_DIR=false \
PIPENV_HIDE_EMOJIS=1 \
PIPENV_NOSPIN=1 \
It lets you override the arguments when you use docker run (or in compose I suppose) without having to also write uwsgi. I suppose in this case not as useful, but generally you can set the executable + stable args in ENTRYPOINT and then put the args that may change in CMD.
d2e1b65 Use entrypoint to make the container executable... - scragly
If this was done, the entrypoint still wouldn't be "forced". If you really wanted to change it you could use docker run --entrypoint
Build 20190917.3 succeeded
Requested by
GitHub
Duration
00:03:35
Build pipeline
Site
It doesn't work with the docker-compose command option, existing with a code 1. Since there's no significant benefit and it's a difference in behaviour, I'll revert to original.
That's cause it tries to do uwsgi migate_and_serve.sh. In the compose you'd need to make that shell script the entrypoint instead of a command.
Exactly, which is an unnecessary change in behaviour with no significant benefit.
@MarkKoz Added the env vars suggested. It hasn't impacted size or build time, and confirmed it doesn't have any issues building and running the container with them.
Build 20190917.4 succeeded
Requested by
GitHub
Duration
00:03:37
Build pipeline
Site
It's 440 MB if the cache is disabled, 466 MB if it is enabled. Are you sure you built the right Dockerfile when testing that? I noticed you only set those environment variables for local.Dockerfile
Yep, built the correct one, but just didn't look at the right image when checking the size. You're right, it's decreased again, which is great news.
I'll add them to the other container also.
1a89e25 Add PIP and PIPENV Environmental Variables to p... - scragly
Build 20190917.5 succeeded
Requested by
GitHub
Duration
00:04:37
Build pipeline
Site
I'll look into this, I think we can solve this by using re.sub to escape all the mark-up characters.
Postgres backup completed!
[python-discord/bot] New branch created: codeblock\-suggestion\-escape\-markdown
6815bca Escape markdown in codeblock suggestion embed - SebastiaanZ
If the content we prepare for the codeblock suggestion embed defined in the bot cog contains markdown characters (e.g., __, **), this will cause Discord to apply markdown, since both the codeblock syntax example as well as the codeblock result example will contain the
characters, making it a matched formatting pair.
This will hide those characters, which often have a function in the code, and break the example of a formatted codeblock:
 -> None:
Do we want to go with a generic dict annotation for these types or the more specific Dict[str, Union[str, bool]]? It's probably a bit much to go down to this level of specificity for such a large linting PR, but it's something we can consider as a general guideline for regular contributions/PRs.
def validate_tag_embed_fields(fields: Dict[str, Union[str, bool]]) -> None:
As per Discord docs & like earlier comments:
def validate_tag_embed_author(author: Dict[str, str]) -> None:
Partial review, my time's up for now, but I think leaving a partial review speeds up the process with such a large number of changes. I've gone through the files manually and checked the function signatures myself.
Also, why doesn't this cause a linting error? It seems to be missing a return type annotation:
inner does not return a callable, but a union of None and the return value of the decorated original callable (func) in return await func(...).
Since we don't strictly enforce commands to return None, by allowing the return await ctx.send pattern, I don't think we can make a reasonable assumption of what func will return, so I guess we could use Optional[Any] or something.
async def inner(self: Callable, ctx: Context, *args, **kwargs) -> Optional[A...
Why is this a Union of Callable and None? Doesn't this always return the callable wrap?
def locked() -> Callable:
The same here, doesn't this always return the callable inner?
def wrap(func: Callable) -> Callable:
Build 20190919.2 failed
Requested by
GitHub
Duration
00:02:10
Build pipeline
Bot
Build 20190919.3 succeeded
Requested by
GitHub
Duration
00:02:50
Build pipeline
Bot
Build 20190919.4 succeeded
Requested by
GitHub
Duration
00:03:05
Build pipeline
Bot
This has a return await LinePaginator.paginate path and LinePaginator.paginate has Optional[Message], so this should have Optional[Message] as well. See L229
Note: This will require both typing.Optional and discord.Message to be imported
async def reload_command(self, ctx: Context, cog: str) -> Optional[Message]:
Not your code, but this method always returns a string in the current version.
async def upload_log(self, messages: List[Message], actor_id: int) -> str:
I've looked through all the files now, I think.
This inner-function in bot.cogs.utils does not have a return value annotation, it should be Tuple[str, str]
This does not return the OrderedDict itself, but an item from that dict:
https://github.com/python-discord/bot/blob/f30dcc476a4233eb4785ab0c6996225f3c440caf/bot/cogs/doc.py#L55
The values that it returns are just cached return values from the function it decorates and that one is annotated with Optional[Embed], so this decorator returns that, too. However, It's not strictly said that we will never use this decorator for another function, so maybe Any or Optional[Any] would be bett...
Build 20190919.5 failed
Requested by
GitHub
Duration
00:02:08
Build pipeline
Bot
Build 20190919.6 failed
Requested by
GitHub
Duration
00:02:09
Build pipeline
Bot
Build 20190919.7 succeeded
Requested by
GitHub
Duration
00:03:04
Build pipeline
Bot
Are you planning on adding erroneous input tests here @jchristgit ?
Just noticed a type when running this file.
def _format(self, inp: str, out: Any) -> Tuple[str, Optional[discord.Embed]]:
It's discord.ext.commands.Context; I'd recommend importing as Context
async def internal_group(self, ctx: Context) -> None:
Here as well
async def eval(self, ctx: Context, *, code: str) -> None:
from discord.ext.commands import Bot, Cog, Context, group
Apparently, I messed a few things during my review; apologies.
Build 20190919.9 succeeded
Requested by
GitHub
Duration
00:02:56
Build pipeline
Bot
Build 20190919.8 succeeded
Requested by
GitHub
Duration
00:02:57
Build pipeline
Bot
This seems to be the last one, although this one doesn't prevent the bot from running (I think).
There's one other mention of discord.Context in the docstring of the HelpSession class, but that's not really within the scope of this PR.
async def _eval(self, ctx: Context, code: str) -> Optional[discord.Message]:
Build 20190919.10 succeeded
Requested by
GitHub
Duration
00:02:56
Build pipeline
Bot
Build 20190920.1 succeeded
Requested by
GitHub
Duration
00:04:30
Build pipeline
Site
Postgres backup completed!
This has been taken care of for all essential functionality during the migration, so I'm closing this issue.
What should I do with this PR? Make it a test-only PR? In that case I should probably clean up the history with a force push
Let's revitalize this PR.
I think it's a good idea to have a couple of test cases in place for that regex validation. I know it's not a strict requirement for the test coverage in terms of lines touched during testing, but it would be beneficial in terms of feature coverage.
[python-discord/site] New branch created: line\_ending\_fix
Added .gitattributes to prevent Windows users from accidentally cloning the repo and getting incorrect line endings
Also adjusting the shebang for the migrate_and_serve.sh to prevent another Windows related bug
Build 20190920.2 succeeded
Requested by
GitHub
Duration
00:04:37
Build pipeline
Site
Build 20190920.3 succeeded
Requested by
GitHub
Duration
00:07:36
Build pipeline
Site
Build 20190920.4 succeeded
Requested by
GitHub
Duration
00:04:37
Build pipeline
Site
[python-discord/site] branch deleted: container\-refinement
:shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit: :shipit:
Build 20190920.6 succeeded
Requested by
GitHub
Duration
00:04:32
Build pipeline
Site
Build 20190920.5 failed
Requested by
GitHub
Duration
00:05:56
Build pipeline
Site
Build 20190920.1 succeeded
Requested by
GitHub
Duration
00:03:55
Build pipeline
Bot
Build 20190920.7 failed
Requested by
GitHub
Duration
00:05:05
Build pipeline
Site
Here are a few:
parse_rfc1123: a string that is not in the correct format.- Maybe this shouldn't be tested since it really just tests if
strptimeraises an exception (which I think we can safely assume will always happen since it's the standard library?)
- Maybe this shouldn't be tested since it really just tests if
humanize_delta: an unsupportedprecisionhumanize_delta:max_unitsabove what's supported or negativewait_until: astartthat's in the future relative totime(difference results in negative seconds)
[python-discord/site] New branch created: citest
Build 20190920.8 succeeded
Requested by
Scragly
Duration
00:06:14
Build pipeline
Site
Build 20190920.9 succeeded
Requested by
GitHub
Duration
00:06:59
Build pipeline
Site
Some more additions:
PyYAMLtomlattrs
Build 20190921.2 succeeded
Requested by
GitHub
Duration
00:04:32
Build pipeline
Site
Build 20190921.3 succeeded
Requested by
GitHub
Duration
00:07:42
Build pipeline
Site
[python-discord/site] New branch created: bad\-lint\-tester
ffb6f5e Add some bad stuff for lint test to pick up. - scragly
Build 20190921.4 succeeded
Requested by
GitHub
Duration
00:03:36
Build pipeline
Site
Build 20190921.5 succeeded
Requested by
GitHub
Duration
00:03:28
Build pipeline
Site
Build 20190921.7 failed
Requested by
Scragly
Duration
00:01:09
Build pipeline
Site
Build 20190921.6 succeeded
Requested by
GitHub
Duration
00:03:31
Build pipeline
Site
Build 20190921.8 failed
Requested by
GitHub
Duration
00:03:18
Build pipeline
Site
Build 20190921.9 succeeded
Requested by
GitHub
Duration
00:03:25
Build pipeline
Site
Build 20190921.10 failed
Requested by
Scragly
Duration
00:01:14
Build pipeline
Site
Build 20190921.11 failed
Requested by
Scragly
Duration
00:01:27
Build pipeline
Site
@SebastiaanZ Not sure what you mean. I already improved on the tests that were there. Did you have something more in mind?
Build 20190921.12 failed
Requested by
GitHub
Duration
00:01:32
Build pipeline
Site
Build 20190921.13 failed
Requested by
GitHub
Duration
00:01:33
Build pipeline
Site
Build 20190921.14 succeeded
Requested by
GitHub
Duration
00:02:00
Build pipeline
Site
Build 20190921.15 failed
Requested by
Scragly
Duration
00:01:59
Build pipeline
Site
Build 20190921.16 succeeded
Requested by
GitHub
Duration
00:01:54
Build pipeline
Site
Build 20190921.17 succeeded
Requested by
GitHub
Duration
00:01:56
Build pipeline
Site
Build 20190921.18 succeeded
Requested by
GitHub
Duration
00:05:01
Build pipeline
Site
Build 20190921.1 failed
Requested by
GitHub
Duration
00:00:00
Build pipeline
Snekbox
Build 20190921.2 succeeded
Requested by
GitHub
Duration
00:02:39
Build pipeline
Snekbox
Postgres backup completed!
Lemon asked to create more social previews (see #23), so here there are :)
You should have mentioned me : #25 :)
@MarkKoz No, but you asked what you had to do with this PR and it was getting stale. I tried answering that question by saying that I think that your tests are still a useful addition to the site, but I guess my wording threw you off.
It's currently conflicting with master, though, because of the now redundant changes in the model file. I wouldn't be opposed to you cleaning up the history in this case, since I don't think it's going to complicate reviews.
The website article editor currently looks like this:

When Side-by-Side or Fullscreen is toggled, the sitewide header covers the toolbar, making it impossible to revert to regular editing by mouse or access any of the buttons on the toolbar.

Only tested on the late...
90b4bfd Fix shell script name for whl building to refer... - scragly
The last docker refinement resulted in uwsgi being installed from apt, which ended up causing an issue where the app was not discovered when the container was run. Due to that, it was set back to the original install through pip and building from source.
This PR applies another method instead, while also looking into the last few things that come to mind that would be able to improve the image speed and size.
uWSGI
A more python-friendly distribution package that is maintained by ...
Build 20190921.19 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Site
Currently, we have a !roles command, which lists out all the roles. However, it would also be useful to have a !role <role> command, to get more info on a certain role.
Implementation details
- Ability to get info on multiple roles?
!role <role_1> <role_2> - Info that would be helpful:
- Role ID
- Role Name
- Role Color as hex/hsv
- Is role mentionable
- Number of members with the role? (Blacklist certain high volume, easily checked ones like `@Develope...
Update: Currently, the bot reply to the !otn a command now also includes the name added to the names list to provide feedback, as dashes - are now optional and would replace the spaces when passing a multi-word name to the command.


I don't think the consistency is...
Would moving RUN pip install -U pipenv pyuwsgi above COPY help with layer caching?
Build 20190921.20 succeeded
Requested by
GitHub
Duration
00:02:00
Build pipeline
Site
This should be good to go now.
lgtm. Tested locally and everything works.
[python-discord/bot] New branch created: add\-role\-info\-command
Add a new command to show specific info (colour, id, permissions, position) about a list of given roles.

Closes #440.
Build 20190921.1 succeeded
Requested by
GitHub
Duration
00:03:59
Build pipeline
Bot
Build 20190921.2 succeeded
Requested by
GitHub
Duration
00:03:58
Build pipeline
Bot
[python-discord/flake8-annotations] branch deleted: type\-comment\-investigation
Since a new error code is being added, we're going to skip directly to v1.1.0
[python-discord/flake8-annotations] branch deleted: v1\.0\.1\-dev
[python-discord/flake8-annotations] New branch created: v1\.0\.1\-dev
79cbedd Update dev dependencies in setup.py, bump ver - sco1
cff3565 Fix incorrect line number for function return w... - sco1
3bc7f5e Add handling & tests for arbitrarily nested fun... - sco1
c3e753e setuptools fixes and tweaks - GhostofGoes
dcf10a4 Merge pull request #38 from python-discord/pack... - sco1
I hate you
[python-discord/flake8-annotations] New branch created: v1\.1\.0\-dev
[python-discord/flake8-annotations] branch deleted: v1\.0\.1\-dev
PR Placeholder for v1.1.0 release
- Fix for #32 (Line number incorrect for return values in the presence of multiline docstrings)
- Fix for #33 (Improper handling of nested functions in class methods)
- Sync
setup.pydev dependencies with Pipfile - Update setup.py metadata (#38)
- Add issue templates (#35)
- Add support for type comments (#36)
Closes: #32
Closes: #33
Closes: #35
Closes: #36
d8c4bfe Change flake8 reported checker name - sco1
Build 20190922.1 succeeded
Requested by
GitHub
Duration
00:05:13
Build pipeline
Site
Is there a reason to specify each one?
**/tests/**:D1,S106,TYP
This JSON type is not comprehensive. For the sake of simplicity, I think it will be better to use Union[List, Dict], or even just Dict if we follow the line of thinking that the Discord API does not return a list for Embed objects.
In this case, normally I would say a more detailed type annotation is reasonable. But if the context is considered, this function is meant to validate data so it may accept any data type. It even checks that each field is of type Mapping so the only implicit type constraint this function has is that fields is iterable.
Does it not overlap with with the normal ignores? I thought it did and in that case it would indeed be all the ones that start with D1.
Postgres backup completed!
The background task we create to update off-topic names at midnight UTC fails if it receives a non-success API response. The reason is that our bot.api_client will raise the bot.api.ResponseCodeError exception on non-success response status codes. This means that the off-topic channel names won't be updated again until either the bot is restarted or the task is started manually again by an admin.
The relevant lines of code:
https://github.com/python-discord/bot/blob/e70c96248bd7b54841...
My reasoning went along the lines of:
- We're validating embed fields here, which, according the Discord API reference, should always have the type
Dict[str, Union[str, bool]]. - The tag validation function itself assumes that you pass an object of this form as well.
However, I think your point is that the purpose of a validation function is to validate if the object we pass in holds those and more stringent constraints. Honestly, I think we/I may be over-complicating this a bit, whi...
Build 20190922.2 succeeded
Requested by
GitHub
Duration
00:02:01
Build pipeline
Site
I'm not really familiar with how Django's bits go together, isn't this validating what's coming out of our DB rather than what's coming from Discord?
We're validating the data that's being received by the API, which obviously comes from the bot and not directly from Discord. When it comes to embeds, it's a json representation of the to_dict method of discord.Embed from discord.py.
I think Dict is good enough here and I agree with @SebastiaanZ we shouldn't over-think this. But along the the lines of the other comment I made, I may as well make the point that since this is a validation function and it also does isinstance(..., Mapping), I think a more technically correct type would be Any or something along those lines.
So...
def validate_tag_embed(embed: Any) -> None:
?
I'm fine with that. If you or anyone else doesn't object then sure.
@jchristgit what are your thoughts?
log.exception(msg) write msg in the log, followed by the full traceback. This PR changes all log.error to log.exception if it's inside a try/except block
This PR closes #382
@Akarys42 Can you make sure you're working from an up-to-date fork? I noticed that your fork is quite some commits behind master. That will make sure we don't run into a lot of merge conflicts and other problems.
6bf8615 Fixed AntiSpam cog reload bug - SebastiaanZ
e160254 Fixed incorrect API request field in superstarify - SebastiaanZ
874cc1b Fix AntiSpam incorrectly invoking tempmute. - SebastiaanZ
00f9858 Add help-6 and help-7 to constants - SebastiaanZ
5303f4c Update bot cog with recent changes. - SebastiaanZ
Build 20190922.1 succeeded
Requested by
GitHub
Duration
00:02:51
Build pipeline
Bot
Build 20190922.2 succeeded
Requested by
GitHub
Duration
00:02:42
Build pipeline
Bot
"""This command will remove the superstarify entry from our database, allowing the user to change their nickname."""
Helper class for internal eval.
Wait for up to `timeout` seconds for a reaction by any of the specified `user_ids` to delete the message.
Build 20190922.5 succeeded
Requested by
GitHub
Duration
00:03:51
Build pipeline
Bot
Though I can probably make a decent guess, I'm not quite sure what a "burst message" and I think the docstring should explain it a little bit.
I think these parameters could use an explanation.
"""
Returns a human-readable version of the relativedelta.
precision specifies the smallest unit of time to include (e.g. "seconds", "minutes").
max_units specifies the maximum number of units of time to include (e.g. 1 may include days but not hours).
"""
More detailed and in the style of built-in exception documentation in Python.
"""Raised when a check fails for a message being sent in a whitelisted channel."""
I don't understand what this means
Build 20190922.6 failed
Requested by
GitHub
Duration
00:02:58
Build pipeline
Bot
Build 20190922.7 failed
Requested by
GitHub
Duration
00:03:03
Build pipeline
Bot
# now
return await ctx.send(...)
# instead do this
await ctx.send()
return
Thus the return type of the command can be None.
Build 20190923.1 succeeded
Requested by
GitHub
Duration
00:01:54
Build pipeline
Site
I don't see this as particularly unclear, and the resulting one-liner for many of them don't fit as single line docstrings.
I don't see this as particularly unclear, and the resulting one-liner for many of them don't fit as single line docstrings.
Build 20190923.1 failed
Requested by
GitHub
Duration
00:02:05
Build pipeline
Bot
Build 20190923.2 succeeded
Requested by
GitHub
Duration
00:02:49
Build pipeline
Bot
034b901 Use a .whl for wiki package instead of git repo. - scragly
e885454 Change back to official python base image, remo... - scragly
90b4bfd Fix shell script name for whl building to refer... - scragly
ffec348 Install pipenv & pyuwsgi before copying project... - scragly
61b2a1c Readdressing Docker Refinement (#257) - scragly
[python-discord/site] branch deleted: docker\-refine2
This is great, thanks!
Build 20190923.2 succeeded
Requested by
GitHub
Duration
00:03:54
Build pipeline
Site
No downtime this time, and best of all, the entire CI for a merge to master took 3:54, down from an avg time of over 7 minutes.

Build 20190923.3 succeeded
Requested by
GitHub
Duration
00:03:56
Build pipeline
Site
Postgres backup completed!
Build 20190923.4 succeeded
Requested by
GitHub
Duration
00:03:01
Build pipeline
Bot
Build 20190923.3 succeeded
Requested by
GitHub
Duration
00:08:05
Build pipeline
Bot
Connected!
@jchristgit You worked on updating the bot side of things to work with the new API, right? IIRC the API itself does support querying for more fields now. Have these new capabilities been transferred to the bot commands too?
Connected!
Build 20190923.5 succeeded
Requested by
GitHub
Duration
00:08:12
Build pipeline
Bot
Connected!
GH actions are approaching a point of maturity where they can be competently leaned on for automated deployment of releases to PyPI.
This project can likely utilize a similar approach proposed by flake8-annotations, which uses the gh-action-pypi-publish action being developed under the PyPA namespace.
Finally, the last major repository to be looked at.
Dockerfile
The base image has been adjusted to use the now-preferred python:3.7-slim debian image, in-line with both site and seasonalbot after their respective refinements.
Closes #420
The Dockerfile has been brought out of it's docker directory as it's the only item within.
Comments have been added to the Dockerfile to encourage stages to be documented if changes occur in future and to aid in ensuring it's easy to...
Build 20190923.6 succeeded
Requested by
GitHub
Duration
00:01:51
Build pipeline
Bot
b7fb725 Fix random text mistake in Dockerfile. - scragly
The reminders cog is currently returning a list of all reminders in the DB rather than those specific to the user.
For example, if I have no reminders created I still get a list of reminders:

Build 20190923.7 succeeded
Requested by
GitHub
Duration
00:01:47
Build pipeline
Bot
dateparser's date parsing is not correctly parsing our expiration duration directives per what's expected by http://strftime.org/:

From limited testing, m and M are both parsed as minutes and y is not correctly parsed as year. Shorter duration directives (e.g. h/H and d/D) are parsed as "expected" (but not case sensitive).
This behavior is consistent across da...
The tests @jchristgit has written for the ExpirationDate make me thing that it's meant to be used on ISO datetime strings like they are returned by our API:
@pytest.mark.parametrize(
('value', 'expected'),
(
# sorry aliens
('2199-01-01T00:00:00', datetime(2199, 1, 1)),
)
)
def test_expiration_date_converter_for_valid(value: str, expected: datetime):
converter = ExpirationDate()
assert asyncio.run(converter.convert(None, value)) == expec...
Build 20190923.8 failed
Requested by
GitHub
Duration
00:02:16
Build pipeline
Bot
Build 20190923.9 succeeded
Requested by
GitHub
Duration
00:02:48
Build pipeline
Bot
Sometimes one may have an idea of what the name of an object/attribute is but not which namespace it's in. It would be helpful to have a command which can return possible matches for a given term. I think the best format would be a paginated embed with a list of all matched names that are hyperlinked to their docs. Perhaps this would need to be a separate command so that the library name can be passed as a separate argument.
This allows to keep the task running even if the call fail.
This PR closes #442
Build 20190923.10 succeeded
Requested by
GitHub
Duration
00:03:07
Build pipeline
Bot
[python-discord/bot] New branch created: duration\-converter\-fix
fba1650 Fix failing duration conversion - SebastiaanZ
The current ExpirationDate converter does not convert duration strings to datetime.datetime objects correctly. To remedy the problem, I've written a new Duration converter that uses regex matching to extract the relevant duration units and dateutil.relativedelta.relativedelta to compute a datetime.datetime that's the given duration in the future.
I've left the old ExpirationDate converter in place for now, since the new Duration converter may not be the most optimal method. However...
Build 20190923.11 succeeded
Requested by
GitHub
Duration
00:02:59
Build pipeline
Bot
Some tests for duplicate units would be good
It would be nicer to format this is a bullet-point list.
Originally I was going to suggest changing the datetime import for the test module because this quite verbose. But, of course, datetime is a sin against PEP8 so it would possibly add confusion if it was imported another way. So I propose you use a parametrised fixture for this, and the fixture takes care of calling fromisoformat. I think a parameterised fixture would be the right way to do that.
Wouldn't that mean that the parametrized fixture would have to yield both the duration string and the datetime object? When you use parametrized fixtures, your test will be run multiple times with all its parameters, once against each of the values yielded by the parametrized fixture.
Is this only because you don't like the verbosity?
I've gone back and forth a couple of times before committing, but i think you're right. It just looks a bit like those parameter lists we don't want to have, but I guess we're dealing with something that's actually better displayed as a pseudo-table.
Yeah, it would mean returning both. It's meant to replace the current parameter decorator.
Is this only because you don't like the verbosity?
Pretty much. Just an idea and I don't feel strongly about it. You don't have to do it if you think it's for the worse.
We need a return if we get a non-ok response code otherwise the channel name edits will also raise an exception
56a365b Allow whitespace in duration strings and update... - SebastiaanZ
I've changed it to use parametrized fixtures.
3691657 Restructure Duration converter docstring - SebastiaanZ
Looks good. You took it a step further and made it easier to add more tests (cause the expected string doesn't need to be calculated by you anymore).
[python-discord/snekbox] New branch created: add\-flake8\-annotations
Build 20190923.13 succeeded
Requested by
GitHub
Duration
00:02:39
Build pipeline
Bot
Build 20190923.1 succeeded
Requested by
GitHub
Duration
00:02:33
Build pipeline
Snekbox
pids: Path = CGROUP_PIDS_PARENT,
mem: Path = CGROUP_MEMORY_PARENT
00e1b0d Fix multiline function definition - sco1
Build 20190923.2 succeeded
Requested by
GitHub
Duration
00:02:22
Build pipeline
Snekbox
I don't see why the space regex couldn't have been * but it's good enough.
[python-discord/snekbox] branch deleted: add\-flake8\-annotations
Build 20190923.3 succeeded
Requested by
GitHub
Duration
00:03:13
Build pipeline
Snekbox
Build 20190923.14 succeeded
Requested by
GitHub
Duration
00:07:38
Build pipeline
Bot
Connected!
I think I might have an idea of what's going wrong, but would welcome folks more django-knowledgable than I to confirm.
Our reminder viewset is currently filtering on user__id, which isn't a field in our reminder model:
Changing the references from user__id to author in the site & bot repos seem to fix the issue
The author field is a foreign key in the model which means it's referencing another record. So the double underscore syntax allows you to do lookups than span relationships. That being said I'm not sure if this is necessary for filters with django-filter.
Ok, with that in mind it seems like changing user__id to author__id in the reminders cog seems to fix the problem, with site untouched.
#449 removes dateparser so we can get rid of that regex doodoo now.
This works fine for exact input(s), but I think the Greedy operator is more harmful than helpful here.
Along with being case-sensitive, it also partially surpresses some of the feedback from invalid parameters and stops parsing if an invalid role is found. I think the desired behavior could be accomplished with something along the lines of *roles: Union[Role, str] and a helper fallback converter (or just a custom converter).
Need typed-ast in install_requires, otherwise someone installing via pip (versus pipenv) will not get it.
LTGM, though that seems like an awful small number of logged exceptions considering the size of the codebase
Almost all log.error are outside of a try/except block, so I can't change them :)
Build 20190924.2 succeeded
Requested by
GitHub
Duration
00:02:40
Build pipeline
Bot
Yes, in these lines:
The provided param should be author__id not user__id.
Postgres backup completed!
I added a continue instead of a return to keep the code running
[python-discord/bot] New branch created: rich\-embed\-false\-positive\-fix
b3ebca5 Prevent false-positives of the rich embed filter - SebastiaanZ
Rich Embed Filter Changes
The rich embed filter is plagued by false positives now Discord has added more custom preview embeds for various websites. Since these embeds have the rich type instead of the link type, they triggered the filter we have in place.
This commit remedies that by using the existing URL regex pattern to list all the URLs contained in the message content and then checking if the embed url is a member of that list. If so, it's very likely
that the embed was au...
Build 20190924.3 succeeded
Requested by
GitHub
Duration
00:03:05
Build pipeline
Bot
[bot] Branch rich\-embed\-false\-positive\-fix was force-pushed to `072a0a6`
Build 20190924.5 succeeded
Requested by
GitHub
Duration
00:02:43
Build pipeline
Bot
This looks promising, although it won't work in the current form. See my review comment.
From a more meta-perspective, one consequence this approach will have is that if we fail to update the off-topic names due to some temporary outage, they won't be updated until we hit the next UTC midnight. This is not that bad, but we could also think of rescheduling the name change, say, half an hour later if it fails instead of waiting a whole day to try again.
That said, the current changes will...
This won't work, since you're now trying to access the api attribute of the Bot object with the name bot, not the bot.api module:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 9, in func
File "/home/sebastiaan/pydis/repositories/djangobot/bot/cogs/off_topic_names.py", line 56, in update_names
except bot.api.ResponseCodeError as e:
AttributeError: 'Bot' object has no attribute 'api'
...
Build 20190924.6 failed
Requested by
GitHub
Duration
00:01:56
Build pipeline
Bot
Import error fixed and waiting time reduced to half an hour if an exception occurred.
Sorry I didn't accepted your changes but the fix has been done because of github mobile stupid UI :)
Build 20190924.7 succeeded
Requested by
GitHub
Duration
00:02:51
Build pipeline
Bot
Build 20190924.8 succeeded
Requested by
GitHub
Duration
00:01:44
Build pipeline
Bot
Build 20190924.9 succeeded
Requested by
GitHub
Duration
00:01:48
Build pipeline
Bot
Looks good, works super good, all good
Using sudo makes it use Python 2.7 because I suppose the PATH is different for the root user. This can be confirmed by looking at the logs and seeing Python 2.7 in the directories. I suppose it's fine for pipenv to be installed for 2.7 but it just seems unnecessary to even use sudo.
Agreed. I left it in due to there being a previous commit explicitly adding it, but we don't use it elsewhere. This is an anomaly.
d91beca Remove unnecessary sudo for pipenv install. - scragly
Build 20190924.10 succeeded
Requested by
GitHub
Duration
00:01:40
Build pipeline
Bot
fe9efe6 Reformat indents, use Docker@2 task for azure i... - scragly
6a2d6b9 Pin dependencies, pre-build regex pkg. - scragly
8755a93 Add a dev-only compose for new devs who don't h... - scragly
5fdaced Remove unneeded Pipfile scripts and azure stage... - scragly
4f11cbb Add docker build condition for CI. - scragly
Hey @Akarys42,
Your general fix is very solid, thanks.
The retry approach works well as well, but we had a conversation about the OffTopicNames cog in the core-dev team and decided that we currently don't want to use retry logic for the off-topic names. I know I was the one who suggested it in the first place, but could you remove it from your PR?
The main reason is that we're thinking of an alternative approach for the entire cog, now that we've got access to features like the new d...
Build 20190924.11 succeeded
Requested by
GitHub
Duration
00:03:34
Build pipeline
Bot
Connected!
As tangentially referenced in https://github.com/python-discord/bot/issues/445, the API will silently ignore any invalid fields when filtering the values to return. I think it might be a better idea to reject GET requests with invalid fields in order to avoid, say, dumping the entire infraction list into the response if one of the more broad filters is incorrectly specified.
Build 20190924.12 succeeded
Requested by
GitHub
Duration
00:01:49
Build pipeline
Bot
Build 20190924.13 succeeded
Requested by
GitHub
Duration
00:03:22
Build pipeline
Bot
Connected!
Build 20190924.14 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
[python-discord/bot] branch deleted: rich\-embed\-false\-positive\-fix
[python-discord/bot] New branch created: all\-the\-shields
Build 20190924.15 succeeded
Requested by
GitHub
Duration
00:03:33
Build pipeline
Bot
Connected!
Build 20190924.16 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
Connected!
Build 20190924.17 succeeded
Requested by
GitHub
Duration
00:03:24
Build pipeline
Bot
Build 20190924.1 succeeded
Requested by
GitHub
Duration
00:04:25
Build pipeline
Site
0576b70 Make API return infraction list with newest first - SebastiaanZ
b03685f Refine Dockerfiles - scragly
9ce9b95 Add PIP and PIPENV Environmental Variables - scragly
1a89e25 Add PIP and PIPENV Environmental Variables to p... - scragly
a1d6ba1 Remove EXTRAS ARG as pip extras isn't used anym... - scragly
Build 20190924.2 succeeded
Requested by
GitHub
Duration
00:01:55
Build pipeline
Site
Build 20190924.18 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
Build 20190924.19 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
Build 20190924.20 succeeded
Requested by
GitHub
Duration
00:03:26
Build pipeline
Bot
Connected!
Build 20190924.1 failed
Requested by
GitHub
Duration
00:00:30
Build pipeline
Snekbox
[python-discord/bot] New branch created: hemlock\-change\-note\-type
d3fbe8f Note Type Correction - LordHemlock
- In the database, notes were being listed as "warnings" despite having a type specifically for them. Changed it so that notes are now listed as the proper type.
Signed-off-by: Daniel Brown browndj3@gmail.com
Build 20190924.21 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
Build 20190924.22 succeeded
Requested by
GitHub
Duration
00:03:38
Build pipeline
Bot
Connected!
Build 20190924.3 succeeded
Requested by
GitHub
Duration
00:04:49
Build pipeline
Site
Badge is actioned by https://github.com/python-discord/site/commit/2cbc302f3bea9e3930859b644cdf093ee8973e99
For "coverage in pull requests" do you mean a GH bot integration?
This looks pretty well implemented now, any reason to keep this open?
#187 and #217 are kind of related to this so if anything we are probably moving focus to those issues at this point. @jchristgit can you comment on the status of this issue?
Connected!
If I'm correctly interpreting the intent of this issue as alleviating pains for local dev, I think the functionalilty introduced by #444 meets the spirit of this issue.
With this repository now providing the postgres backend via docker-compose, contributors are able to competently work on the bot solely from its own repo. As far as I can tell this provides a viable cross-platform experience with minimal additional setup (e.g. getting the bot token from the API) and no reliance on getting t...
We've talked on and off about the third bullet point (submit images for infractions) but I don't think a consensus has been reached. Do we need this?
Looks like the only remaining action on this is to reduce the spacing of the embed.
A couple minor things to do and this should be good to formally try out:
- [ ] Pin the release action to a tagged release rather than
master(alpha was released a few hours prior to this comment) - [ ] Trigger on a release creation rather than a tag. In addition to this being a bit cleaner code-wise, it should be a more reliable method
I don't think so. It could be useful to document DM conversations better, but I've never really missed it as a feature. You can usually retrieve the relevant context/screenshot using the chat history itself, located based on the infraction date.
As far as I know, the implementation in the moderation cog hasn't changed: a moderator can search for infractions based on the user or the reason (with regex support). @scragly is planning on rewriting the moderation cog, which is probably a good time to look into improving the search capabilities as well.
Postgres backup completed!
The new Infraction model has a specific type field option for notes that we recently started using (python-discord/bot#452). This means that we're now storing notes as "note" in the database and no longer use the misnomer of "hidden warning".
However, there are still a lot of "hidden warning" infractions in the database that were set prior to merging the PR referenced above. I th...
When the need for taking notes arose, we started using "shadow warnings" to be able to record a note without sending a notification to the user. Since the latter is a misnomer for the former, we decided to create a separate infraction type in the back-end for notes, "note", and we recently started using it (see #452).
I think it's a good idea to completely remove the association between warnings and notes and treat them as completely different infraction types by removing the `"shadowwar...
[python-discord/bot] New branch created: minor\-moderation\-mods
This PR addresses the following issues:
- #318: Remove permanent mutes & add them as aliases of their respective tempmutes
- #325: Remove infraction reason from confirmation message
- #453: Decouple notes and warnings by removing the "shadow warning" aliases
And a Kaizen:
- #385: Unhide the
!tagscommand
I made these changes on a computer without Docker capabilities so I'm going to leave this as a draft until I can test this evening.
Build 20190925.1 succeeded
Requested by
GitHub
Duration
00:01:46
Build pipeline
Bot
[python-discord/flake8-annotations] branch deleted: v1\.1\.0\-dev
[python-discord/flake8-annotations] New tag created: v1\.1\.0
[python-discord/flake8-annotations] New branch created: v1\.1\.1\-dev
94df3d3 Add pipenv-setup CI check for synchronization o... - sco1
[python-discord/bot] New branch created: hemlock\-free\-fix
- Fixed bug where if two channels had the same last message timestamp the command would error out.
Closes issue #401
Signed-off-by: Daniel Brown browndj3@gmail.com
Build 20190925.2 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
This is getting a bit messy now with the key. At this point it'd be cleaner to assign the output of sorted() to a variable on a separate line and then use the variable inside enumerate().
Build 20190925.3 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
Any reason for using a lambda instead of operator.itemgetter(0) here? If you import itemgetter from operator, we wouldn't need a lambda function:
sorted_channels = sorted(free_channels, key=itemgetter(0), reverse=True)
Well, I don't care either way but one reason to use a lambda is because nothing needs to be imported.
Is there a specific benefit to using the itemgetter vs not needing the import and using a lambda? And honestly the reason I did the lambda was because I forgot about that itemgetter
Personally, I think that itemgetter here is more idiomatic and lambdas shouldn't be used in these types of situations. That said, the channel lists are relatively small, so the performance benefit of itemgetter does not make a significant difference for us. I do think it's an improvement for the code style, though.
That's fair. Yeah for the sake of consistent style I'll swap it over
5c1f56d Swapped Lambda for itemgetter - LordHemlock
Build 20190925.4 succeeded
Requested by
GitHub
Duration
00:01:46
Build pipeline
Bot
Tested and everything seems to be in order.
For example, !help Moderation returns
AttributeError: 'Command' object has no attribute 'instance'
Have not looked into the cause of this yet.
[python-discord/bot] New branch created: infraction\-edit\-merge
Closes #349.
Some things to note:
- If the duration converter fails, the argument will instead be considered part of a reason. Therefore a typo like
!infraction edit 1337 50(missing a unit for the duration) will make the reason50and expiration unchanged. - The new reason is no longer displayed in the confirmation message. This is similar to #325.
- The two old commands are gone. Only
infraction editcan be used. - Expiration for all infractions can still be edited, even on...
Build 20190926.1 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
Connected!
Build 20190926.2 succeeded
Requested by
GitHub
Duration
00:03:33
Build pipeline
Bot
Some things to note:
* If the duration converter fails, the argument will instead be considered part of a reason. Therefore a typo like `!infraction edit 1337 50` (missing a unit for the duration) will make the reason `50` and expiration unchanged. * The new reason is no longer displayed in the confirmation message. This is similar to #38
Your solution looks smart.
I'm debating with myself whether or not I should even add, so take this suggestion with a pinch of...
In a slightly, let's call it "interesting", vote and debate with the moderation team, we decided that we want to display infraction datetime strings in an ISO-like string ("%Y-%m-%d %H:%M"), like here:
This has not been consistently changed throughout the cog, yet, and many occurrences of %c still exist. Nevertheless, I think we should strive for consistency and use the n...
One small datetime string thing.
Your current code does not give feedback when the duration was not changed.
Not explicitly. But if the "confirmation message" that is sent afterwards does not mention the duration but only the reason, then one can assume the duration did not change. Just want to be clear: are you saying that is not adequate? If that's the case, then sure I can agree to this:
A solution would be to always indicate if the duration field was touched, change or not.
Yeah he's saying that in this section:
the absence of feedback could be seen as feedback itself, but with the above perspective in mind, we now have to rely on human memory for the actor to spot that something that should have been there is not.
A little convoluted to read, but the meaning is there haha.
I agree explicit feedback is best for now.
Too bad we can't really mix "just" comments and requested changes, so I've added this as a separate comment.
Yesterday (for me) we briefly talked about being able to set exact dates instead of a relative duration for the expiration field. I've checked and I've not seen it used, so I'm not married to it. If we do want it, I may be better to have a separate converter that converts datetime strings of a certain format to a datetime instead of creating a hybrid one that both parses relative du...
Exact dates could be handy for underage bans.
Postgres backup completed!
may be better to have a separate converter that converts datetime strings of a certain format to a datetime instead of creating a hybrid one that both parses relative durations and absolute datetime strings.
I agree. I came to that conclusion too as I started working on this. I'm not sure if this would be good to implement in this PR or in another.
I could just knock these all out in this PR cause it's only for moderation stuff, right?
I think it's fine to add an issue ticket instead, yeah. It's not specifically needing to be within the scope of this issue.
The Django rewrite introduced a new type of infraction: the note infraction; this new infraction type replaced the misnomer "hidden warnings". To retroactively apply this to historical infractions, the Django migration script stored all infractions that were stored as "hidden warnings" in the old database as notes in the new database. So far, so good.
Unfortunately, the new Django bot still sent notes as "hidden warnings" to the API, until this was corrected by python-discord/bot#452. Th...
Build 20190926.1 succeeded
Requested by
GitHub
Duration
00:02:22
Build pipeline
Site
Raw text in editor:
1. Clone your forked repository using `git clone` followed by your fork's Git URL.
```
$ git clone https://github.com/kosayoda/seasonalbot
```
2. Once cloned, change your working directory to the repository:
```
$ cd seasonalbot
```
Intended output:
- Clone your forked repository using
git clonefollowed by your fork's Git URL.
$ git clone https://github.com/kosayoda/seasonalbot
- Once cloned, change your working directory ...
Build 20190926.3 succeeded
Requested by
GitHub
Duration
00:01:50
Build pipeline
Bot
Done, for the most part. All infraction time formats should now be consistent. The only exception is for watch channels, which has a similar format but with seconds included too. Was not sure if that should be touched.
Yesterday (for me) we briefly talked about being able to set exact dates instead of a relative duration for the expiration field. I've checked and I've not seen it used, so I'm not married to it. If we do want it, I may be better to have a separate converter that converts datetime strings of a certain format to a datetime instead of creating a hybrid one that both parses relative durations and absolute datetime strings.
I currently see not no real use for it, though, although it coul...
I've tested my changes and all is good. ๐
Build 20190926.4 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
Connected!
Build 20190926.5 succeeded
Requested by
GitHub
Duration
00:03:26
Build pipeline
Bot
It can be replaced, as far as I'm concerned. There's a utility function in the WatchChannel ABC that's used by the talentpool cog for a display that's very similar to the infraction search output. Originally, I had the idea of promoting that local utility function into a general one, but you've already taken care of that now.
The only thing left is testing, but you've probably thought of that as well. I guess we need to wait for #421 for that.
8164717 Use format_infaction datetime util in talentpool - SebastiaanZ
I've replaced it by the new utility function.
Build 20190926.6 succeeded
Requested by
Sebastiaan Zeeff
Duration
00:03:25
Build pipeline
Bot
Connected!
Build 20190926.7 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
Build 20190926.8 succeeded
Requested by
Sebastiaan Zeeff
Duration
00:03:31
Build pipeline
Bot
Connected!
Our current condition for building and pushing the docker container to docker hub only checks the build is not a PullRequest (disregarding testing):
This means that a manually triggered build (e.g., when a build fails to run for some reason and you trigger it yourself) for any branch, it will automatically build, push, and deploy the container. (This just happened...)
...
I've created a new draft based on some input from @scragly
name: Publish to PyPI
on:
release:
types: [created]
jobs:
build:
name: Build dist & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install build dependencies & build
run: |
python -m pip install --upgrade pip
pip ins...
I don't think there's much of an impending need to action this issue so will close for now.
485b49b Fix AttributeError with cog special methods - MarkKoz
4881148 Merge infraction edit commands - MarkKoz
1685d67 Display "Permanent" in mod log for edited infra... - MarkKoz
7d9db39 Show when field is unchanged in infraction edit... - MarkKoz
666df81 Add utility function to consistently format inf... - MarkKoz
[python-discord/bot] branch deleted: infraction\-edit\-merge
Build 20190927.1 succeeded
Requested by
GitHub
Duration
00:03:31
Build pipeline
Bot
Connected!
This looks like an artifact of async that disappeared when rewrite was merged into master. Our previously pinned version had this attribute, but it's not present in 1.0.0+.
[python-discord/bot] New branch created: help\-fix
Good catch. It looks like the attribute was just renamed to cog.
Per #456, the !help raises an AttributeError when fetching information for Cogs due to referencing of an attribute that is no longer present in d.py. The no longer present instance attribute has been replaced with cog_name .
This also kaizens in a fix for some incorrect kwargs in one of the watchchannel cog's mod log invocations.
Closes #456
Build 20190927.2 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
[python-discord/bot] New branch created: update\-flake8\-annotations
f598e10 Update flake8-annotations & fix missing lints - sco1
flake8-annotations v1.1 was recently released, which includes a fix for incorrect parsing of nested functions.
This PR updates the dependency pinning & fixes the trio of annotations that were missed previously.
Build 20190927.3 succeeded
Requested by
GitHub
Duration
00:01:35
Build pipeline
Bot
Build 20190927.4 succeeded
Requested by
GitHub
Duration
00:01:32
Build pipeline
Bot
3821736 Update flake8-annotations and flake8-bandit pin... - sco1
[python-discord/site] New branch created: update\-flake8\-annotations
This PR updates some of our dependency pinning
flake8-annotationsv1.1 was recently released, which includes a fix for incorrect parsing of nested functions. No additional linting necessary.flake8-bandithas been unpinned from v1.0.2 & brought back up to current. The issue that forced the earlier downgrade has been resolved upstream inbandit.
I'm leaving this as a draft so #218 can be addressed in this PR as well. Can...
Build 20190927.1 succeeded
Requested by
GitHub
Duration
00:01:58
Build pipeline
Site
[python-discord/snekbox] New branch created: update\-flake8\-annotations
6cea73e Update flake8-annotations dependency pinning - sco1
flake8-annotations v1.1 was recently released, which includes a fix for incorrect parsing of nested functions.
This PR updates the dependency pinning, no linting changes required.
Build 20190927.1 failed
Requested by
GitHub
Duration
00:02:05
Build pipeline
Snekbox
[python-discord/bot] New branch created: moderation\-cleanup
282e446 Remove unused moderation utility functions - MarkKoz
c2e6ffa Make respect_role_hierarchy a decorator - MarkKoz
ad572e9 Support positional target arg for respect_role_... - MarkKoz
f0a4fc4 Raise ValueError in respect_role_hierarchy inst... - MarkKoz
05ae947 Adjust type annotations of decorators - MarkKoz
Build 20190927.5 succeeded
Requested by
GitHub
Duration
00:01:38
Build pipeline
Bot
Build 20190927.2 failed
Requested by
GitHub
Duration
00:02:05
Build pipeline
Snekbox
Build 20190927.6 succeeded
Requested by
GitHub
Duration
00:01:37
Build pipeline
Bot
Postgres backup completed!
[python-discord/bot] branch deleted: update\-flake8\-annotations
[python-discord/bot] New branch created: build\-docker\-on\-master\-only
38b90a1 Ensure docker containers are published only for... - scragly
Build 20190927.7 succeeded
Requested by
GitHub
Duration
00:03:45
Build pipeline
Bot
Connected!
Build 20190927.9 succeeded
Requested by
GitHub
Duration
00:01:40
Build pipeline
Bot
[python-discord/site] New branch created: build\-docker\-on\-master\-only
1b57cf4 Ensure docker containers are published only for... - scragly
Build 20190927.2 succeeded
Requested by
GitHub
Duration
00:02:05
Build pipeline
Site
Build 20190927.10 succeeded
Requested by
Sebastiaan Zeeff
Duration
00:01:38
Build pipeline
Bot
[python-discord/bot] branch deleted: build\-docker\-on\-master\-only
[python-discord/site] branch deleted: build\-docker\-on\-master\-only
Build 20190927.11 succeeded
Requested by
GitHub
Duration
00:03:48
Build pipeline
Bot
Build 20190927.3 succeeded
Requested by
GitHub
Duration
00:04:16
Build pipeline
Site
Build 20190927.12 failed
Requested by
Leon Sandรธy
Duration
00:01:22
Build pipeline
Bot
Connected!
Build 20190927.13 succeeded
Requested by
GitHub
Duration
00:03:42
Build pipeline
Bot
Build 20190927.3 failed
Requested by
GitHub
Duration
00:01:46
Build pipeline
Snekbox
cog_name the wrong attribute for Cogs (but not for Commands) and will raise an error
name=cog.qualified_name,
commands=[c for c in self._bot.commands if c.cog_name == cog.qualified_name]
More akin to what was there before
commands=[c for c in self._bot.commands if c.cog is cog]
Which of these two suggestions are intended?
Under what circumstance does this raise an exception?
It's an AttributeError. So almost always whenever a cog name is given to the help command (in my testing Moderation still worked for some reason).
Either one. Sorry, I'll add some more context. The latter one would be nicer except that the cog attribute is undocumented. Supposedly it would still be considered a "breaking change" were it to be renamed or removed by discord.py.
Weird, worked fine when I was looking:

Build 20190927.14 succeeded
Requested by
GitHub
Duration
00:01:39
Build pipeline
Bot
Tested it on my env and it adjusted the hidden warning I had previously. Also I don't believe we have to worry about any hidden warnings or the like as there isn't a way to force an infraction to be one way or the other besides via the Admin page on the site. And the bot itself has been corrected so that Notes are now the proper type.
I've done up a custom manage.py to suit a few custom purposes and to help aid a simplified development setup without resorting to additional shell scripts.
The SiteManager will handle preparing the server before running the correct process to serve the site based on if it's in a production or development environment.
In a development environment, the --debug flag is used to run. This adds the DEBUG environmental variable, the PostgreSQL database is checked that it's ready first befo...
Build 20190927.4 succeeded
Requested by
GitHub
Duration
00:02:00
Build pipeline
Site
At this point, moderation and watch channel commands already check if infractions exist before carrying them out. Closed in favour of #362
b17a8aa Add general function for sending infraction mes... - MarkKoz
c2dc428 Use send_messages function in infraction commands - MarkKoz
73727c9 Use lowercase infraction types - MarkKoz
1b24797 Format infraction timestamp inside send_messages - MarkKoz
e850570 Rework send_messages to actually apply the infr... - MarkKoz
Build 20190927.15 succeeded
Requested by
GitHub
Duration
00:01:33
Build pipeline
Bot
Build 20190927.5 succeeded
Requested by
GitHub
Duration
00:01:58
Build pipeline
Site
The infraction search and edit commands should be separated from the moderation cog and put into a new cog. Should both the moderation and the new cog be moved into a moderation-related subpackage (moglog could go in there too)? If so, what would the package be named and what would the modules (yes, I mean the modules, not the cog classes) be named? Would the contents of utils/moderation.py be moved to the subpackages __init__?
where the data load from for the calender?
Should i make a modelform to add events?
Build 20190928.1 succeeded
Requested by
GitHub
Duration
00:01:36
Build pipeline
Bot
Postgres backup completed!
Connected!
Connected!
I can understand the logic behind splitting the moderation cog up to make it more manageable in the files, but having to put infr search and edit into an entirely different command category (user-facing) doesn't make much sense to me. Infraction management fits perfectly under the category of "Moderation", so I'm not sure I'm a fan.
Build 20190928.2 succeeded
Requested by
GitHub
Duration
00:03:35
Build pipeline
Bot
Connected!
Build 20190928.1 succeeded
Requested by
GitHub
Duration
00:01:57
Build pipeline
Site
Build 20190928.2 succeeded
Requested by
GitHub
Duration
00:01:53
Build pipeline
Site
OK, that's fine. I don't really care for splitting the cogs. Really I just want to split the code - the modules. It could be implemented in such a way that it's one cog but two modules.
[python-discord/site] New branch created: wiki\-static\-images
95e3fc7 Add static images for wiki contributing guides - kosayoda
This PR adds images intended for the contributing guides hosted here: Python Discord: Contributing.
Build 20190928.3 succeeded
Requested by
GitHub
Duration
00:01:47
Build pipeline
Site
What kind of name is hihi.png?
Good point about the hihi.png name, it's not very descriptive. But the issue here is that it's a full workspace including a semi private channel in discord lol.
Build 20190928.4 succeeded
Requested by
GitHub
Duration
00:01:52
Build pipeline
Site
Build 20190928.5 succeeded
Requested by
GitHub
Duration
00:03:51
Build pipeline
Site
What would happen if the container crashed? Would this just perpetually wait or would it raise an exception that isn't socket.error?
Won't it replace the token if the existing token does not match? Does this really mean "existing bot token found but it's been replaced anyway"?
Why would setting this also be dependent on verbosity? Does this environment variable affect verbosity?
is_new covers all cases where the default token doesn't match or doesn't exist in the first place.
else is only if the token actually is a match and truly wasn't recreated.