-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: remove agg binary * fix: ignore WPS232 inside `setup.py` fix: add the `build` folder to ignore * fix: add the `bin` folder to ignore * fix: fix agg path * feat: add a multiplatform agg executable * fix: fix agg path * fix: fix agg version * feat: add the `PROJECT_ROOT` constant * feat: add `LocalCommandBuilder` * feat: add functional tests * fix: fix typings * feat: now the example is using jetbrains mono * fix: remove `FontFamily` * fix: remove `FontFamily` feat: add validators for the `font_family` field * style: fix flake8 issues * test: run tests on MacOS * Update main.yml * fix: fix typo * fix: fix typo * fix: fix typo * fix: remove a windows "support" * docs: add a note for JetBrains Mono usage * fix: remove todos * docs: change `font_family` description * feat: add new WIP themes (JetBrains Light and JetBrains Dark)
- Loading branch information
Showing
17 changed files
with
282 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,49 +2,63 @@ name: Python build | |
|
||
on: [push] | ||
|
||
env: | ||
JETBRAINS_MONO_VERSION: 2.304 | ||
PYTHON_VERSION: "3.8" | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install virtualenv | ||
run: | | ||
sudo apt update | ||
sudo apt install python3-pip | ||
python -m pip install virtualenv | ||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Cache Python virtual environment | ||
id: pip-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./.venv | ||
path: ./venv | ||
key: ${{ runner.os }}-pip-cache-${{ hashFiles('./requirements*.txt') }} | ||
|
||
- name: Install Python requirements | ||
if: steps.pip-cache.outputs.cache-hit != 'true' | ||
run: | | ||
virtualenv ./.venv | ||
source ./.venv/bin/activate | ||
pip install -r ./requirements.txt -r ./requirements-code-style.txt | ||
python3 -m venv venv | ||
source venv/bin/activate | ||
pip install -r ./requirements.txt -r ./requirements-code-style.txt -r ./requirements-test.txt | ||
code-style: | ||
needs: setup | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Cache Python virtual environment | ||
id: pip-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./.venv | ||
path: ./venv | ||
key: ${{ runner.os }}-pip-cache-${{ hashFiles('./requirements*.txt') }} | ||
|
||
- name: Run python static code analyzers | ||
- name: Run Flake8 | ||
run: | | ||
source ./.venv/bin/activate | ||
source ./venv/bin/activate | ||
flake8 . --count --statistics --config ./.flake8 | ||
- name: Run Black | ||
|
@@ -54,17 +68,49 @@ jobs: | |
|
||
test: | ||
needs: code-style | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Cache Python virtual environment | ||
id: pip-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./venv | ||
key: ${{ runner.os }}-pip-cache-${{ hashFiles('./requirements*.txt') }} | ||
|
||
- name: Install anderson | ||
run: pip install . | ||
|
||
- name: Check anderson is working | ||
run: anderson "python3 ./examples/python_bot/main.py" ./examples/python_bot/out/ ./examples/python_bot/config.yaml --debug | ||
run: | | ||
source ./venv/bin/activate | ||
pip install . | ||
- name: Download JetBrains Mono | ||
run: | | ||
curl -sLO https://github.com/JetBrains/JetBrainsMono/releases/download/v$JETBRAINS_MONO_VERSION/JetBrainsMono-$JETBRAINS_MONO_VERSION.zip | ||
unzip JetBrainsMono-$JETBRAINS_MONO_VERSION.zip | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-bot-gifs | ||
path: ./examples/python_bot/out/ | ||
- name: Install JetBrains Mono on MacOS | ||
if: matrix.os == 'macos-latest' | ||
run: cp fonts/ttf/JetBrainsMono-Regular.ttf /Library/Fonts/ | ||
|
||
- name: Install JetBrains Mono on Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo cp fonts/ttf/JetBrainsMono-Regular.ttf /usr/local/share/fonts/ | ||
fc-cache -f -v | ||
- name: Test anderson | ||
run: | | ||
source ./venv/bin/activate | ||
pytest . -vv |
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 |
---|---|---|
|
@@ -107,3 +107,6 @@ fabric.properties | |
*.egg-info/ | ||
*.installed.cfg | ||
*.egg | ||
|
||
# Custom | ||
anderson/bin/* |
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
Binary file not shown.
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
gif_config: | ||
common: | ||
font_size: 32 | ||
font_family: JetBrains Mono | ||
|
||
gifs: | ||
- name: 'dark' | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,2 @@ | ||
pytest==7.2.2 | ||
pillow==9.4.0 |
Oops, something went wrong.