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

style: apply pre-commit #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ htmlcov/
pip-wheel-metadata/
src/21CMMC.egg-info/
devel/*.out
.vscode/
9 changes: 4 additions & 5 deletions src/py21cmmc/likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,15 +918,14 @@ def initialize_clik_and_class(self, name=None):
my_l_max_EE = max(my_clik_EE.get_lmax())
else:
raise AttributeError(
"I did not understand name %s"(name)
+ "please choose between"
+ "Planck_lensing, Planck_highl_TTTEEE, Planck_lowl_EE"
f"I did not understand name {name}. Please choose between"
"Planck_lensing, Planck_highl_TTTEEE, Planck_lowl_EE"
)
except AttributeError:
raise AttributeError(
"The path to the .clik file for the likelihood "
"%s was not found where indicated:\n%s\n" % (name, my_path)
+ " Note that the default path to search for it is"
f"{name} was not found where indicated: {my_path}\n"
" Note that the default path to search for it is"
" one directory above the path['clik'] field. You"
" can change this behaviour in all the "
"Planck_something.data, to reflect your local configuration, "
Expand Down
10 changes: 5 additions & 5 deletions tests/test_zeus.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_zeus():

core = p21mc.CoreCoevalModule(
redshift=[7, 8, 9],
user_params=dict(HII_DIM=50, BOX_LEN=125.0),
user_params={"HII_DIM": 50, "BOX_LEN": 125.0},
regenerate=False,
change_seed_every_iter=False,
)
Expand All @@ -32,10 +32,10 @@ def test_zeus():
likelihood,
datadir="data",
model_name=model_name,
params=dict(
HII_EFF_FACTOR=[30.0, 10.0, 50.0, 3.0],
ION_Tvir_MIN=[4.7, 4, 6, 0.1],
),
params={
"HII_EFF_FACTOR": [30.0, 10.0, 50.0, 3.0],
"ION_Tvir_MIN": [4.7, 4, 6, 0.1],
},
reuse_burnin=False,
continue_sampling=False,
use_zeus=True,
Expand Down