Skip to content
Open
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
49 changes: 49 additions & 0 deletions .github/workflows/beaker-vue-type-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Beaker ts/vue

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'beaker-vue/src/**'
- 'beaker-ts/src/**'
types: [opened, synchronize, reopened]

jobs:
type-check:
name: Run Typescript Check
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
cache-dependency-path: |
beaker-ts/package-lock.json
beaker-vue/package-lock.json

- name: Install and build beaker-ts
working-directory: beaker-ts
shell: bash
run: |
npm ci
npm run build

- name: Run beaker-ts type check
working-directory: beaker-ts
shell: bash
run: tsc --noEmit --strict

- name: Install dependencies for beaker-vue
working-directory: beaker-vue
shell: bash
run: npm ci

- name: Run beaker-vue type check
working-directory: beaker-vue
shell: bash
run: npm run type-check
38 changes: 38 additions & 0 deletions .github/workflows/beaker_kernel_python_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Beaker Kernel

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- 'beaker_kernel/lib/**'
- 'tests/**'
- 'pyproject.toml'
types: [opened, synchronize, reopened]

jobs:
test:
name: Run Python Tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can create a matrix to test both in 3.10 and 3.11, but for now I considered that unnecessary (not many tests yet, anyways)


- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install hatch
run: pip install hatch

- name: Run tests
run: hatch run test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hatch run test is different than hatch test, in that it runs the [tool.hatch.envs.default.scripts] test script, which uses pytest, which we configured. hatch test uses the hatch runner with its own config (I think it potentially would try to capture more tests than whatever we configure under the test script section in pyproject.toml).

2 changes: 1 addition & 1 deletion beaker-ts/src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ export class BeakerRenderer {
}

private _renderers: {[key: string]: IMimeRenderer};
}
}
4 changes: 2 additions & 2 deletions beaker-vue/src/components/cell/BeakerCodeCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</template>

<script setup lang="ts">
import { ref, shallowRef, computed, inject, getCurrentInstance, onBeforeMount, onBeforeUnmount, nextTick } from "vue";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused (lint fix)

import { ref, computed, inject, getCurrentInstance, onBeforeMount, onBeforeUnmount, nextTick } from "vue";
import CodeCellOutput from "./BeakerCodeCellOutput.vue";
import Badge from 'primevue/badge';
import Button from 'primevue/button';
Expand Down Expand Up @@ -88,7 +88,7 @@ const instance = getCurrentInstance();

const lintAnnotations = ref<{}[]>([]);

const emit = defineEmits([
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emit constant unused (lint fix)

defineEmits([
'blur',
])

Expand Down
2 changes: 1 addition & 1 deletion beaker_kernel/lib/code_analysis/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async def analyze(self, cells: AnalysisCodeCells) -> AnalysisAnnotations:
)
results = await asyncio.gather(*futures)

# Flatten results into a simple list of annotations
# flatten results into a simple list of annotations
raw_annotations = [
annotation for result in results
for annotation in result
Expand Down