Commit graph

15 commits

Author SHA1 Message Date
e7714cd2df
fix(hotreload): fix typehint 2025-02-06 17:20:21 -06:00
2a5b924409
feat(repo): make all cogs pylance-typechecking compliant
Some checks failed
Actions / Lint Code (Ruff & Pylint) (push) Failing after 43s
Actions / Build Documentation (MkDocs) (push) Failing after 24s
at `basic` level, does not include Aurora as it's being rewritten in the `aurora/v3` branch
2025-02-01 16:57:45 +00:00
3eeb2f90a6
feat(hotreload): add pre-compilation
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 40s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 44s
this feature will detect syntax errors before reloading a cog and cancel the cog reload if it detects one. DOES NOT detect runtime/logic errors, only syntax errors.
2025-01-29 23:24:19 +00:00
289da84b76
fix(hotreload): use 3.8-compatible typehints
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 44s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 50s
2025-01-26 21:31:48 +00:00
5c6783452d
fix(hotreload): verify that a file path exists before creating an observer schedule for it
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 47s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 52s
2025-01-26 21:29:02 +00:00
70d75c688c
fix(hotreload): only import ObserverType for TYPE_CHECKING 2025-01-26 21:23:08 +00:00
b22d81f514
feat(hotreload): handle multiple observers
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 42s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 47s
2025-01-26 15:18:05 +00:00
ccf9389e13
feat(hotreload): Channel Notifications (#51)
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 41s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 47s
# Channel Notifications

This PR adds the ability for HotReload to send messages to a configurable discord channel when reloading a cog. Messages are only sent after the cog is reloaded to prevent slowdowns.
<!-- Create a new issue, if it doesn't exist yet -->

- [x] By submitting this pull request, I permit [cswimr](https://www.coastalcommits.com/cswimr) to license my work under
  the [Mozilla Public License Version 2.0](https://www.coastalcommits.com/cswimr/SeaCogs/src/branch/main/LICENSE).

Reviewed-on: https://www.coastalcommits.com/cswimr/SeaCogs/pulls/51
2025-01-26 10:06:14 -05:00
ea5f51892a
style(repo): ruff fixes
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 42s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 47s
2025-01-26 14:13:37 +00:00
2543563af1
fix(hotreload): ruff fix 2025-01-26 14:10:48 +00:00
6c25d61dfd
fix(hotreload): use %s formatting in logging strings 2025-01-26 01:53:40 +00:00
f233a7dec5
fix(hotreload): mark cog_load and cog_unload as async 2025-01-26 00:46:00 +00:00
7d1a9cc01a
fix(hotreload): only add dest_package_name to the cogs_to_reload list if dest_package_name != src_package_name
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 34s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 40s
fix(hotreload): only add `dest_package_name` to the `cogs_to_reload` list if `dest_package_name != src_package_name`
2025-01-26 00:32:29 +00:00
5adc7a2c7b
feat(hotreload): Add more events (#50)
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 35s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 38s
# More HotReload Events
<!-- Create a new issue, if it doesn't exist yet -->
Currently, HotReload only supports file modification events. It should also support file moves, and some other event types.

- [x] By submitting this pull request, I permit cswimr to license my work under
  the [Mozilla Public License Version 2.0](https://www.coastalcommits.com/cswimr/SeaCogs/src/branch/main/LICENSE).

Reviewed-on: https://www.coastalcommits.com/cswimr/SeaCogs/pulls/50
2025-01-25 19:25:29 -05:00
5384809780
feat(hotreload): init (#49)
Some checks failed
Actions / Build Documentation (MkDocs) (push) Has been skipped
Actions / Lint Code (Ruff & Pylint) (push) Failing after 42s
Actions / Build Documentation (MkDocs) (pull_request) Has been skipped
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 41s
This pull request adds a cog that allows for automatic reloading of local cogs.

- [x] By submitting this pull request, I permit [cswimr](https://www.coastalcommits.com) to license my work under
  the [Mozilla Public License Version 2.0](https://www.coastalcommits.com/cswimr/SeaCogs/src/branch/main/LICENSE).

Reviewed-on: https://www.coastalcommits.com/cswimr/SeaCogs/pulls/49
2025-01-25 23:55:37 +00:00