Skip to content

Commit 2a7d50f

Browse files
committed
Lint and add lint workflow
1 parent 69c29d7 commit 2a7d50f

10 files changed

Lines changed: 482 additions & 348 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
on:
3+
- push
4+
jobs:
5+
black:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v6
9+
10+
- name: 'Set up Python'
11+
uses: actions/setup-python@v6
12+
with:
13+
python-version-file: './apps/symapi/.python-version'
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v7
17+
18+
- name: Setup Bun
19+
uses: oven-sh/setup-bun@v2
20+
21+
- name: Install JS deps
22+
run: bun install
23+
24+
- name: Lint
25+
run: bun lint:check

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Scripts
77

88
- `codegen`: generates essential code to run the applications
9-
- `dev`: development servers
9+
- `dev`: development servers

apps/ngy/src/app.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
html {
99
font-family: 'Fira Sans', sans-serif;
1010
}
11-
}
11+
}

apps/symapi/mathjson.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import sympy
33
from typing import cast
44

5-
65
type MathJSON = str | int | float | list["MathJSON"]
76

87

apps/symapi/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"name": "@learning/symapi",
33
"private": true,
44
"scripts": {
5-
"dev": "uv run fastapi dev main.py --port 8088"
5+
"dev": "uv run fastapi dev main.py --port 8088",
6+
"lint": "uv run black .",
7+
"lint:check": "uv run black --check ."
68
}
79
}

apps/symapi/pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ dependencies = [
99
"fastapi[standard]>=0.128.0",
1010
"sympy>=1.14.0",
1111
]
12+
13+
[dependency-groups]
14+
dev = [
15+
"black>=26.3.1",
16+
]

apps/symapi/uv.lock

Lines changed: 95 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"scripts": {
2323
"codegen": "turbo run codegen",
2424
"dev": "turbo run dev",
25+
"lint": "turbo run lint && prettier . --write",
26+
"lint:check": "turbo run lint:check && prettier . --check",
2527
"test": "turbo run test",
2628
"test:watch": "turbo run test:watch"
2729
},

0 commit comments

Comments
 (0)