Skip to content

Commit

Permalink
Add black formatting and install GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
argenos committed Jun 19, 2024
1 parent d27f625 commit cf41cae
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Lint

on: [push]

jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: "--check --verbose"
src: "./src"
use_pyproject: true
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Continuous Integration

on: [pull_request]

jobs:
install:
runs-on: ubuntu-24.04
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install blender
run: |
sudo apt-get update
sudo apt-get install blender python3-pip python3-venv -y
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Generate composable models
run: |
textx generate models/examples/*.floorplan --target json-ld --output-path .
- name: Generate 3D mesh and occupancy grid
working-directory: ./src
run: |
blender --background --python-use-system-env --python exsce_floorplan/exsce_floorplan.py -- ../models/examples/brsu_building_c_with_doorways.floorplan
lint:
uses: ./.github/workflows/black.yaml
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ classifiers = [
]

[project.optional-dependencies]
dev =["wheel", "twine"]
dev =["wheel", "twine", "black>=24.4.2"]
test =[
"flake8",
"tox",
Expand All @@ -69,3 +69,6 @@ where = ["src"] # list of folders that contain the packages (["."] by default)

[tool.setuptools.package-data]
"*" = ["*.tx"]

[tool.black]
required-version = "24.4.2"

0 comments on commit cf41cae

Please sign in to comment.