-
Notifications
You must be signed in to change notification settings - Fork 1
Voltage Park migration -- set up workflows and pre-commit #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3e2f85f
8e8c42a
d40139d
c2a8a19
7ac377c
094c59d
fdd9fb7
22ae089
73bd0c1
88d333e
7d22355
9c83b99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Build | ||
|
|
||
| on: | ||
| # push: | ||
| # branches: [main] | ||
| # pull_request: | ||
| # branches: [main] | ||
| workflow_dispatch: | ||
|
Comment on lines
+4
to
+8
|
||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: [3.12] | ||
|
|
||
| # Skip CI if 'skip ci' is in the latest commit message (only relevant for push/pull_request triggers) | ||
| # if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
| # Will add back on skipping for draft PRs too. | ||
| # if: | | ||
| # !contains(github.event.head_commit.message, 'skip ci') && | ||
| # (github.event_name != 'pull_request' || !github.event.pull_request.draft) | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup UV and python version | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| version: "0.10.6" | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync --group dev | ||
|
|
||
| - name: Run tests | ||
| env: | ||
| TEST_DATA_DIR: ${{ github.workspace }}/tests/test_files | ||
| run: uv run pytest tests/ --cov=src --cov-report=html --cov-report=term-missing --cov-fail-under=80 | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,45 @@ | ||||||
| name: Lint | ||||||
|
|
||||||
| on: | ||||||
| # pull_request: | ||||||
| # branches: [main] | ||||||
| workflow_dispatch: | ||||||
|
|
||||||
| jobs: | ||||||
| ruff: | ||||||
| runs-on: ubuntu-latest | ||||||
| permissions: | ||||||
| contents: write | ||||||
|
|
||||||
| steps: | ||||||
| - uses: actions/checkout@v6 | ||||||
| with: | ||||||
| ref: ${{ github.head_ref }} | ||||||
|
||||||
| ref: ${{ github.head_ref }} | |
| ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| repos: | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.15.0 | ||
| hooks: | ||
| # Run the linter. | ||
| - id: ruff-check | ||
| args: [--verbose, --fix] | ||
| # Run the formatter. | ||
| - id: ruff-format | ||
| args: [--verbose] | ||
|
|
||
| - repo: local | ||
| hooks: | ||
| - id: ty | ||
| name: ty check | ||
| entry: uv run ty check | ||
| language: system | ||
| types: [python] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this yet? I'm not sure this package will build on the standard GitHub runners (in fact, I'm pretty sure it won't, since there are CUDA requirements like torch-geometric, but I could be wrong). We want to do this kind of testing (I have a similar file for sampleworks waiting in the wings) but we need our own runners first. Moody has this in the works, and it should be ready next week AFAIK.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build with the existing pyproject.toml actually ran fine? Technically the torch related packages can be installed with cpu kernels and the current tests don't seem to require gpu. But yes I am aware that the current workflow won't work for gpu explicit test. look forward to our own runner.