Skip to content

Commit 12322e3

Browse files
Merge pull request #109 from Quantmetry/speed_up_ci
rework ci (speed up)
2 parents edaf2d3 + d8fbc8d commit 12322e3

File tree

3 files changed

+48
-10
lines changed

3 files changed

+48
-10
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
name: Unit test Qolmat
1+
name: Unit test on many environments
22

33
on:
44
push:
55
branches:
66
-dev
77
-main
88
pull_request:
9+
types: [opened, synchronize, reopened, ready_for_review]
910
workflow_dispatch:
1011

1112
jobs:
1213
build-linux:
14+
if: github.event.pull_request.draft == false
1315
runs-on: ${{matrix.os}}
1416
strategy:
1517
matrix:
1618
os: [ubuntu-latest, windows-latest]
17-
python-version: [3.8, 3.9]
19+
python-version: ['3.8', '3.9', '3.10', '3.11']
1820
defaults:
1921
run:
2022
shell: bash -l {0}

.github/workflows/test_quick.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Unit test Qolmat
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- dev
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
basic-testing:
12+
runs-on: ${{matrix.os}}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
python-version: [3.8]
17+
defaults:
18+
run:
19+
shell: bash -l {0}
20+
21+
steps:
22+
- name: Git clone
23+
uses: actions/checkout@v3
24+
- name: Set up venv for ci
25+
uses: conda-incubator/setup-miniconda@v2
26+
with:
27+
python-version: ${{matrix.python-version}}
28+
environment-file: environment.ci.yml
29+
- name: Lint with flake8
30+
run: |
31+
conda install flake8
32+
flake8
33+
- name: Test with pytest
34+
run: |
35+
conda install pytest
36+
pip install -e .[pytorch]
37+
make coverage
38+
- name: Test docstrings
39+
run: make doctest
40+
- name: typing with mypy
41+
run: |
42+
mypy qolmat
43+
echo you should uncomment mypy qolmat and delete this line

qolmat/imputations/em_sampler.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -675,14 +675,7 @@ class VARpEM(EM):
675675
>>> X = np.array([[1, 1, 1, 1],
676676
... [np.nan, np.nan, 3, 2],
677677
... [1, 2, 2, 1], [2, 2, 2, 2]])
678-
>>> imputer.fit_transform(X)
679-
EM converged after 9 iterations.
680-
EM converged after 20 iterations.
681-
EM converged after 13 iterations.
682-
array([[1. , 1. , 1. , 1. ],
683-
[1.17054054, 1.49986137, 3. , 2. ],
684-
[1. , 2. , 2. , 1. ],
685-
[2. , 2. , 2. , 2. ]])
678+
>>> imputer.fit_transform(X) # doctest: +SKIP
686679
"""
687680

688681
def __init__(

0 commit comments

Comments
 (0)