This repository has been archived by the owner on Mar 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NAFF 2.0.0
- Loading branch information
Showing
126 changed files
with
4,205 additions
and
1,904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,20 @@ jobs: | |
- .[speedup] | ||
- .[voice] | ||
- .[all] | ||
python-version: | ||
- "3.10" | ||
- "3.11" | ||
include: | ||
- extras: .[all] | ||
python-version: "3.10" | ||
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
- extras: .[all] | ||
python-version: "3.11" | ||
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
|
||
steps: | ||
- name: Create check run | ||
uses: actions/github-script@v5 | ||
uses: actions/github-script@v6 | ||
id: create-check-run | ||
env: | ||
number: ${{ github.event.client_payload.pull_request.number }} | ||
|
@@ -42,13 +52,13 @@ jobs: | |
return result.id; | ||
- name: Fork based /ok-to-test checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge' | ||
- name: Set up Python 3.10 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install ffmpeg & opus | ||
run: sudo apt-get install ffmpeg libopus-dev | ||
- name: Install pytest | ||
|
@@ -67,14 +77,14 @@ jobs: | |
chmod +x codecov | ||
./codecov | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v2 | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
report_paths: '**/TestResults.xml' | ||
check_name: 'Pytest Results' | ||
|
||
- name: Update check run | ||
uses: actions/github-script@v5 | ||
uses: actions/github-script@v6 | ||
id: update-check-run | ||
if: ${{ always() }} | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,22 +13,35 @@ jobs: | |
- .[voice] | ||
- .[all] | ||
- .[docs] | ||
python-version: | ||
- "3.10" | ||
- "3.11" | ||
include: | ||
- extras: .[all] | ||
python-version: "3.10" | ||
RUN_TESTBOT: true | ||
- extras: .[all] | ||
python-version: "3.11" | ||
RUN_TESTBOT: true | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.10 | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.10' | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Install ffmpeg & opus | ||
run: sudo apt-get update && sudo apt-get install ffmpeg libopus-dev | ||
- name: Install pytest | ||
run: | | ||
pip install wheel | ||
pip install -e ${{ matrix.extras }} | ||
pip install .[tests] | ||
- name: Run Tests | ||
env: | ||
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
RUN_TESTBOT: ${{ matrix.RUN_TESTBOT }} | ||
run: | | ||
pytest | ||
coverage xml -i | ||
|
@@ -38,7 +51,7 @@ jobs: | |
chmod +x codecov | ||
./codecov | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v2 | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
report_paths: '**/TestResults.xml' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: naff.ext.jurigged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Live Patching | ||
|
||
NAFF has a few built-in extensions that add some features, primarily for debugging. One of these extensions that you can enable separately is to add [`jurigged`](https://github.com/breuleux/jurigged) for live patching of code. | ||
|
||
## How to enable | ||
|
||
```py | ||
bot.load_extension("naff.ext.jurigged") | ||
``` | ||
|
||
That's it! The extension will handle all of the leg work, and all you'll notice is that you have more messages in your logs (depending on the log level). | ||
|
||
## What is jurigged? | ||
|
||
`jurigged` is a library written to allow code hot reloading in Python. It allows you to edit code and have it automagically be updated in your program the next time it is run. The code under the hood is extremely complicated, but the interface to use it is relatively simple. | ||
|
||
## How is this useful? | ||
|
||
NAFF takes advantage of jurigged to reload any and all commands that were edited whenever a change is made, allowing you to have more uptime with while still adding/improving features of your bot. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.