Skip to content

Commit 52cebe5

Browse files
committed
Set up Github Actions for running tests
1 parent 5735bbf commit 52cebe5

File tree

5 files changed

+53
-2
lines changed

5 files changed

+53
-2
lines changed

.github/workflows/lint.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- uses: actions/setup-python@v2
10+
- name: Set up Python 3.8
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: "3.8"
1114
- uses: psf/black@stable
1215
- name: Install dependencies
1316
run: pip install . flake8

.github/workflows/test.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will install Python dependencies and run tests with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Test
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
schedule:
12+
- cron: "0 0 1 1/1 *" # Run monthly
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, windows-latest, macos-latest]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Set up Python 3.8
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: "3.8"
27+
- name: Install dependencies
28+
run: |
29+
pip install pytest .
30+
- name: Test with pytest
31+
run: |
32+
pytest

seer_pas_sdk/core/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import ssl
88
import shutil
99

10+
from typing import List as _List
11+
1012
from ..common import *
1113
from ..auth import Auth
1214
from ..objects import PlateMap
@@ -939,7 +941,7 @@ def list_ms_data_files(self, folder="", space=None):
939941
return files.json()["filesList"]
940942

941943
def download_ms_data_files(
942-
self, paths: list[str], download_path: str, space: str = None
944+
self, paths: _List[str], download_path: str, space: str = None
943945
):
944946
"""
945947
Downloads all MS data files for paths passed in the params to the specified download path.

tests/conftest.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""
2+
`conftest.py` -- common fixtures and other pytest config
3+
"""

tests/test_sdk.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""
2+
`test_sdk` -- high-level tests for the seer-pas-sdk package
3+
"""
4+
5+
6+
def test_import():
7+
"""
8+
Stub test that importing the root module is successful.
9+
TODO: replace this with more meaningful tests
10+
"""
11+
import seer_pas_sdk

0 commit comments

Comments
 (0)