Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RELEASE] 1.6.0 #276

Closed
wants to merge 56 commits into from
Closed

[RELEASE] 1.6.0 #276

wants to merge 56 commits into from

Conversation

Rixxan
Copy link
Member

@Rixxan Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jun 13, 2022, 20:38

Added:

  • Added a number of Pytest-based tests. (@Rixxan, @rik079)
  • Added encoding markers to a number of filesystem commands. (@Rixxan)
  • Added proper attribution to exceptions. (@Rixxan)
  • Added a number of new logging entries. (@Rixxan)
  • Added a number of new docstrings and code comments. (@Rixxan)
  • Added loguru for logging system duties. (@Rixxan)
  • Adds cattr structures for user info fetching. (@theunkn0wn1)
  • Added missing update to fallback in listsupport. (@Rixxan)
  • Added a context manager for notification timer. (@rik079)
  • Added a number of missing await statements. (@Rixxan)
  • Enabled compresison support for aiohttp. (@Rixxan)
  • Added EDSM Mocking for Tests. (@Rixxan, @theunkn0wn1)
  • Added bot mocking for tests. (@Rixxan, @theunkn0wn1)
  • Added a warning to README for users on Linux. (@Rixxan)
  • Added the ability to use custom shutdown messages. (@Rixxan)
  • Added EDDB Dump File reader for diversion stations. (@Rixxan)
  • Added a Diversion command to find the 5 closest systems to a given EDSM location. (@Rixxan, @theunkn0wn1)
  • Added a handler and logger for Pylde-unknown IRC commands. (@Rixxan)

Changed:

  • Several formatting updates. (@Rixxan, @theunkn0wn1, @rik079)
  • Changed how exceptions are logged and presented. (@Rixxan)
  • Converted a number of if-true-else statements to bools. (@Rixxan)
  • Renamed a number of improperly-named functions. (@Rixxan)
  • Re-ordered a number of imports to comply with conventions. (@Rixxan)
  • Fixed an issue with an improperly-labeled exception. (@Rixxan)
  • Changed the attribution of a system exit command. (@Rixxan)
  • Fixed a number of imports to more specific values. (@Rixxan)
  • Improved logic of a number of tests. (@Rixxan)
  • Renamed a number of improperly-named variables. (@Rixxan)
  • Recategorized a number of improperly leveled errors. (@Rixxan)
  • Updated requirements to more recent versions. (@Rixxan)
  • Fixed a number of spelling and grammar mistakes. (@Rixxan)
  • Updated the copyright date on numerous files. (@Rixxan)
  • Various logic improvements. (@Rixxan)
  • Changed how variables are interpolated into logging entries. (@Rixxan)
  • Fixed a few "FIXME" and "TODO"s. (@Rixxan)
  • Fixed a bug with how lengths of arguments were processed. (@Rixxan)
  • Fixed a bug that would occur due to unintentional redefining of inbuilt functions. (@Rixxan)
  • Fixed a crash that could occur if the bot was launched in Offline mode. (@Rixxan)
  • Fixes a bug that could cause a regression in future releases of Pydle. (@theunkn0wn1)
  • Fixes an incorrect exception instantiation. (@theunkn0wn1)
  • Fixes a bug due to an incorrect argument in the partchannel command. (@Rixxan)
  • Fixes a bug due to a mutable default variable. (@theunkn0wn1)
  • Updates various documentation files. (@Rixxan)
  • Updated how Discord webhook configuration options are stored. (@rik079)
  • Refactored the notification formatting system. (@rik079)
  • Unified dataclass method with attrs. (@Rixxan)
  • Changed EDSM API coding to improve forward-compatibility. (@Rixxan)
  • Moved test fixtures to their own subdirectory. (@rik079)
  • Fixed an issue with logging system where tasks were not properly defined. (@Rixxan)
  • Improve and class-ify Landmarks and Carriers system. (@Rixxan)
  • Fixed a bug that could occur on --new cache overrides with EDSM. (@Rixxan)
  • Fixed a bug that could occur if a system existed, but was outside of Landmark coverage. (@Rixxan)

Removed:

  • Removed some extraneous exception handlers. (@Rixxan)
  • Removed some in-line string breaks. (@Rixxan)
  • Removed a number of useless else statements. (@Rixxan)
  • Removed a number of useless f-strings. (@Rixxan)
  • Removed a number of useless pass statements. (@Rixxan)
  • Removed a number of unused variables. (@Rixxan)
  • Removed a number of useless keys lookups from dicts. (@Rixxan)
  • Removed Grafana logging system. (@Rixxan)
  • Removed some duplicate functions. (@Rixxan)
  • Removed some duplicate tests. (@Rixxan)
  • Removes an unnecessary pool. (@theunkn0wn1)
  • Removed some unnecessary dependencies. (@Rixxan)
  • Removed a number of useless imports. (@Rixxan)
  • Removed a number of obsolete ancillary files. (@Rixxan)
  • Removed a number of unnecessary imports. (@Rixxan)
  • Removed a few Global variables. (@Rixxan)

Rixxan and others added 30 commits September 6, 2022 20:48
Add a new Decorator (will need to be added to any DB command!) and break EVERYTHING.
[Halpy-142] Remove Old DB Command Logic

See merge request hull-seals/code/irc/halpybot!144
[Halpy-140] Refactor duplicated fact code

See merge request hull-seals/code/irc/halpybot!145
Also updates the version string, as we are working on 2.x Alpha
This code isn't actually used or called anywhere, and so should be removed.
Adds a Timed Task decorator that can be applied to create functions that run, non-blocking, in the background.

If you want these tasks to loop, the function called with the decorator can establish their own loop. This is useful for future content.
[Fix] Remove Old Code & Implement Timed Tasks

