Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Michael Williams
bilby
Commits
34ec0cf7
Commit
34ec0cf7
authored
Mar 02, 2021
by
Colm Talbot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into fix-interpolant
parents
8dc76ce5
81fca8e3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
4 deletions
+27
-4
.gitlab-ci.yml
.gitlab-ci.yml
+16
-1
test/check_author_list.py
test/check_author_list.py
+1
-1
test/core/sampler/pymc3_test.py
test/core/sampler/pymc3_test.py
+3
-0
test/integration/sampler_run_test.py
test/integration/sampler_run_test.py
+7
-2
No files found.
.gitlab-ci.yml
View file @
34ec0cf7
...
...
@@ -12,6 +12,7 @@
stages
:
-
initial
-
test
-
docs
-
deploy
.test-python
:
&test-python
...
...
@@ -47,6 +48,8 @@ python-3.7:
image
:
quay.io/bilbydev/v2-dockerfile-test-suite-python37
script
:
-
python -m pip install .
# temporary fix for broken astropy version
-
pip install pyerfa==1.7.1.1
# Run pyflakes
-
flake8 .
...
...
@@ -62,12 +65,14 @@ python-3.7:
-
htmlcov/
docs
:
stage
:
initial
stage
:
docs
image
:
quay.io/bilbydev/v2-dockerfile-test-suite-python37
script
:
# Make the documentation
-
apt-get -yqq install pandoc
-
python -m pip install .
# temporary fix for broken astropy version
-
pip install pyerfa==1.7.1.1
-
cd docs
-
pip install ipykernel ipython jupyter
-
cp ../examples/tutorials/*.ipynb ./
...
...
@@ -88,6 +93,8 @@ python-3.8:
image
:
quay.io/bilbydev/v2-dockerfile-test-suite-python38
script
:
-
python -m pip install .
# temporary fix for broken astropy version
-
pip install pyerfa==1.7.1.1
-
pytest
...
...
@@ -97,6 +104,8 @@ python-3.6:
image
:
quay.io/bilbydev/v2-dockerfile-test-suite-python36
script
:
-
python -m pip install .
# temporary fix for broken astropy version
-
pip install pyerfa==1.7.1.1
-
pytest
...
...
@@ -106,6 +115,8 @@ python-3.7-samplers:
image
:
quay.io/bilbydev/v2-dockerfile-test-suite-python37
script
:
-
python -m pip install .
# temporary fix for broken astropy version
-
pip install pyerfa==1.7.1.1
-
pytest test/integration/sampler_run_test.py --durations
10
-
pytest test/integration/sample_from_the_prior_test.py
...
...
@@ -116,6 +127,8 @@ python-3.6-samplers:
image
:
quay.io/bilbydev/v2-dockerfile-test-suite-python36
script
:
-
python -m pip install .
# temporary fix for broken astropy version
-
pip install pyerfa==1.7.1.1
-
pytest test/integration/sampler_run_test.py
...
...
@@ -138,6 +151,8 @@ scheduled-python-3.7:
-
schedules
script
:
-
python -m pip install .
# temporary fix for broken astropy version
-
pip install pyerfa==1.7.1.1
# Run tests which are only done on schedule
-
pytest test/integration/example_test.py
...
...
test/check_author_list.py
View file @
34ec0cf7
...
...
@@ -21,7 +21,7 @@ for line in lines:
for
element
in
line
.
split
()[
1
:]:
element
=
element
.
lower
()
if
element
not
in
AUTHORS_list
and
element
not
in
special_cases
:
print
(
"Failure: {} not in AUTHOR.md"
.
format
(
element
)
)
print
(
f
"Failure:
{
element
}
not in AUTHOR.md"
)
fail_test
+=
True
if
fail_test
:
...
...
test/core/sampler/pymc3_test.py
View file @
34ec0cf7
import
unittest
import
pytest
import
sys
from
mock
import
MagicMock
import
bilby
@
pytest
.
mark
.
skipif
(
sys
.
version_info
[
1
]
<=
6
,
reason
=
"pymc3 is broken in py36"
)
class
TestPyMC3
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
likelihood
=
MagicMock
()
...
...
test/integration/sampler_run_test.py
View file @
34ec0cf7
import
bilby
import
unittest
import
numpy
as
np
import
pytest
import
shutil
import
sys
import
bilby
import
numpy
as
np
class
TestRunningSamplers
(
unittest
.
TestCase
):
...
...
@@ -103,6 +106,7 @@ class TestRunningSamplers(unittest.TestCase):
)
def
test_run_pypolychord
(
self
):
pytest
.
importorskip
(
"pypolychord"
)
_
=
bilby
.
run_sampler
(
likelihood
=
self
.
likelihood
,
priors
=
self
.
priors
,
...
...
@@ -124,6 +128,7 @@ class TestRunningSamplers(unittest.TestCase):
save
=
False
,
)
@
pytest
.
mark
.
skipif
(
sys
.
version_info
[
1
]
<=
6
,
reason
=
"pymc3 is broken in py36"
)
def
test_run_pymc3
(
self
):
_
=
bilby
.
run_sampler
(
likelihood
=
self
.
likelihood
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment