forked from handley-lab/anesthetic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed fastkde from test_samples * bump version to 2.1.1 * Added bump version script for convenience * Moved astropy to skip rather than fail, and marked all fastkde * removed erroneous kind check * Added utils * More updates for other conditional skipping * Changed getdist to be an importerror * Moved importerrors into the function itself * bump version to 2.1.2 * update merged changes to new `fastkde_skipif` functionality * Corrected merge of fastkde keys * Caught importerror * Renamed skipif functions * Converted xfails to xskips * Reverted tests * Reordered fastkde * converted xfails to skips * Removed final xskips * reinstated xskips --------- Co-authored-by: Lukas Hergt <[email protected]>
- Loading branch information
1 parent
4a35d6e
commit dc15c5b
Showing
14 changed files
with
440 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '2.1.4' | ||
__version__ = '2.1.5' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env python | ||
from utils import run | ||
from packaging import version | ||
import sys | ||
|
||
vfile = "anesthetic/_version.py" | ||
README = "README.rst" | ||
|
||
current_version = run("cat", vfile) | ||
current_version = current_version.split("=")[-1].strip().strip("'") | ||
current_version = version.parse(current_version) | ||
|
||
if len(sys.argv) > 1: | ||
update_type = sys.argv[1] | ||
else: | ||
update_type = "micro" | ||
|
||
major = current_version.major | ||
minor = current_version.minor | ||
micro = current_version.micro | ||
|
||
if update_type == "micro": | ||
micro+=1 | ||
elif update_type == "minor": | ||
minor+=1 | ||
micro=0 | ||
elif update_type == "major": | ||
major+=1 | ||
minor=0 | ||
micro=0 | ||
|
||
new_version = version.parse(f"{major}.{minor}.{micro}") | ||
|
||
for f in [vfile, README]: | ||
run("sed", "-i", f"s/{current_version}/{new_version}/g", f) | ||
|
||
run("git", "add", vfile, README) | ||
run("git", "commit", "-m", f"bump version to {new_version}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
from anesthetic import read_chains | ||
from anesthetic.convert import to_getdist | ||
from numpy.testing import assert_array_equal | ||
from utils import getdist_mark_xfail | ||
|
||
|
||
@getdist_mark_xfail | ||
def test_to_getdist(): | ||
try: | ||
anesthetic_samples = read_chains('./tests/example_data/gd') | ||
getdist_samples = to_getdist(anesthetic_samples) | ||
anesthetic_samples = read_chains('./tests/example_data/gd') | ||
getdist_samples = to_getdist(anesthetic_samples) | ||
|
||
assert_array_equal(getdist_samples.samples, anesthetic_samples) | ||
assert_array_equal(getdist_samples.weights, | ||
anesthetic_samples.get_weights()) | ||
assert_array_equal(getdist_samples.samples, anesthetic_samples) | ||
assert_array_equal(getdist_samples.weights, | ||
anesthetic_samples.get_weights()) | ||
|
||
for param, p in zip(getdist_samples.getParamNames().names, | ||
anesthetic_samples.drop_labels().columns): | ||
for param, p in zip(getdist_samples.getParamNames().names, | ||
anesthetic_samples.drop_labels().columns): | ||
|
||
assert param.name == p | ||
except ModuleNotFoundError: | ||
pass | ||
assert param.name == p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.