See merge request hull-seals/code/irc/halpybot!146
HBOT currently (if connecting directly) spits out the Python version and AIOHTTP version we are using in the server response. While we can't remove the SERVER response header, we can add our own custom useragent to preempt the one that leaks data.

Fully detailed server headers is bad security practice.
Adds a five-minute timed Offline Mode Check to validate that OFFLINE MODE is not set. If it is set, warns Oper and the system monitoring channel set in config.

Also adds a scheduled, automatic syncing of the Fact database with HalpyBOT on a weeklybasis.

Also  removes two unused configuration flags that are left over from cut content.
Is this proper? Probably not. But it works. I think.

I'll review this again later.
I'm an idiot. No further questions.
The args have to be in list format because of how this system works we're hijacking.

So now it is.
We should have done this from the get-go but we didn't know better
[Halpy-143] Apply Timed Tasks & Minor Updates

See merge request hull-seals/code/irc/halpybot!147
Removes the delayed system and associated content in prep for 2.0, updated dependencies, fixed a few type issues, and minor general cleanup for 2.0.
@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @rik079 on Jul 7, 2022, 12:43

Commented on halpybot/commands/notify.py line 241

It certainly does work, at least under normal circumstances. Your point is valid regardless, closing this one as it's sufficiently covered in other comments.

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @rik079 on Jul 7, 2022, 12:44

Commented on halpybot/commands/ping.py line 98

Will approve once Gitlab allows me to

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @rik079 on Jul 7, 2022, 12:56

Commented on halpybot/commands/time.py line 34

from timeit import timeit

print(timeit("'It is currently ' + current_utc + ' UTC on ' + current_monthday + ', ' + year",
             setup="current_utc, current_monthday, year = '12:34', 'July 7', '2022'"))

> 0.167991

print(timeit("f'It is currently {current_utc} UTC on {current_monthday}, year {year}'",
             setup="current_utc, current_monthday, year = '12:34', 'July 7', '2022'"))

> 0.09389919999999996

That doesn't need any commentary I suppose 😄

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 13:00

Commented on halpybot/commands/forcejoin.py line 46

changed this line in version 10 of the diff

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 13:00

Commented on halpybot/commands/ping.py line 98

changed this line in version 10 of the diff

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 13:00

added 1 commit

  • a0e5445 - Apply 2 suggestion(s) to 2 file(s)

Compare with previous version

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 22:50

Commented on halpybot/commands/edsm.py line 178

changed this line in version 11 of the diff

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 22:50

Commented on halpybot/commands/drill.py line 159

This diff is out of date. That issue was indeed fixed with 4a1671a.

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 22:50

Commented on halpybot/commands/edsm.py line 175

Unsure what is being killed with fire - didn't we remove the offending str(er) here?

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 22:50

Commented on halpybot/commands/edsm.py line 178

Consider it killed.

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 22:50

Commented on halpybot/commands/time.py line 34

String concat effectively banished o7

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 22:50

Commented on halpybot/commands/time.py line 34

changed this line in version 11 of the diff

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 22:50

added 1 commit

  • f37e1e5 - [Minor] String Concat & Exception Processing

Compare with previous version

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 7, 2022, 22:51

added 1 commit

  • 9d06637 - [Formatting] String Shortening

Compare with previous version

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @theunkn0wn1 on Jul 8, 2022, 24:35

Commented on halpybot/commands/edsm.py line 175

looks like an outdated delta strikes again

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @theunkn0wn1 on Jul 8, 2022, 24:38

Commented on halpybot/commands/notify.py line 145

there are two things that need to be done here:

  1. rewrite the NotificationLock to be based off an asyncio.Lock object.
  2. rewrite all consumers of NotificationLock() to instead consume a single - shared - instance of the lock object.

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @theunkn0wn1 on Jul 8, 2022, 24:38

Commented on halpybot/commands/notify.py line 241

deleting self only deletes the reference as it exists in this method; it doesn't delete the object self refers to.

in other words, del self in this context is effectively a no-op.

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 9, 2022, 17:37

Commented on halpybot/commands/notify.py line 237

changed this line in version 13 of the diff

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 9, 2022, 17:37

Commented on halpybot/commands/notify.py line 241

changed this line in version 13 of the diff

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 9, 2022, 17:37

added 2 commits

  • 161d5d1 - [Fix] Goes Nowhere, Does Nothing
  • 834bd20 - Merge branch 'develop' of https://gitlab.com/hull-seals/code/irc/halpybot into develop

Compare with previous version

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 9, 2022, 17:44

resolved all threads

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @stuntphish on Jul 14, 2022, 14:14

Commented on CLI/DSSAUpdater/src/carrier.py line 56

There any need for these to be public rather than protected or private? Keeping everything encapsulated is something I've always been taught to do so this makes me nervous

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @stuntphish on Jul 16, 2022, 16:23

Commented on halpybot/commands/edsm.py line 289

!diversion --new will pass this validation and give a message about failed coordinate query when I expect firing off the helptext would be more helpful

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 17, 2022, 14:39

Commented on CLI/DSSAUpdater/src/carrier.py line 56

If we don't ever call them public, I'd say go ahead and update them to private.

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 17, 2022, 14:50

added 1 commit

  • aff2a7f - [FIX] Add Missing Argument Validation

Compare with previous version

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 17, 2022, 14:50

Commented on halpybot/commands/edsm.py line 289

Resolved by aff2a7f

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @Rixxan on Jul 17, 2022, 14:50

resolved all threads

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @stuntphish on Jul 17, 2022, 14:56

approved this merge request

@Rixxan
Copy link
Member Author

Rixxan commented Jan 1, 2023

In GitLab by @rik079 on Jul 17, 2022, 14:57

approved this merge request

@Rixxan Rixxan closed this Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants