Skip to content

STY: Dont log info messages by default #293

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

Merged
merged 2 commits into from
May 18, 2020
Merged
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
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ before_install:
- pip install vtk
- pip install mayavi
- mkdir -p $SUBJECTS_DIR
- pip install "https://api.github.com/repos/mne-tools/mne-python/zipball/master"
- if [ "${PYTHON_VERSION}" == "3.5" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could drop 3.5 support? Most pydata packages have...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it in another PR. It would be good to do that while also adding 3.8 now that VTK9 is out. But that might require quite a few iterations...

pip install "mne<0.21";
else
pip install "https://api.github.com/repos/mne-tools/mne-python/zipball/master";
fi;
- python -c "import mne; mne.datasets.fetch_fsaverage(verbose=True)"

install:
Expand Down
2 changes: 1 addition & 1 deletion surfer/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def project_volume_data(filepath, hemi, reg_file=None, subject_id=None,
# Execute the command
out_file = mktemp(prefix="pysurfer-v2s", suffix='.mgz')
cmd_list.extend(["--o", out_file])
logger.info(" ".join(cmd_list))
logger.debug(" ".join(cmd_list))
p = Popen(cmd_list, stdout=PIPE, stderr=PIPE, env=env)
stdout, stderr = p.communicate()
out = p.returncode
Expand Down
6 changes: 3 additions & 3 deletions surfer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def _nearest(vertices, adj_mat):

def _smooth(vertices, adj_mat, smoothing_steps):
from scipy import sparse
logger.info("Updating smoothing matrix, be patient..")
logger.debug("Updating smoothing matrix, be patient..")
e = adj_mat.copy()
e.data[e.data == 2] = 1
n_vertices = e.shape[0]
Expand All @@ -626,7 +626,7 @@ def _smooth(vertices, adj_mat, smoothing_steps):

smooth_mat = scale_mat * e_use[idx_use, :] * smooth_mat

logger.info("Smoothing matrix creation, step %d" % (k + 1))
logger.debug("Smoothing matrix creation, step %d" % (k + 1))
if smoothing_steps is None and len(idx_use) >= n_vertices:
break

Expand Down Expand Up @@ -690,7 +690,7 @@ def coord_to_label(subject_id, coord, label, hemi='lh', n_steps=30,
idx = np.where(data.ravel() > 0)[0]
# Write label
label_fname = label + '-' + hemi + '.label'
logger.info("Saving label : %s" % label_fname)
logger.debug("Saving label : %s" % label_fname)
f = open(label_fname, 'w')
f.write('#label at %s from subject %s\n' % (coord, subject_id))
f.write('%d\n' % len(idx))
Expand Down
7 changes: 4 additions & 3 deletions surfer/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -2977,12 +2977,13 @@ def _scale_mayavi_lut(lut_table, fmin, fmid, fmax, transparent,

trstr = ['(opaque)', '(transparent)']
if divergent:
logger.info(
logger.debug(
"colormap divergent: center=%0.2e, [%0.2e, %0.2e, %0.2e] %s"
% (center, fmin, fmid, fmax, trstr[transparent]))
else:
logger.info("colormap sequential: [%0.2e, %0.2e, %0.2e] %s"
% (fmin, fmid, fmax, trstr[transparent]))
logger.debug(
"colormap sequential: [%0.2e, %0.2e, %0.2e] %s"
% (fmin, fmid, fmax, trstr[transparent]))

n_colors = lut_table.shape[0]

Expand Down