Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions .github/workflows/mapache-py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,8 @@ jobs:

- name: Lint
run: |
ruff format --check src/ tests/
ruff check src/ tests/
ruff format --check src/
ruff check src/

- name: Type check
run: mypy src/

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: |
3.10
3.11
3.12
3.13

- name: Test
run: |
for ver in 3.10 3.11 3.12 3.13; do
echo "::group::Python $ver"
python$ver -m pip install -e ".[dev]"
python$ver -m pytest tests/ -v
echo "::endgroup::"
done
19 changes: 0 additions & 19 deletions .github/workflows/query.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,6 @@ on:
- "v*"

jobs:
test:
runs-on: ubuntu-latest
name: Test
defaults:
run:
working-directory: query
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: pip install -e ".[dev]"

- name: Test
run: pytest tests/ -v

build:
runs-on: ${{ matrix.runner }}
name: Build ${{ matrix.platform }}
Expand Down
4 changes: 1 addition & 3 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"test": "vitest run",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"format": "npx prettier --write .",
"check": "npx prettier --check .",
Expand Down Expand Up @@ -88,7 +87,6 @@
"prettier-plugin-tailwindcss": "^0.5.14",
"tailwindcss": "^3.4.19",
"typescript": "^5.9.3",
"vite": "^5.4.21",
"vitest": "^2.1.9"
"vite": "^5.4.21"
}
}
4 changes: 2 additions & 2 deletions dashboard/src/components/signals/MqlEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function textToQueries(text: string, prev: QueryStmt[]): QueryStmt[] {
.filter((l) => l !== "");
if (lines.length === 0) {
// Never leave a widget with zero queries.
return [{ id: prev[0]?.id ?? newStmtId(), mql: "count(signal)" }];
return [{ id: prev[0]?.id ?? newStmtId(), mql: "count(signal.name)" }];
}
return lines.map((mql, i) => ({ id: prev[i]?.id ?? newStmtId(), mql }));
}
Expand Down Expand Up @@ -86,7 +86,7 @@ export function MqlEditor({ queries, onChange }: MqlEditorProps) {
className={cn(
"w-full resize-y rounded-md border bg-muted/30 px-2.5 py-2 font-mono text-xs leading-6 text-foreground/90 outline-none focus:border-primary/40",
)}
placeholder={"count(signal).where(name = \"ecu*\") -> ecu\ncount(signal).where(name != \"ecu*\") -> other\necu / other -> ratio"}
placeholder={"count(signal.name).where(name = \"ecu*\") -> ecu\ncount(signal.name).where(name != \"ecu*\") -> other\necu / other -> ratio"}
/>
{lineErrors.length > 0 ? (
<div className="flex flex-col gap-0.5">
Expand Down
Loading
Loading