Skip to content

Commit 3ed482c

Browse files
committed
Change tests a little, show versions of packages in GitHub Actions, use
ubuntu 20.04
1 parent d012e7f commit 3ed482c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
os: [ubuntu-18.04, windows-2019, macos-10.15]
17+
os: [ubuntu-20.04, windows-2019, macos-10.15]
1818
python-version: [3.6, 3.8]
1919
include:
2020
- os: windows-2019
@@ -93,6 +93,7 @@ jobs:
9393
9494
- name: Install momentsLD engine.
9595
run: |
96+
pip3 uninstall -y moments
9697
pip3 install Cython==0.29.18 # the last version cause erros on Windows and MacOS
9798
git clone --depth 1 --branch moments-1.1.11 https://bitbucket.org/simongravel/moments.git
9899
cd moments
@@ -114,6 +115,9 @@ jobs:
114115
python3 -c "import moments"
115116
python3 -c "import gadma"
116117
118+
- name: Show versions of all installed packages.
119+
run: python3 -m pip freeze
120+
117121
- name: Show available engines and optimizations in gadma.
118122
run: |
119123
python3 -c "import gadma;print(gadma.engines.engine._registered_engines.keys())"

tests/test_models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,11 +745,12 @@ def test_code_generation(self):
745745
else:
746746
new_model.Nanc_size = Nanc
747747
new_model.mutation_rate = 1.25e-8
748+
new_model.recombination_rate = 1.5e-8
748749
engine.model = new_model
749750
moments.LD.Inference._varcov_inv_cache = {}
750751

751752
cmd = engine.generate_code(input_values, None, *args, nanc=Nanc)
752-
#print(cmd)
753+
print(cmd)
753754
if engine.can_evaluate:
754755
# read data
755756
engine.data = data
@@ -758,6 +759,7 @@ def test_code_generation(self):
758759
exec(cmd, d)
759760

760761
msg += f": {true_ll} != {d['ll_model']}"
762+
print(true_ll, d["ll_model"])
761763
if true_ll is None: # if we have None
762764
assert engine.id in ['dadi', 'moments']
763765
max_ll = engine.base_module.Inference.ll(

0 commit comments

Comments
 (0)