Build 20200112.12 succeeded
Requested by
GitHub
Duration
00:02:52
Build pipeline
Bot
1 messages ยท Page 40 of 1
Build 20200112.12 succeeded
GitHub
00:02:52
Bot
Connected!
Build 20200112.13 succeeded
GitHub
00:01:39
Bot
90b8a8f Make sure description is truncated to max 1000 ... - Numerlor
2b032a3 Rename last_paragraph_end variable to a more fi... - Numerlor
1da2c04 Move comment into if body - Numerlor
2227c87 Merge branch 'master' into doc-fix - MarkKoz
48041b8 Merge pull request #715 from Numerlor/doc-fix - MarkKoz
Build 20200112.14 succeeded
GitHub
00:03:18
Bot
Connected!
7805f8a Track command completions. - jchristgit
Build 20200112.15 succeeded
GitHub
00:01:33
Bot
This doesn't handle enough cases, why not use this?
Cases I mean are like !a b c or deeper.
b0b9cdd Use parent path properly. - jchristgit
Build 20200112.16 succeeded
GitHub
00:01:36
Bot
Build 20200112.17 succeeded
GitHub
00:03:06
Bot
Connected!
82d2d5d Track command completions by user. - jchristgit
Build 20200112.18 succeeded
GitHub
00:01:28
Bot
this string is difficult to understand. Can we try to reduce the number of consecutive by's a little? Surely there must be a better way to phrase this.
99088f1 Use commas instead of by. - jchristgit
Build 20200112.19 succeeded
GitHub
00:01:44
Bot
Postgres backup completed!
Currently, the !docs command is completely broken as intersphinx is unable to form a proper request. I haven't looked deeply into the issue yet, but it seems like there's an internal error in how intersphinx forms the request. The user_agent of the config it passes does not seem to exist, while requests expects such an attribute to be there:
Jan 13 08:09:17 Bot: | bot.cogs.error_handler | ERROR | Error executing command invoked by Ves Zappa#3787: +docs refr...
Another option would be the recent version bump of sphinx to 2.3.1 in the latest commit to master. While our requests version should be compatible (according to the setup.py of sphinx), maybe it actually isn't. I'll try to revert locally to see what happens.
The latest version of sphinx included a default value for the user_agent, making it a required argument of the config.
Our current way to make a config is a simple python object with attributes assigned to it, which wasn't updated accordingly.
https://github.com/python-discord/bot/blob/ae9018eeb7c6470da6b5d157855d2e8c17071051/bot/cogs/doc.py#L105-L114
Thanks. Adding a user_agent attribute does seem to fix this.
Adds an user_agent to the sphinx mock config and replaces dummy classes with SimpleNamespaces which are used for a global mock app.
fixes: #727
Build 20200113.1 succeeded
GitHub
00:01:49
Bot
Build 20200113.3 succeeded
GitHub
00:01:54
Bot
Build 20200113.2 succeeded
Leon Sandรธy
00:03:23
Bot
Connected!
Build 20200113.4 succeeded
GitHub
00:03:34
Bot
Connected!
Build 20200113.1 succeeded
GitHub
00:01:58
Site
Thanks! for the review. I will work on the changes.
Build 20200113.2 succeeded
GitHub
00:02:34
Site
Build 20200113.3 succeeded
GitHub
00:02:20
Site
89b8575 Sync tests: test instantiation fails without ab... - MarkKoz
9790868 Sync tests: create a Syncer subclass for testing - MarkKoz
10a74f1 Sync tests: test that _send_prompt edits messag... - MarkKoz
9635ffe Sync tests: test that _send_prompt gets channel... - MarkKoz
11edd3e Sync tests: test _send_prompt fetches channel o... - MarkKoz
Build 20200113.5 succeeded
GitHub
00:01:50
Bot
I believe this is ready for review. I'm not very familiar with Django (let alone the REST framework module), nor am I very familiar with testing overall, but I tried to model my efforts after the examples already present for other ViewSets.
I'll be happy to make any changes necessary, thanks for your time!
Build 20200113.4 succeeded
GitHub
00:02:02
Site
Hmm, did you forget to push, or am I looking at old code here? Constants are still here.
:shipit: :shipit: :shipit: :shipit: :shipit:
Build 20200113.5 succeeded
GitHub
00:05:10
Site
Build 20200114.1 failed
GitHub
00:01:14
Site
Postgres backup completed!
Build 20200114.1 succeeded
Joseph Banks
00:03:35
Bot
Connected!
Build 20200114.2 succeeded
GitHub
00:02:35
Site
Build 20200114.2 succeeded
GitHub
00:03:52
Bot
Connected!
Build 20200114.3 succeeded
GitHub
00:01:40
Bot
Code-wise this looks great!
Shortly before a merge, we need to update the whitelist to match what's currently in the bot's configuration file, since the data migration and the configuration file have drifted apart a bit since the PR was opened. I think that should wait until the second review though (or with a second data migration after merge).
Connected!
that was me, ignore
Connected!
Postgres backup completed!
Basic support for handling custom user activity (status?) was added by #648 (Parent: #647) after Discord introduced the feature. However, this seems to be broken for the case where a user sets an emoji as their status without any accompanying text:

