Skip to content
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

Add base classes to inherit for wrappers #2

Merged
merged 8 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
add github workflow for unit tests and linting
  • Loading branch information
svirpioj committed Jun 26, 2024
commit 89b42e024928d3ac07aeeb88735a7238308f8b53
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Run Python Tests
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
# schedule:
# # Run on Tuesdays at 5:59
# - cron: '59 5 * * 2'
workflow_dispatch:
jobs:
build-n-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m ensurepip --upgrade
python -m pip install --upgrade setuptools
python -m pip install --upgrade pip
python -m pip install flake8
python -m pip install .[test]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
python -m flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings
python -m flake8 --count --exit-zero --statistics
- name: Run tests with pytest
run: python -m pytest
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"swa_gaussian>=0.1.6"
],
extras_require={
"test": ["datasets", "nose", "sentencepiece"]
"test": ["datasets", "pytest", "sentencepiece"]
},
classifiers=[
"Development Status :: 3 - Alpha",
Expand Down