Skip to content

Commit

Permalink
Add autofix.ci to run stub file generation on pull request (#376)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Larson <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 2, 2024
1 parent b0334c1 commit 1a4c1a5
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 19 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ jobs:
runs-on: ubuntu-latest
name: draft PDF
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
- uses: actions/checkout@v4
- uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: paper/paper.md
- name: Upload
uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v4
with:
name: paper
# This is the output path where Pandoc will write the compiled PDF. Note, this
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylsl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Compare checksum
run: echo "$SHA256_PYLSL pylsl/pylsl.py" | sha256sum -c
- name: Create GitHub issue
if: failure()
if: ${{ failure() }}
uses: dacbd/create-issue-action@main
with:
token: ${{ github.token }}
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/stubs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: stubs
name: autofix.ci
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
Expand All @@ -9,14 +9,10 @@ on: # yamllint disable-line rule:truthy
workflow_dispatch:

jobs:
generate:
stubs:
timeout-minutes: 10
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- run: sudo apt update && sudo apt install -y binutils libpugixml-dev
- uses: actions/checkout@v4
with:
submodules: true
Expand All @@ -27,8 +23,10 @@ jobs:
- run: uv pip install -e .[stubs] --quiet --system
- run: mne-lsl sys-info --developer
- run: python tools/stubgen.py
- uses: autofix-ci/[email protected]
if: ${{ github.event_name == 'pull_request' }}
- name: Push stub files
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand Down
4 changes: 2 additions & 2 deletions src/mne_lsl/stream/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __contains__(self, ch_type: str) -> bool:
return super().__contains__(ch_type)

def __del__(self) -> None:
"""Try to disconnect the stream when deleting the object."""
"""Attempt to disconnect the stream when deleting the object."""
logger.debug("Deleting %s", self)
try:
self.disconnect()
Expand All @@ -85,7 +85,7 @@ def __repr__(self) -> str: # pragma: no cover

@abstractmethod
def acquire(self) -> None:
"""Pull new samples in the buffer.
"""Pull new samples in the internal circular buffer.
Notes
-----
Expand Down
4 changes: 2 additions & 2 deletions src/mne_lsl/stream/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ class BaseStream(ABC, ContainsMixin, SetChannelsMixin):
"""

def __del__(self) -> None:
"""Try to disconnect the stream when deleting the object."""
"""Attempt to disconnect the stream when deleting the object."""

@abstractmethod
def __repr__(self) -> str:
"""Representation of the instance."""

@abstractmethod
def acquire(self) -> None:
"""Pull new samples in the buffer.
"""Pull new samples in the internal circular buffer.
Notes
-----
Expand Down
2 changes: 1 addition & 1 deletion src/mne_lsl/stream/stream_lsl.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class StreamLSL(BaseStream):
"""Representation of the instance."""

def acquire(self) -> None:
"""Pull new samples in the buffer.
"""Pull new samples in the internal circular buffer.
Notes
-----
Expand Down

0 comments on commit 1a4c1a5

Please sign in to comment.