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

Test CI #1131

Closed
wants to merge 28 commits into from
Closed

Test CI #1131

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ jobs:

- name: Unit tests
run: |
OMP_NUM_THREADS=2 pytest -vv pyccl --cov=pyccl --cov-report=lcov:lcov.info
OMP_NUM_THREADS=2 pytest -vv pyccl/tests/test_power.py --cov=pyccl --cov-report=lcov:lcov.info

- name: Benchmarks
run: |
OMP_NUM_THREADS=2 pytest -vv benchmarks --cov=pyccl --cov-report=lcov:lcov.info --cov-append
# - name: Benchmarks
# run: |
# OMP_NUM_THREADS=2 pytest -vv benchmarks --cov=pyccl --cov-report=lcov:lcov.info --cov-append

- name: Code coverage
if: matrix.label == 'linux-64'
Expand Down
8 changes: 4 additions & 4 deletions pyccl/tests/test_power.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def test_input_nonlinear_model():

pk_CCL_input = ccl.power.nonlin_matter_power(cosmo_input, k_arr, 0.5)

assert np.allclose(pk_CCL_input, pk_CCL, atol=0., rtol=1e-4)
assert np.allclose(pk_CCL_input, pk_CCL, atol=0., rtol=1.2e-5)

# Test extra power spectrum
kl_arr = np.logspace(-4, 1, 1000)
Expand All @@ -289,12 +289,12 @@ def test_input_nonlinear_model():

pk_CCL_input = cosmo_input.get_nonlin_power('a:b')(k_arr, 0.5,
cosmo_input)
assert np.allclose(pk_CCL_input, pk_CCL, atol=0., rtol=1e-4)
assert np.allclose(pk_CCL_input, pk_CCL, atol=0., rtol=1.2e-5)

# Via `nonlin_power`
pk_CCL_input = ccl.power.nonlin_power(cosmo_input, k_arr, 0.5,
p_of_k_a='a:b')
assert np.allclose(pk_CCL_input, pk_CCL, atol=0., rtol=1e-4)
assert np.allclose(pk_CCL_input, pk_CCL, atol=0., rtol=1.2e-5)

# Use dictionary
cosmo_input = ccl.CosmologyCalculator(
Expand All @@ -309,7 +309,7 @@ def test_input_nonlinear_model():
'c:d': None})
pk_CCL_input = ccl.power.nonlin_power(cosmo_input, k_arr, 0.5,
p_of_k_a='a:b')
assert np.allclose(pk_CCL_input, pk_CCL, atol=0., rtol=1e-4)
assert np.allclose(pk_CCL_input, pk_CCL, atol=0., rtol=1.2e-5)
assert 'c:d' not in cosmo_input._pk_nl


Expand Down
Loading