Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
- Added support for evaluating Basilisp code from Blender's Python console, file, and Text Editor.
- Implemented functionality to start the nREPL server from Blender.
  • Loading branch information
ikappaki committed Aug 3, 2024
0 parents commit f009fc4
Show file tree
Hide file tree
Showing 27 changed files with 3,422 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# adapted from https://github.com/anze3db/words-tui/blob/main/.github/workflows/publish.yml
name: Publish to PyPI

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

environment: release
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write # github release upload

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build package
run: poetry build
- name: Upload release artifacts
run: gh release upload ${{ github.event.release.tag_name }} dist/*.{tar.gz,whl}
env:
GH_TOKEN: ${{ github.token }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
78 changes: 78 additions & 0 deletions .github/workflows/tests-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Run tests

on:
pull_request:
types: [ opened, synchronize, reopened ]
push:
branches: [ main ]

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
run-tests:
runs-on: ${{matrix.os}}
env:
BB_BLENDER_TEST_HOME: "~/blender"
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
version: ['3.11']
blender: ['4.2.0']

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}

- name: Install poetry
uses: abatilo/actions-poetry@v2

- name: Setup a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ runner.os }}-${{ matrix.version }}-${{ hashFiles('poetry.lock') }}

- name: Install the project dependencies
run: poetry install

- name: Run tests
run: poetry run pytest -v

- name: Restore Blender from cache
id: cache-blender
uses: actions/cache/restore@v3
with:
path: ~/blender
key: ${{ runner.os }}-blender-${{ matrix.blender }}

- name: Install Blender
if: steps.cache-blender.outputs.cache-hit != 'true'
run: |
poetry run python scripts/blender_install.py ${{ matrix.blender }}
- name: "Save Blender in cache"
if: steps.cache-blender.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: ~/blender
key: ${{ steps.cache-blender.outputs.cache-primary-key }}

- name: Install EGL mesa
if: "startsWith (matrix.os, 'ubuntu')"
run: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq libegl1-mesa libegl1-mesa-dev
- name: Run integration tests
run: |
poetry build
poetry run python scripts/bb_package_install.py
poetry run pytest -m integration -v
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
__pycache__/
*.py[cod]
*$py.class

.bb-tmp
dist/

\#*#
.#*
*~

.nrepl-port
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

## Unreleased

## 0.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.


Loading

0 comments on commit f009fc4

Please sign in to comment.