In this scenario, activity.status is None, which causes discord.utils.escape_markdown to raise the above exception, as it's ex...
76f9762 Fix user command error for empty custom status - sco1
In the scenario where a user has a custom status set to only an emoji & blank text value, their activity status is set as None, which causes discord.utils.escape_markdown to raise an exception, as it's expecting something string-like.
We can guard against this by checking for a None value & skipping the markdown escape if necessary.
Closes #729
Build 20200116.1 succeeded
GitHub
00:01:52
Bot
Build 20200116.2 succeeded
GitHub
00:01:42
Bot
c2af146 Add constants for voice state logging - MarkKoz
58e13c1 ModLog: log voice state updates - MarkKoz
cecf84e ModLog: use Unicode arrow when displaying value... - MarkKoz
e2075a6 ModLog: make voice state event respect ignored ... - MarkKoz
5716082 ModLog: exclude most channel attributes from vo... - MarkKoz
Build 20200116.3 succeeded
GitHub
00:03:30
Bot
Connected!
Build 20200116.4 succeeded
GitHub
00:01:49
Bot
d8a9261 Add FetchedUser to convert ids of absent users ... - manusaurio
051565d Remove pointless comma after last argument - manusaurio
2798e2d Add post_user function to POST a new user to ... - manusaurio
447de16 Make post_infraction try to post_user if user... - manusaurio
e9ed644 Refactor minor details in post_infraction - manusaurio
Connected!
Build 20200116.5 succeeded
GitHub
00:03:17
Bot
Postgres backup completed!
c2af146 Add constants for voice state logging - MarkKoz
58e13c1 ModLog: log voice state updates - MarkKoz
cecf84e ModLog: use Unicode arrow when displaying value... - MarkKoz
e2075a6 ModLog: make voice state event respect ignored ... - MarkKoz
5716082 ModLog: exclude most channel attributes from vo... - MarkKoz
Build 20200116.6 succeeded
GitHub
00:01:24
Bot
Build 20200116.7 succeeded
GitHub
00:02:53
Bot
Connected!
Postgres backup completed!
fbb7eb3 Add configuration option for conditional TYP200... - sco1
Postgres backup completed!
As noticed in the recent CI failure, flake8 is raising a configuration option conflict when attempting to add the newly inserted configuration option:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.6.9/x64/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/opt/hostedtoolcache/Python/3.6.9/x64/lib/python3.6/runpy.py...
Per the upstream issue, this seems to be an issue with entrypoints, as the issue disappears when flake8 is installed from the master branch rather than from PyPI. flake8 is switching from entrypoints to importlib_metadata.
Short term, this should be a simple resolution of adjusting the Azure pipeline config to utilize flake8 vs. python3 -m flake8. I'd rather go with this approach than pinning flake8 away from PyPI.
10dcbc5 Update Azure config to use flake8 entry point - sco1
a6b378b Add parsing support for the --suppress-none-re... - sco1 [107636e`](https://github.com/python-discord/flake8-annotations/commit/107636e37e3e3c09427db58a7ebe59c090e5d6ec) Bump ver, update readme, update dev dependencies - sco1
Postgres backup completed!
f2ce7dd Add handling & tests for explicit None returns - sco1
--suppress-none-returning configuration option to suppress TYP200 level errors for functions that either lack a return statement or only explicitly return None.This release adds the --suppress-none-returning configuration option, as requested by #41. If this flag is set, TYP200-level errors are suppressed for functions that meet one of the foll...
1945dbe Update pipenv references to poetry - sco1
1c1d35a Update GH workflow to utilize Poetry - sco1
I'd like to propose for discussion migrating the management of the developer environment from Pipenv to Poetry.
I will state up front that there is no major advantage to making this switch, but rather a collection of minor differences that contribute to what I believe is an overall improvement for the developer. In the fairly recent past PyDis looked into migrating all of the repositories to Poetry, as at the time ...
I think with the libs, poetry does make a lot more sense than using pipenv. We're still getting the benefits we want, the only prior concern was with cli entrypoint scripts, however considering you only really need to invoke a module for the existing ones (flake8 instead of lint, etc), there's no significant reason to worry about the loss.
Postgres backup completed!
4884181 Bump typed-ast from 1.4.0 to 1.4.1 - dependabot-preview[bot]
Bumps typed-ast from 1.4.0 to 1.4.1.
Commits
a834bc1 Release version 1.4.1
c6bf09c Fix build on cpython (3.9) master branch (#128)
6b109b6 Build artifacts for 3.8 (#127)
d0908cf Clean up old build scripts (#123)
63adaee Bump version to 1.4.1.dev0
See full diff in compare view
[ reason string, causing the command set the first word as the reason, if specified, or raising an error if the first word contains an apostrophe:
Changing to:
@command(name="superstarify", aliases=("force_nick", "star"))
async def superstarify(
sel...
d750edf Change process time limit from 2 seconds to 5 s... - jos-b
Build 20200124.1 succeeded
GitHub
00:05:39
Snekbox
Postgres backup completed!
Postgres backup completed!
Postgres backup completed!
This PR introduces a series of unit test cases for the bot's antispam rules. This addresses the following issues.
Closes #595 via 1f17d0e.
Closes #596 via b0713be.
Closes #597 via f15f318.
Closes #598 via 4bfe30d.
Closes #603 via f32ffaf.
I also sneak in a quick bugfix in 4199b12: it appears that the already existing rule for attachments contains a slight bug where in the printout, the configured 'max' key is looked up instead of 'interval'. The same commit also fixes the key in...
Build 20200126.1 succeeded
GitHub
00:02:04
Bot
Hi @alberthdev, are you still planning to work on this? I currently have a #733 open which adds test cases for antispam rules. I could sneak this one in as well.
Hi @alberthdev, could we get a status update on this?
Postgres backup completed!
b7b3d8d Bump pipenv-setup from 2.2.4 to 3.0.1 - dependabot-preview[bot]
Bumps pipenv-setup from 2.2.4 to 3.0.1.
Release notes
Sourced from pipenv-setup's releases.
Minor Bug Fix
Colorama dependency corrected from ~=0.4.3 to ~=0.4
Python 3.4 support dropped
Python 3.4 has reached end of life in 2019. Support for python 3.4 is dropped now as some of our dependencies has dropped support for it.
Minor Bug Fix
allow sync to work in the absence of lockfile if --pipfile flag is supplied
Commits
f2b9a98 Update setup....
I could try this if that's okay.
Blocking this for now, as this is not a critical fix & the move to Poetry proposed by #61 would remove this dependency.
Currently, the bot paginator raises a RuntimeError if the string it's attempting to paginate exceeds the defined page size:
def add_line(self, line: str = '', *, empty: bool = False) -> None:
"""
Adds a line to the current page.
If the line exceeds the `self.max_size` then an exception is raised.
This function overrides the `Paginator.add_line` from inside `discord.ext.commands`.
It overrides in order to allow us to configure the maximum number of lines ...
Postgres backup completed!
Build 20200128.1 succeeded
GitHub
00:02:03
Bot
The committed code is considered ready for review. I'm currently awaiting a response from a user in #599 - if they're no longer interested, I'd like to include that issue in this PR's scope as well.
Postgres backup completed!
Build 20200129.1 succeeded
GitHub
00:01:27
Bot
Postgres backup completed!
Let's discuss:
fetch_members and/or fetch_roles could have use somewhere. Perhaps it was in the watch channel cog.utils.sleep_until...4f7bbb2 Whitelist Discord Testers invite link - Akarys42
c2af146 Add constants for voice state logging - MarkKoz
58e13c1 ModLog: log voice state updates - MarkKoz
cecf84e ModLog: use Unicode arrow when displaying value... - MarkKoz
e2075a6 ModLog: make voice state event respect ignored ... - MarkKoz
Build 20200130.1 succeeded
GitHub
00:01:39
Bot
Hi, I ran into the below error when installing both flake8-annotations and flake8-typing-imports
optparse.OptionConflictError: option --min-python-version: conflicting option string(s): --min-python-version
Both packages use the same options flag for minimum python version and same error codes.
I opened an issue on flake8-typing-imports (link) and the package author redirected me to submit an issue here: https://github.com/a...
The duplicate options flag is a flake8 bug that has already been reported (and fixed) upstream, but not included in a new release. See: #59 and https://gitlab.com/pycqa/flake8/issues/610 for more information. Our current release (1.1.3) registers no custom options.
We will look into changing the error prefix to mitigate the conflict with flake8-typing-imports. ANN seems like a reasonable option.
d169fbf Add additional resources to the test readme - Akarys42
This PR simply add 3 additional resources at the bottom of test/README.md.
Build 20200130.2 succeeded
GitHub
00:01:32
Bot
There is already mention of other resources at the start of the document. Make it link to the new resources section and link to the PyCon talk in the section.
Build 20200130.3 succeeded
GitHub
00:01:30
Bot
Build 20200130.4 succeeded
Leon Sandรธy
00:03:27
Bot
Connected!
With pipenv removed by #60, this dependency is no longer present.
OK, I won't notify you again about this release, but will get in touch when a new version is available.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
341cce0 Change all instances of TYP to ANN - sco1
TYP to ANN in order to deconflict with flake8-typing-importsPer #64, due to prefix shadowing of TYP between flake8-annotations and flake8-typing-imports, it's been suggested that the prefix for this repository be changed to ANN so the plugins can coexist peacefully.
As this is a breaking change to existing linting configurations, it will be released as version 2.x
Closes #64
Postgres backup completed!
Most of the code for the tests is extremely similar, even the cases (the burst tests are kind of outliers). The main difference is always just in the make_msg function and the output string.
Prevailing style is to put a line break between the opening quotes and the summary.
Build 20200131.1 succeeded
GitHub
00:01:37
Bot
The test cases are similar, yes - the rules are too. What do you propose can be done to make this better? Would it make sense to implement some kind of an "executor" on the side, and then just feed it the test cases from each module?
Two helper functions: one for "allows" tests and one for "disallows". They should be passed the apply function and the subtest arguments. The helpers will do the loop, calling of apply, and the assertions.
As I mentioned, some of the subtest arguments follow a similar pattern across test suites. To facilitate this, a function could be defined which will take a make_msg function and return subtest arguments. This function can shared among some test suites to generate subtest arguments...
Postgres backup completed!
Needs a test case for the list endpoint to test retrieval of existing objects and also test searching and filtering.
This should be in a test function instead of in the setup fixture.
It'd be better to create the user in setUpTestData since it runs once for the entire test case instead of creating a user once per test.
Use Reminder.objects.get(id=...) and compare the fields of that object instead of using the list endpoint.
Postgres backup completed!
Build 20200202.1 succeeded
GitHub
00:01:36
Bot
True. Would you suggest a separate test for each field that can be invalid? I'm particularly weak on testing and trying to learn best practices.
93d19f3 adds an ABC (9758e32 actually adds the metaclass=ABCMeta), b89f9c5 then adjusts the existing rules to use the ABC. I decide to make the DisallowedCase (previously Case) more generic by having an n_violations attr instead of a rule-specific one. This way, the subTest kwargs can be generic as well.
Let me know how this looks, and thanks for the feedback.
I thought that was odd too. I used a couple existing files created by respected contributors as models for mine, and this "assert within setUp()" appeared in a couple places. Would it be appropriate to move this into the test_reminder_in_full_list test? Or is it better to test creation using a post against the list endpoint in one test, and use another test to check that a get for the list endpoint returns expected reminder instances?
This is another case of using examples from the existing code base. I like your suggestion better - I didn't consider using the models directly rather than trying to shoe-horn everything into the API endpoints.
I think a single test for anything invalid is adequate to ensure the API reacts appropriately to erroneous data.
Here's my perspective on why:
Testing each field may be more applicable to model tests (which we don't do anywhere I believe, but maybe we should...), but these are API/viewset tests. The viewset is using standard mixins/base classes from DRF without any overrides. Those mixins are tested by DRF themselves. If the viewset used custom mixins and/or custom method handlers, th...
Put it in a new test function. As per this comment, put that assertion in this new function too and test_reminder_in_full_list can be removed completely.
Actually, it may be moved to another test case since retrieval tests are needed. It just doesn't belong with the creation tests at least.
Needs a test case for the list endpoint to test retrieval of existing objects and also test searching and filtering.
That's very helpful, I lost sight of that context regarding the DRF mixins and their existing tests.
Build 20200202.1 succeeded
Joseph Banks
00:03:53
Site
e8c94af Update config-default.yml - tagptroll1
Build 20200202.2 succeeded
Joseph Banks
00:03:35
Bot
Build 20200202.3 succeeded
GitHub
00:01:28
Bot
Connected!
Needs a test case for the list endpoint to test retrieval of existing objects and also test searching and filtering.
I think I've got most of these issues sorted, but I'm not certain I've done what you asked regarding searching and filtering. I adapted what looked like the requested behavior from test_infractions.test_filter_search(). If what I've done is correct, can you help me understand when this searching is actually used in practice? Is this the mechanism by which the bot lists t...
Build 20200202.2 succeeded
GitHub
00:01:52
Site
Build 20200202.1 succeeded
Joseph Banks
00:06:22
Snekbox
Build 20200202.4 succeeded
GitHub
00:03:22
Bot
Connected!
ec2ae9d Add validation rules to Infraction serializer - SebastiaanZ
cf1a075 Migrate undesirable active infraction to inactive - SebastiaanZ
0d383cb Prevent double active infractions with constraint - SebastiaanZ
6670a3b Merge branch 'master' into active-infractions-v... - SebastiaanZ
e415428 Solve migration conflict by renaming migrations - SebastiaanZ
Build 20200202.3 succeeded
GitHub
00:01:59
Site
This PR removes code to do with prometheus.
We have concluded that this was not the approach we wanted to take towards metrics and will be coming up with an alternative approach in the future.
Build 20200202.5 succeeded
GitHub
00:01:58
Bot
Build 20200202.6 succeeded
Joseph Banks
00:03:23
Bot
Connected!
Build 20200202.4 succeeded
Joseph Banks
00:03:14
Site
Build 20200202.2 succeeded
Joseph Banks
00:04:13
Snekbox
Build 20200202.7 succeeded
GitHub
00:01:35
Bot
If what I've done is correct, can you help me understand when this searching is actually used in practice? Is this the mechanism by which the bot lists the reminders for a particular user, when commanded?
I don't know - I didn't make the viewset. I would have expected search_fields to be specified so it only searches on a subset of the fields. It doesn't seem to have practical use to me in this case considering the viewset also supports filtering by fields. At least for infractions it...
My concern is get() raises an error rather than returning None. A test failure due to an uncaught exception may be less clear than an assertion failing.
Wouldn't this be the same thing? Not sure.
self.assertRaises(Reminder.DoesNotExist, Reminder.objects.get, id=1)
A test for filtering on fields is still missing. Here's an example. It may be more effective to have two reminder objects created so that a filter can be used to only return one of the two objects.
Build 20200202.8 succeeded
GitHub
00:01:44
Bot
Build 20200202.9 succeeded
GitHub
00:01:22
Bot
These could be enforced
@property
@abc.abstractmethod
def apply(self) -> Callable:
"""Docstring"""
raise NotImplementedError
e51b8b6 Sync tests: test sync with an empty diff - MarkKoz
6a9873c Sync tests: test sync sends a confirmation prompt - MarkKoz
775c992 Sync: create a separate function to get the con... - MarkKoz
58252ea Sync tests: adjust sync test to account for _ge... - MarkKoz
3444f5e Sync tests: test diff size calculation - MarkKoz
Build 20200202.10 succeeded
GitHub
00:01:43
Bot
Postgres backup completed!
Currently, some of our moderation tools fail because our database rejects messages without a value for the attachment field. The issue is caused by the fact that null=True is not set for this field, while we do not always provide a value:
(Note that blank=True means that the field won't be required in form validation, but it does not mean the field c...
python-discord/bot#630 will solve this, the two PRs should have been merged at the same time.
Okay, what's blocking the other PR?
Some small issues, but @MarkKoz worked on it in the meantime, and from my testing, the bot doesnโt seem to send an empty list when there is no attachments.
Build 20200203.1 failed
GitHub
00:01:09
Bot
Build 20200203.2 succeeded
GitHub
00:01:50
Bot
Disables the sanitisation of HTML in wiki articles.
Considered unnecessary at this point due to articles being only created by mods+, rather than public members.
I don't see any obvious problems with this, although I haven't been able to test it myself.
Build 20200203.1 succeeded
GitHub
00:02:04
Site
Looks good, only making a request to change one thing: the argument _rules in validate_config.
Use a leading underscore if you want to indicate that the variable is not being used in the block but you want to still keep the name for self-documentation.
Use a trailing underscore to avoid conflicts in namespace.
def validate_config(rules_: Mapping = AntiSpamConfig.rules) -> Dict[str, str]:
for name, config in rules_.items():
2dc728e Use a trailing underscore to avoid name conflic... - scragly
Build 20200203.3 succeeded
GitHub
00:01:52
Bot
Build 20200203.4 succeeded
GitHub
00:03:07
Bot
Connected!
Yep, yours works! Not sure where I got the idea that mine needed to be that way.
Ah, I didn't consider that, thanks. I did wonder why your initial suggestion used filter(...).first(), and now I get it.
Build 20200203.2 succeeded
Leon Sandรธy
00:03:33
Site
Okay, I'm with you now (and this has helped me understand the ReminderViewSet code better, too).
This has been solved now, right?
Build 20200203.3 succeeded
GitHub
00:01:47
Site
Provides 64, 256 and 512 resolution animated versions of the loved up logo for valentines season.

I think this test is a bit fragile. Formally, the model has no default ordering defined, which makes the order in which the objects are returned "unspecified":
If a query doesnโt have an ordering specified, results are returned from the database in an unspecified order. A particular ordering is guaranteed only when ordering by a set of fields that uniquely identify each object in the results. For example, if a name field isnโt unique, ordering by it wonโt guarantee objects with the sam...
Same as above
self.assertCountEqual(response.json(), [self.rem_dict_one, self.rem_dict_two])
Whoops, I've never really thought too much about list equality comparison in Python. Considering how convenient everything else tends to be, I just assumed it'd be dealt with automagically. TestCase.assertCountEqual seems like a good solution!
1b0f366 Improve robustness with regard to ordering - bendiller
Build 20200203.4 succeeded
GitHub
00:01:58
Site
Build 20200203.5 succeeded
GitHub
00:02:33
Site
Build 20200203.6 succeeded
GitHub
00:03:37
Site
def _fuzzy_search(search: str, target: str) -> int:
Since this is already done and there has been no progress re-implementing this on the site, I think it is best to get this PR merged for the time being.
Calling _fuzzy_search multiple times per tag is pretty inefficient. The scores could be calculated ones and stored in a dictionary e.g. dict[tag] = score which could be used in the key function.
This could end up doing redundant work because the first suggestions call discards tags which would be in the alternate threshold of 80. What it instead returned something like:
{
100: ["tag name 1", "another tag"],
80: ["yet another tag"]
}
Thank you, I will include this in a single commit with the suggestion below.
While you're at it, I believe there are a couple of commented out lines that you could probably just delete entirely.
That is a great suggestions! I have created a dictionary to store the scores in the form of tag_title: matching score ( str, int ) and by doing so, won't be calling Tags._fuzzy_search() in other places.
Thank you for pointing that out, I've added a list of thresholds as an argument for self._get_suggestions() so it can go through this list and return the first one already, avoiding calling this function too many times.
Build 20200204.1 succeeded
GitHub
00:01:33
Bot
Postgres backup completed!
Since this is already done and there has been no progress re-implementing this on the site, I think it is best to get this PR merged for the time being.
For a tag named foo-bar, foobars will not match and neither will foo_bar. foobar does match. The tags command doesn't seem to like spaces in tag names - it will never match.
I briefly considered this, but eventually decided not to. Should the child unittest not provide an apply attr, the tests will fail with:
AttributeError: 'MyRuleTest' object has no attribute 'apply'
I believe that's descriptive enough. I'll mark this as resolved then if that's ok.
Hello @alberthdev, since this PR has been stale for months now and we haven't been able to establish communication, I've decided to close it. There is a concurrent PR #733, which implements unit tests for all other antispam rules, and I think #602 can be addressed there as well.
I hope this is ok with you.
@alberthdev I've decided to include this issue in #733, as this PR addresses all other antispam rule unit tests and we haven't heard from you regarding this since October.
I hope this is ok with you.
Build 20200204.2 succeeded
GitHub
00:01:40
Bot
I've added tests for duplicates (54e8c98) and newlines (cae7f25).
As the latter is more complex than the other rules, yielding two distinct error reports, I decided to implement two subclasses of the RuleTest ABC for it. Each checks one type of violation.
If the given messages violate both total count and max consecutive, the rule will fail on the total as that is checked first. Since I consider this an implementation detail and not "desired functionality", I do not te...
Interesting! I've added a regex to remove all non-alphabet, as well as increasing threshold from [100, 80] to [100, 90, 80, 70, 60] since it stops as soon as suggestions are found for a threshold, this will give better suggestions that the bot thinks is what the user is searching for. This solved for both the foo_bar and foobars when searching for foo-bar
Build 20200204.3 succeeded
GitHub
00:01:20
Bot
In some cases that still isn't working so well:
asks returns args-kwargs instead of askfoos returns off-topic and functions-are-objects instead of foodict returns iterate-dict without considering dictcomps tooAlso discovered an unrelated issue in which it can't handle DELETE or GET requests for tags with spaces in them (returns 404). Might be a URL encoding issue since the tag is part of the URL path. It can POST fine because the tag name is instead part o...
Recently, the deleted messages API received an update that introduced a new required field (attachments). Unfortunately, not every bot feature using this endpoint has been updated yet, causing the API to reject the requests.
One such feature that currently fails is bulk deletion by the Clean cog. Another one is part of [the on_message_delete event listener in the modlog Cog](https://github.com/python-discord/bot/blob...
c054790 Removed regex, implemented a stricter letter se... - ikuyarihS
Hmm, I've added another complexity that will force this to search from words to words, here's the snippets I used to test
from typing import Dict, List, Optional
stuff = ['args-kwargs', 'ask', 'class', 'classmethod', 'codeblock', 'decorators', 'dictcomps', 'enumerate', 'except', 'exit()', 'f-strings', 'foo', 'functions-are-objects', 'global', 'if-name-main', 'indent', 'inline', 'iterate-dict', 'listcomps', 'mutable-default-args', 'names', 'no-dm',
'off-topic', 'open', '...
Build 20200205.1 succeeded
GitHub
00:01:52
Bot
Postgres backup completed!
Build 20200205.2 succeeded
GitHub
00:01:38
Bot
df023e0 Move tools and questions guide to under resources - scragly
After the wiki pages adjustment to the resources page, these two urls are needing to be updated to point to the new correct locations for each page.
Tools will be under resources, and Asking Good Questions is a guide, so will be under Guides.
Build 20200205.3 succeeded
GitHub
00:01:49
Bot
fcea687 Update resources reference in head navbar. - scragly
Due to the tweak in the wiki page structure, the Tools page is now under resources, and Learning Resources is now just Resources.
Build 20200205.1 succeeded
GitHub
00:01:58
Site
url = f"{PAGES_URL}/resources/guides/asking-good-questions"
I'm a dumb, forgot the slash.
b9c6916 Add missing slash to asking good questions url. - scragly
Currently in mobile view (or small width screens), the "More" section of the navbar still shows a non-functional collapse/expand arrow that we should probably remove.

Build 20200205.4 succeeded
GitHub
00:02:05
Bot
The links successfully link to things ๐
The link is linked, awesome!
The paths are pathed linked, awesome!
Build 20200205.5 succeeded
Leon Sandรธy
00:03:48
Bot
Connected!
Build 20200205.6 succeeded
GitHub
00:01:57
Bot
As a general thought, we should strive to keep a relatively close cadence with the library when feasible. The expansion of our test suite & apparent slowing of major breaking changes in the library should help make the process much more straightforward than it has been in the past.
It's probably beneficial to keep updating separate from refactoring outside of scenarios where the two are linked. While we should absolutely be identifying & planning out refactor targets based on update librar...
Hello! I was looking a bit around, and I stumbled over the information.py cog. I found a couple of things that I thought could be improved a slight bit, and went ahead and gave it a shot. If there are any further changes you would like me to make for this PR, please let me know and I will go ahead and do so :grin:
Hereโs a list of changes that I made:
@everyone or not, I simply use ctx.guild.roles[1:] inste...Build 20200205.7 succeeded
GitHub
00:02:59
Bot
Connected!
This is the only thing that is standing out to me. I'm still in the process of actually testing it.
If I'm not mistaken, @jos-b changed the time_limit to 5 seconds in his commit.
- Time limit of 5 seconds
The code itself looks good. I have no idea what any of this does. I'm sure you've tested it thoroughly and there's very little risk involved if this has a mistake in it, letting it sit any longer is completely pointless.
Hello, thanks for the contribution!
A couple general requests before we open this up to a broader review:
Build 20200205.2 succeeded
GitHub
00:03:00
Snekbox
Build 20200205.3 succeeded
GitHub
00:04:51
Snekbox
Build 20200205.8 succeeded
GitHub
00:01:28
Bot
Build 20200205.9 succeeded
GitHub
00:01:47
Bot
Build 20200205.12 failed
GitHub
00:00:54
Bot
Hi - Thank you for the feedback, and apologies for the issues and commit-spam. I do admit I'm not the most experienced with git, so I apologize for the forking mistake and commit spam that has happened. Would you like this PR to be re-created so the commit history is not as messy?
As to your code requests:
- The import changes make a lot of modifications to the file with seemingly little gain. Without a better justification for the changes it would be better if they were left as-is.
Is...
Build 20200205.13 failed
GitHub
00:01:10
Bot
That's working much better.
Build 20200206.1 succeeded
GitHub
00:03:41
Site
Postgres backup completed!
No worries, it's all a learning experience. If you wouldn't mind, let's start from scratch & on a new branch so your master is clean and in sync with our repo and we don't have all the unnecessary commits. Then we can dive into everything else.
Regarding the failing test, it's an issue with how we're mocking a member list for the test:
With the old logic ...
Awesome, I will create a new PR once it is ready. Thank you for the valuable feedback so far. :)
Hello. I created #740 yesterday, but with lack of knowledge of forking and proper commit messages, the commit history became a slight bit messy. I'm here again with pretty much the same PR, with a few changes here and there. Thanks to @sco1 for the helpful advice so far.
A change log can be found here and in the commit messages:
@everyone or not. Simply skipping the first element in the .roles will skip the @everyone role.Build 20200206.1 failed
GitHub
00:01:00
Bot
Build 20200206.2 succeeded
GitHub
00:01:28
Bot
Postgres backup completed!
Build 20200207.1 succeeded
GitHub
00:01:42
Bot
8c2871f Make it easier for user to search for tags - ikuyarihS
b71acff Merge branch 'master' into fuzzy-tag-search - jos-b
7f0e673 Fixed _last_fetch not being updated after each ... - ikuyarihS
868de47 Refactored get_suggestions following Mark's su... - ikuyarihS
a38926f Removed non-alphabets from both search and tag... - ikuyarihS
Build 20200207.2 succeeded
GitHub
00:03:18
Bot
Connected!
When we try to invoke a command, we can make little typos, for example
!muet @shirayuki 72H oh come on, cant you make a proper issue?
In this case, the bot can then steps in and do a friendly suggestions:
did you perhaps mean
!mute @shirayuki 72H oh come on, cant you make a proper issue?
The typo in this example was !muet when trying to do !mute
This will greatly relieve the stress of typing every command rights, and thus enhancing the experience with the bot much further.
We should include a Command.can_run check to make sure the individual is actually allowed to run the command within the given context.
I can work on this if no one (@ikuyarihS) wasn't planning on doing it :)
1e9f8f1 Sync tests: test Sync cog's on_member_remove - MarkKoz
bb6ea90 Sync tests: test Sync cog's on_member_update fo... - MarkKoz
c42b279 Sync tests: test Sync cog's on_member_update fo... - MarkKoz
91b5b5b Sync tests: fix ID in endpoint for test_sync_co... - MarkKoz
b944f16 Sync tests: test Sync cog's on_user_update - MarkKoz
Build 20200207.3 failed
GitHub
00:01:17
Bot
Related to #734. This PR only updated the dependency.
Note that production was already on 1.3.1 due to using ~=1.2 for the version which is equivalent to >= 1.2, == 1.* (1.3 is permitted by the latter portion of the clause). Should this be stricter going forward e.g. ~= 1.3.1?
Build 20200207.4 failed
GitHub
00:00:29
Bot
~=1.3.1 makes sense, didn't notice that it got bumped in the lock file when we relocked for #737.
I guess now we know that everything is probably maybe working fine ๐
Build 20200207.5 succeeded
GitHub
00:01:22
Bot
e70b29e Update discord.py to 1.3.1 - MarkKoz
4e07c31 Pin discord.py to 1.3.x - MarkKoz
552048d Merge pull request #743 from python-discord/dep... - MarkKoz
Build 20200207.6 succeeded
GitHub
00:03:49
Bot
Connected!
Build 20200207.7 failed
GitHub
00:01:21
Bot
Postgres backup completed!
Removed the clear reaction. The reactions are already cleared automatically. This should be good to go.
It's better to use the enum itself rather than its value. Strings are more prone to programmer errors.
Build 20200208.1 succeeded
GitHub
00:01:12
Bot
Build 20200208.1 failed
GitHub
00:01:28
Site
Build 20200208.2 succeeded
GitHub
00:02:02
Site
4b25725 Infractions: fix UniqueTogetherValidator incorr... - MarkKoz
6b99214 Add regression test for the UniqueTogetherValid... - MarkKoz
a0ea44f Add fixtures to create infractions in serialize... - MarkKoz
8d49389 Test that new infractions pass validation - MarkKoz
309acd3 Output errors more clearly for infraction seria... - MarkKoz
Build 20200208.3 succeeded
GitHub
00:03:30
Site
Right now, some numbers in the embed result of !server do not have thousand separators, here is a screenshot of it:

Like this part, it does add separators:

But this part it does not:

Postgres backup completed!
Build 20200209.1 succeeded
GitHub
00:01:30
Bot
5 tasks done out of 5, it is now ready for reviewing!
Use the discord.ChannelType enum instead of __class__. A channel's type can be retrieved with channel.type. group and private types should be ignored.
Why was or None removed? It's better to show None than an empty string IMO.
With the ChannelType suggestions, this description would not be accounting for all types (most significant is the news type currently) or any future types that Discord may introduce. I could live with that, but if you're up for it, you could make this part of the description be dynamically generated from whatever types are inside the channels dictionary.
I just realised the Counter is not being taken advantage of. The for loop can be done away with:
channels = Counter((c.type for c in guild.channels))
The same can be done for the the statuses.
Build 20200209.2 succeeded
GitHub
00:01:43
Bot
4e87b4e Use trashcan emoji for message deletion - kosayoda
30ba84e Differentiate clear and delete emoji in help cog - kosayoda
56696b3 Remove dev-test limit for filtering debugging - kosayoda
af0e532 Revert "Remove dev-test limit for filtering deb... - kosayoda
a221024 Add delete emoji to pagination - kosayoda
Build 20200209.3 succeeded
GitHub
00:03:31
Bot
@mathsman5133 #625 has now been merged.
Every user has the Developer role per default, and users with no roles cannot use this command- making the or None check rather redundant. If you want it to be re-added, I can easily do so, I just thought that it wasn't needed :)
Would this not ignore discord.Category? I could add an if statement for that specific type, but wouldn't that be less ideal than using __class__?
Users who haven't verified i.e. gotten past the checkpoint will have no roles.
To be clear, moderators can use this command to get info about other users, including those that haven't passed the checkpoint.
With the new fuzzy tags, there's a chance an user may think something which is not a tag is one; resulting in a similar tag being fetched
(!t def as an example resulting in a tag through the whole page)
Adding the ability to remove them (perhaps when it was fuzzy matched) would solve this and perhaps some others when a tag's purpose is misremembered.
I've added an action point to implement a lock for the message relay.
The reason is that, on occasion, the same message gets relayed more than once due to a race condition: If, for some reason, multiple reaction events fire when we go over the ducking threshold and all of them make it past the "green checkmark check" before a relay is successful, all of them will relay the message as none of them are "aware" that the message is already going to be relayed by one of the other near-simultane...
Postgres backup completed!
Build 20200210.1 succeeded
GitHub
00:01:32
Bot
At the moment, after calling !eval, get a result from bot, delete bot's message, change the code in the original message, click the button to re-eval will raise an error

Same with predicate_eval_message_edit you can create one outside of the for loop.
This is always called, so you can move it outside of the loop.
Because we are now not stripping leading '\n' anymore, we will have to find a different way to count lines, otherwise we can have this

I believe the leading '\n' should still be stripped, the leading ' ' can be left alone since it does mess up with output of dis and pandas.DataFrame if we also strip the ' '
The point was to leave all the output lines without doing any stripping logic to avoid any misleading result, since we have the paste service anyway
We want to call it after each eval, it needs to stay inside the loop
Yes I agree, I meant that you call this inside try and also inside except so you can call this line outside of the try except altogether.
I see, that is a good point, in this case please disregard this comment.
After a discussion in #dev-contrib, I agree that having 11 lines is fine since we also have a paste service. If this becomes a problem, we can raise another issue and handle it later.
An elegant and very well presented PR.
With #60 squared away this should be good to review now.
What's this do? Not familiar with tox.
It adds 3.9 as a test environment target, it will be skipped if not present.
Tested it locally, albeit not extensively, and everything seems to be in order. I have faith in the unit tests.
Build 20200211.1 succeeded
GitHub
00:01:59
Bot
Postgres backup completed!
What's the proposed mechanism to accomplish this?
62ed247 Fix Tox test execution on Windows - GhostofGoes
I was thinking about deleting it on detecting the trash can reaction, like eval's output for example.
Running the tests is not currently possible on Windows, and will fail with ERROR: InvocationError for command could not find executable python3. This is because Tox executes pytest using python3, which isn't a valid python command on Windows. Since the Tox runs the tests in a virtual environment, plain python can be safely used.
Tested against Python 3.6 and 3.6 on Windows (PowerShell) and 3.7 in Ubuntu (WSL).
Thanks! I've been doing all the dev on MacOS so I never ran into this.
Call me dumb, but I'm not sure if I exactly understand what you mean here. I assume you basically mean something like this?
channel_counts = ""
for ch in channels:
channel_counts += f"{str(ch).title()} channels: {channels[ch]} \n"
If so, that for-loop can be simplified using this. Would this be preferred instead?
channel_counts = "".join(f"{str(ch).title()} channels: {channels[ch]} \n" for ch in channels)
All of the changes ha...
Postgres backup completed!
Build 20200212.1 succeeded
GitHub
00:03:29
Site
Using the โญ๏ธ reaction to skip to the last page causes an exception.

The prime suspect appears to be this line:
Should probably instead be:
current_page = len(paginator.pages - 1)
Thanks! Good spot, although your suggested fix is currently equal to the bug:
Should probably instead be:
current_page = len(paginator.pages - 1)
I suspect you mean this:
(This is from the LinePaginator, which does work)
Do you want to make a PR for this?
although your suggested fix is currently equal to the bug
Yeah, I only saw it after posting haha.
Do you want to make a PR for this?
And sure thing.
A banner for the Valentines season, as per @lemonsaurus' request.
Fixes #746.
As mentioned in the issue. Very minor change.
Build 20200212.1 succeeded
GitHub
00:01:45
Bot
Build 20200212.2 succeeded
GitHub
00:03:03
Bot
Connected!
Adding a couple more enhancements:
Build 20200212.3 succeeded
GitHub
00:01:41
Bot
Build 20200212.4 succeeded
GitHub
00:01:36
Bot
Despite the efforts in #681, I failed to realise aiohttp.AsyncResolver suffers from the same DeprecationWarning as the session.
Thankfully, it seems that the resolver of a aiohttp.TCPConnector instance can be swapped out whenever. It just uses whatever the value of self._resolver is every time it needs to resolve a host. It is a "private" attribute but ostensibly there isn't any reason it shouldn't be changed.
So, the resolver can simply be created in Bot.start(). I believe ...
Build 20200212.5 succeeded
GitHub
00:01:24
Bot
Yes, that is what I meant. Sorting it sounds like a good idea too.
Also, it's perfectly fine, and perhaps even better, for this change to have been a separate commit. No need to wait.
In retrospect, I don't think any code needs to be written to ignore those types. Since it's only looking at guild channels, it should never encounter those channel types in the first place.
I seem to have forgotten to add also:
539cc84 Adding a discord banner for Valentines. - lemonsaurus
970b2dd Merge branch 'master' of github.com:python-disc... - lemonsaurus
For scoping I'm going to split this into a couple discrete chunks:
Chunk the first (low hanging fruit)
Chunk the second (requires backend changes)
Chunk the third (converter change has broader implications)
Per #663, this PR imlements the first subset of enhancements to the reminders feature.
#dev-contrib!remind list to figure out what reminder they need to reference for changes.Build 20200212.6 succeeded
GitHub
00:01:43
Bot
Postgres backup completed!
@manusaurio expressed an interest in working on a set of lemojis. As we're removing a few generic emojis that express certain things, it would be good to start with lemojis that express these same emotions, so that we can still communicate in effectively the same way as we currently do.
Build 20200213.1 failed
GitHub
00:01:22
Bot
Turns out clear() is not an async function so re-creating the connector there is not exactly an option. May need to be accomplished somehow in start() instead.
Another issue I discovered is that the APIClient.loop attribute is not really tied to Bot.loop so they could end up being different if someone wanted to change the loop and didn't bother to change APIClient.loop too. It's important they're the same so that the session creation task is scheduled on the correct loop. However...
Client.clear() does HTTPClient.recreate() to recreate the aiohttp session. However, that function is not a coroutine. I would expect it to cause a DeprecationWarning yet it doesn't (is it being suppressed somewhere?). Furthermore, when starting the bot normally, Client.login() is called. That calls HTTPClient.static_login, which also creates a session. Unlike HTTPClient.recreate(), it is a coroutine and is discord.py's own way of working around the DeprecationWarning.
It's...
My conclusion is that it's fine to re-create the connector in Bot.start() as long as it is done before Client.start() is called. Just forget about trying to use a custom connector with the session created in Client.clear(). In other words, a custom connector will only be used when running a bot; using the Client just for making Discord API requests will use the default connector. Setting the connector to None in such case should be good enough.
All the requested changes should have been made, although, I can't seem to figure out why the test is failing, even though I did update it to reflect the changes made. Help on this would be appreciated, since I have zero clue ๐
This has been sitting here for a while without any progress from me.
I remember it being more complex than anticipated and don't have the will to continue it right now or in the foreseeable future so I'll be closing the PR and unassigning myself from the issue
unassigning myself after #651 was closed
Fixes #748.
aiohttp doesn't like the resolver being created outside an async function. It is currently being done in Bot.__init__. This PR moves it to Bot.start(), which is a coroutine.
Build 20200214.1 succeeded
GitHub
00:01:34
Bot
All the requested changes should have been made, although, I can't seem to figure out why the test is failing, even though I did update it to reflect the changes made. Help on this would be appreciated, since I have zero clue ๐
It's due to dedent() not removing the leading whitespace. It only removes it if it is common to all lines. The lines added by channel_counts lack the leading whitespace. Therefore, the whitespace is not common to all lines and it isn't remove for any...
Postgres backup completed!
When an existing temporary infraction is turned into a permanent infraction using the !infraction edit functionality, we ask the infraction scheduler to schedule a new task with infraction["expires_at"] = None. However, the scheduler expects to be called only for infractions that have a datetime string mapped to the "expires_at" key. This means that the scheduler will try to parse that None value with dateutil.parse.isoparse, which results in an exception:
Traceback (most ...
5c70f10 Stop scheduling expiration of permanent infract... - SebastiaanZ
The infraction edit command defined in bot.cogs.moderation.management contained a bug causing it to attempt to schedule an expiration task when turning a temporary infraction into a permanent infraction. Since the "expires_at" field of a permanent infraction is None, this caused an exception to occur in the scheduler:
Traceback (most recent call last):
File "/bot/bot/cogs/moderation/scheduler.py", line 415, in _scheduled_task
expiry = dateutil.parser.isoparse(infraction[...
Build 20200214.2 succeeded
GitHub
00:01:48
Bot
Build 20200214.3 succeeded
GitHub
00:03:02
Bot
Connected!
If a string is made with the default value being just the ID, the due date could be conditionally appended to it in order to cut down a bit on redundant code.
We've been using dateutil for parsing cause I suppose it's less fragile:
https://github.com/python-discord/bot/blob/master/bot/utils/time.py#L133 (ignore the microseconds replacement)
Looks like this cog has several places that could be using this instead.
Prevailing style is for each parameter should be on a separate line. I notice the style above was already being used before your changes, but it could be a potential improvement here to make things more consistent with the rest of the code base.
Ran into a formatting issue:

When a paginator only has one page, the trashcan reaction is not being added (currently evident for the Moderation category).
Why is this check necessary? Why doesn't the later update with the parent name not have this check too?
If the return values aren't used then don't assign them to anything.
await bot.wait_for("reaction_add", check=check, timeout=300)
Is it feasible to make this filter cogs and categories akin to filter_commands? As in, if all commands in a cog or category are ones which the user cannot use, then the suggestion shouldn't be made. Of course, commands themselves would be filtered too. If it's too complex then it's not worth the trouble.
Postgres backup completed!
Build 20200215.1 succeeded
GitHub
00:01:23
Bot
I've also snuck in the one-liner fix for #731
bad164b Add missed signature reformat from review - sco1
Build 20200215.2 succeeded
GitHub
00:01:27
Bot
Easier to read if it's on separate lines.
result = await self.cog.upload_output("-" * (snekbox.MAX_PASTE_LEN + 1))
self.assertEqual(result, "too long to upload")
Its return value should be asserted too.
These are more clutter than helpful since the message is descriptive enough to identify the subtest.
with self.subTest(msg=f'Extract code from {testname}.'):
To expand on the above, this is what comes out of the dedent call with the pre-formatted channel list:
**Server information**
Created: 1 year, 11 months and 20 days ago
Voice region: us-east
Features:
**Counts**
Members: 8
Roles: 17
Category channels: 12
Text channels: 69
Voice channels: 11
**Members**
<:statu...

While clicking on the click above, I encountered the following problem -

Thanks. I fixed by using a normal URL. Turns out the wiki: style only works with markdown (the fancy yellow box is done with HTML).
9b6c9e8 Bot: fix error trying to close a None session - MarkKoz
a21f4e6 Bot: override login() instead of start() - MarkKoz
5cc4e36 Bot: move connector/session recreation to a sep... - MarkKoz
6b689a1 Bot: call _recreate() in clear() - MarkKoz
a417c31 Bot: warn when connector/session not closed whe... - MarkKoz
Build 20200215.3 succeeded
GitHub
00:02:00
Bot
Build 20200215.4 succeeded
GitHub
00:01:28
Bot
For example, the messages printed in create_superuser() and "Starting server." in run_server() don't show despite the web server still running just fine.
It seems to be related to the python logging module thinking it's running similar to a service instead of through a standard terminal when run within a docker container. By adding the config line tty: true to the development compose file, logging seems to work as expected again.
As a note, this can possibly impact any docker development environments in which we rely on the python logging module, so we may need to review other projects' dev compose files also to add the configuration line.
Closes #685
Before:
create_task() into schedule_task()Build 20200216.2 succeeded
GitHub
00:01:32
Bot
Build 20200216.3 succeeded
GitHub
00:01:30
Bot
Build 20200216.4 succeeded
GitHub
00:01:39
Bot
I think this is decent, but is there a better workaround? My other idea was to take out the cancel_task() from deactivate_infraction() and have the other callers of deactivate_infraction() be responsible for cancelling the task. I think that's a worse solution than what's above.
Postgres backup completed!
Let's figure out exactly what the member and the actor should be displayed.
These questions need to be answered for both the member and the actor separately:
Build 20200216.1 succeeded
Leon Sandรธy
00:03:15
Site
Hmm, in addition, should we also show the avatar of use if .get_user() returns a not None? So it will line up with the other embeds

Fix #329 by allocating a pseudo-tty to the web service in Docker Compose.
Build 20200216.2 succeeded
GitHub
00:02:11
Site
c0bc8d0 Fix missing Django logs when using Docker Compose - MarkKoz
Related to python-discord/site#329
Currently when starting the web server with Docker Compose, some log messages were not showing up. This is fixed by allocating a pseudo-tty to the web service in Docker Compose. It's added to the bot too just in case :)
Here are some messages which will appear with this fix:
web_1 | 431 static files copied to '/var/www/static'.
web_1 | Creating a superuser.
web_1 | Admin superuser already exists.
web_1 | Existing bot ...
Build 20200216.5 succeeded
GitHub
00:01:33
Bot
Is something still being investigated?
Can someone clarify what exactly needs to be actioned for this issue? Has the goal been changed to adjust filters to detect spam across channels?
Will require a change to the validator in the model too
Postgres backup completed!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
Connected!
Connected!
Connected!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Connected!
<@&267628507062992896> WARNING: Unable to get DEFCON settings!
Build 20200217.1 succeeded
GitHub
00:04:29
Site
6f25814 Moderation: fix member not found error not bein... - MarkKoz
a83d268 Error handler: create separate function to hand... - MarkKoz
eab4b16 Error handler: create separate function to hand... - MarkKoz
29e3c3e Error handler: log unhandled exceptions instead... - MarkKoz
806c69f Error handler: move tag retrieval to a separate... - MarkKoz
UserInputError. The "Something about your input seems off. Check the arguments:" message was too ambiguous to be of much help to users. The messages mostly use the default error messages defined in the exceptions.BotMissingRole and BotMissingAnyRole. It shares the message with BotMissingPermissions. It's a cleaner and less dramatic way of handling these errors even though they will rarely be seen.Build 20200217.1 succeeded
GitHub
00:01:32
Bot
I think it's best to keep #126 a separate issue as this issue is concerned with coverage of errors in the main error handler while the other is concerned with formatting of errors in all cogs.
I think it's best to keep this a separate issue from #131 as this issue is concerned with formatting of errors in all cogs while the other is concerned with coverage of errors in the main error handler.
Postgres backup completed!
Connected!
Build 20200217.2 succeeded
GitHub
00:03:22
Bot
Connected!
This solution makes sense to me in terms of maintainability. It did confuse me for a moment, partly because the git blame isn't directly available in the PR review view, so I think we should add a comment about why we're defining these class attributes here. I would be fine with a single line comment referring to the commit for more information (partly to anticipate the relevant commit being pushed down by future commits.)
Few questions, no major issues as far as I can tell. I've played around with it for a bit and it seems to work, but it's a fairly complex system and a real stress test will happen "in production". That will also show if things like a threshold of 10 for the user syncer confirmation message is low when dealing with a guild our size. It's probably fine and we can always adjust such things later.
I'm not sure if it's strictly necessary, but this is an elegant solution to limit the check to the author for a manual sync. I guess it prevents someone from accidentally confirming a sync action started by someone else. The point of this comment is purely to say it's an elegant solution.
Why did you decide to add the constants here instead of in config-default/constants.py?
We should upgrade the Python version of the bot to Python 3.8
Python 3.8 offers significant improvements in the area of writing unittests for asyncio; in fact, you could say that Python 3.8 finally brings proper asyncio-support to Python's built-in unittest framework. By upgrading to Python 3.8, we'd no longer have to implement custom mock classes and decorators to make our test suite compatible with the plentiful asynchronous features of the bot that we're trying...
Agreed, now that there's a .1 release, I don't have any qualms with updating properly.
62d198b Pagination migrations - Emoji Data Structure Mo... - F4zii
Changed the pagination emoji collection from list to tuple
This change was suggested since this collection is constant
Suggested in - Original PR - SeasonalBot
Build 20200217.3 succeeded
GitHub
00:01:54
Bot
For reference, here are bugs that have been fixed since the 3.8.1 release. At a glance, I see only one fix which may be relevant to us:
We could also include misspelt arguments, but that's another different way of handling typos since it is different for every command
Thanks, that's something to keep in mind. We could wait for 3.8.2 although I don't think this is currently a blocking issue for us. Our current Python version, 3.7, barely has any async unittest support.
I would love to work on this in the future :+1:
Connected!
Postgres backup completed!
b3ad47a Feature: suggest command usage for misspelt com... - F4zii
Build 20200218.1 failed
GitHub
00:00:56
Bot
Build 20200218.2 failed
GitHub
00:00:59
Bot
Upon further discussion, there is a return in the except block, moving await ctx.message.clear_reactions() outside will make it not clear any reactions if the exception block is hit, so the code is good as is, and so I'll mark this as resolved.
3376940 Split assertion onto separate lines - Akarys42
The tags cog is not the right place for this since this feature is not actually related to tags. As it is, it will suggest commands when tags are fetched. This may make sense when this is triggered via the CommandNotFound error but it doesn't when using the !tags get command or any of its aliases.
You're piggybacking on fact that the tags are fetched by the error handler when a command isn't found. Instead, the error handler should call this code more directly. It may be better to wait...
Build 20200218.4 succeeded
GitHub
00:01:33
Bot
Build 20200218.5 succeeded
GitHub
00:01:32
Bot
Build 20200218.6 succeeded
GitHub
00:01:36
Bot
dd9c250 Delete additional informations from subtest
b5a1bf7 Use a space instead of an empty string in test_... - Akarys42
Build 20200218.8 succeeded
GitHub
00:01:33
Bot
Build 20200218.9 succeeded
GitHub
00:01:39
Bot
8c2871f Make it easier for user to search for tags - ikuyarihS
4e87b4e Use trashcan emoji for message deletion - kosayoda
30ba84e Differentiate clear and delete emoji in help cog - kosayoda
56696b3 Remove dev-test limit for filtering debugging - kosayoda
af0e532 Revert "Remove dev-test limit for filtering deb... - kosayoda
Build 20200218.10 succeeded
GitHub
00:01:22
Bot
Hey mark, as I've said, the current structure of the error_handler is a bit hard to change for that usage (since it reinvokes every misspelt command as a tag), I can wait or change its implementation if needed
I agree the tags aren't the place for this, I got a suggestion to base it there since its the easiest way, I will now work on a better way and update you :+1:
I also had an idea to use the returned value from the command invoke into a useful piece of data
Postgres backup completed!
closes #178
Web pages to display all the tags which are available via the discord bot.
I am using markdown lib to render the python code on the web(See the Class Tag page in the video below).
Here is a video of its implementation:
https://streamable.com/j6mr9
Build 20200219.1 failed
GitHub
00:01:57
Site
Build 20200219.1 succeeded
GitHub
00:01:46
Bot
Build 20200219.2 succeeded
GitHub
00:01:30
Bot
51ce622 API: add comment explaining class attributes - MarkKoz
Fair. I've added a comment as you suggested.
Build 20200219.3 succeeded
GitHub
00:01:25
Bot
Build 20200219.4 succeeded
GitHub
00:01:34
Bot
b4d870a Utils: refactor format_infraction_with_duration... - MarkKoz
2a65569 Moderation: add creation date & duration to exp... - MarkKoz
9f3bcc5 Moderation: show correct actor in expired infra... - MarkKoz
695ea44 Moderation: show member as a mention in expired... - MarkKoz
66901fc Moderation: show avatar in infraction deactivat... - MarkKoz
Build 20200219.5 succeeded
GitHub
00:02:57
Bot
Connected!
b4d870a Utils: refactor format_infraction_with_duration... - MarkKoz
2a65569 Moderation: add creation date & duration to exp... - MarkKoz
9f3bcc5 Moderation: show correct actor in expired infra... - MarkKoz
695ea44 Moderation: show member as a mention in expired... - MarkKoz
66901fc Moderation: show avatar in infraction deactivat... - MarkKoz
Build 20200219.6 succeeded
GitHub
00:01:27
Bot
Build 20200219.7 succeeded
GitHub
00:01:28
Bot
Build 20200219.8 succeeded
GitHub
00:01:32
Bot
Hello, the feature is ready.
A quick question: should we suggest a few options or just the closest one?
Note: Few suggestions could result in a spam
Build 20200219.9 succeeded
GitHub
00:01:28
Bot
While you're at it, it'd be nice if this function could get moved out rather than being nested.
Correct the annotations
async def _get_command(self, ctx: Context, tag_name: str = None) -> bool:
It'd be better to return False so that it can try to suggest a command instead. The embed saying "there are no tags" would still be visible, but I think it should just not be shown at all if it's being called from the error handler (can add a boolean parameter to the function to distinguish it).
This will raise exceptions for check failures so they should be caught.
Are you referring to _command_on_cooldown?
That's correct, I think i meant to do this, my bad
This is the command itself, are you referring to the explicit one we separated?
The outer function (the one that is being called inside the command) is accessible within the error handler, I applied these changes to the outer function
Build 20200219.10 succeeded
GitHub
00:01:32
Bot
Build 20200219.11 succeeded
GitHub
00:01:34
Bot
My personal preference: don't like all() when a simple or is adequate.
if not tags_cog or not tags_get_command:
Do it like it was done for the tags:
log_msg = "Cancelling attempt to fall back to a tag due to failed checks."
try:
if not await tags_get_command.can_run(ctx):
log.debug(log_msg)
return
except CommandError as tag_error:
log.debug(log_msg)
await self.on_command_error(ctx, tag_error)
return
Keeping in mind this is not strictly enforced, here are my suggestions for writing docstrings:
My attempt, feel free to modify:
"""
Show contents of ...
At the moment, the only way to use snekbox is to follow the instructions in the README. It would be nice if there were also instructions on how to quickly get a working container up and running, even if it's just a script, although it'd be better if there were instructions on how to use the image on the Docker hub.
Network mode is currently set to "host". That's considered pretty insecure; instead, we should just connect port 8060 to the host. I tried that way and it worked for me, is there a different reason we should be using host mode?
docker pull pythondiscord/snekbox-base \
&& docker run -d --privileged --hostname pdsnk \
--init --ipc="none" -p8060:8060 pythondiscord/snekbox
Something like that in the README. We should at least include the run flags.
I also made the change I suggested in https://github.com/python-discord/snekbox/issues/58; if that's bad, feel free to remove -p8060:8060 and add --network="host"
Build 20200220.1 failed
GitHub
00:00:54
Bot
Postgres backup completed!
Are you referring to the docker-compose being set to host?
I've just checked how we are deploying this and we actually create our own network which we then connect containers to (if you see bot it sends a request to http://snekbox:8060).
I believe it is set to host here purely for development purposes, deployment is not intended to be carried out through docker-compose.
I don't understand why you are pulling snekbox-base here?
Also while we could simplify things somewhat this isn't the type of docker container where you just boot it up and get a web interface, it is an API so some sort of programming will always be required.
We do already have instructions on how to use the image in the README:
HTTP REST API
Communication with snekbox is done over a HTTP REST API. The framework for the HTTP REST > API is Falcon and the WSGI being used is Gunicorn. By default, the server is hosted on 0.0.0.0:8060 wit...
This PR is to refactor the logging prep in our __init__.py module to avoid issues encountered with import sensitivity and overwritten logging settings.
It simplifies some existing code and removed anything that was no longer useful, such as the logmatic dependency and the aio_pika log setup..
The formatting of the logger was tweaked.
Previously, we had a for loop that indiscriminately forced all registered in...