Skip to content

Commit f009fc4

Browse files
committed
v0.1.0
- Added support for evaluating Basilisp code from Blender's Python console, file, and Text Editor. - Implemented functionality to start the nREPL server from Blender.
0 parents  commit f009fc4

27 files changed

+3422
-0
lines changed

.github/workflows/release.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# adapted from https://github.com/anze3db/words-tui/blob/main/.github/workflows/publish.yml
2+
name: Publish to PyPI
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
deploy:
13+
14+
runs-on: ubuntu-latest
15+
16+
environment: release
17+
permissions:
18+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
19+
contents: write # github release upload
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.12'
27+
cache: 'pip'
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install poetry
32+
- name: Build package
33+
run: poetry build
34+
- name: Upload release artifacts
35+
run: gh release upload ${{ github.event.release.tag_name }} dist/*.{tar.gz,whl}
36+
env:
37+
GH_TOKEN: ${{ github.token }}
38+
- name: Publish package distributions to PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/tests-run.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Run tests
2+
3+
on:
4+
pull_request:
5+
types: [ opened, synchronize, reopened ]
6+
push:
7+
branches: [ main ]
8+
9+
concurrency:
10+
group: ${{ github.ref }}-${{ github.workflow }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
run-tests:
15+
runs-on: ${{matrix.os}}
16+
env:
17+
BB_BLENDER_TEST_HOME: "~/blender"
18+
strategy:
19+
matrix:
20+
os: [ubuntu-latest, windows-latest, macos-latest]
21+
version: ['3.11']
22+
blender: ['4.2.0']
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-python@v4
27+
with:
28+
python-version: ${{ matrix.version }}
29+
30+
- name: Install poetry
31+
uses: abatilo/actions-poetry@v2
32+
33+
- name: Setup a local virtual environment
34+
run: |
35+
poetry config virtualenvs.create true --local
36+
poetry config virtualenvs.in-project true --local
37+
- uses: actions/cache@v3
38+
name: Define a cache for the virtual environment based on the dependencies lock file
39+
with:
40+
path: ./.venv
41+
key: venv-${{ runner.os }}-${{ matrix.version }}-${{ hashFiles('poetry.lock') }}
42+
43+
- name: Install the project dependencies
44+
run: poetry install
45+
46+
- name: Run tests
47+
run: poetry run pytest -v
48+
49+
- name: Restore Blender from cache
50+
id: cache-blender
51+
uses: actions/cache/restore@v3
52+
with:
53+
path: ~/blender
54+
key: ${{ runner.os }}-blender-${{ matrix.blender }}
55+
56+
- name: Install Blender
57+
if: steps.cache-blender.outputs.cache-hit != 'true'
58+
run: |
59+
poetry run python scripts/blender_install.py ${{ matrix.blender }}
60+
61+
- name: "Save Blender in cache"
62+
if: steps.cache-blender.outputs.cache-hit != 'true'
63+
uses: actions/cache/save@v3
64+
with:
65+
path: ~/blender
66+
key: ${{ steps.cache-blender.outputs.cache-primary-key }}
67+
68+
- name: Install EGL mesa
69+
if: "startsWith (matrix.os, 'ubuntu')"
70+
run: |
71+
sudo apt-get update -y -qq
72+
sudo apt-get install -y -qq libegl1-mesa libegl1-mesa-dev
73+
74+
- name: Run integration tests
75+
run: |
76+
poetry build
77+
poetry run python scripts/bb_package_install.py
78+
poetry run pytest -m integration -v

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
__pycache__/
2+
*.py[cod]
3+
*$py.class
4+
5+
.bb-tmp
6+
dist/
7+
8+
\#*#
9+
.#*
10+
*~
11+
12+
.nrepl-port

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
## Unreleased
4+
5+
## 0.1.0
6+
7+
- Added support for evaluating Basilisp code from Blender's Python console, file, and Text Editor.
8+
- Implemented functionality to start the nREPL server from Blender.
9+
10+

0 commit comments

Comments
 (0)