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

ENH: Add overwrite #367

Merged
merged 5 commits into from
Sep 12, 2024
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
15 changes: 7 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
version: 2
version: 2.1
jobs:
build_docs:
docker:
- image: cimg/python:3.9.12
- image: cimg/python:3.12.6
steps:
# Get our data and merge with upstream
- checkout
- run: sudo apt update && sudo apt install graphviz-dev graphviz
- run: python -m pip install --quiet --upgrade --user pip
- run: python -m pip install --quiet --upgrade --user numpy scipy git+https://github.com/mne-tools/mne-python@main numpydoc sphinx sphinx_fontawesome sphinx_bootstrap_theme pygraphviz
- run: python -c "import mne; mne.sys_info()"
- run: python setup.py develop --user
- run: cd doc && make html
- run: python -m pip install --upgrade --user git+https://github.com/mne-tools/mne-python@main numpydoc sphinx sphinx_fontawesome sphinx_bootstrap_theme pygraphviz
- run: mne sys_info
- run: pip install -ve .
- run: make -C doc html

- store_artifacts:
path: doc/_build/html/
Expand All @@ -25,7 +25,7 @@ jobs:

deploy:
docker:
- image: cimg/python:3.9.12
- image: cimg/python:3.12.6
steps:
- add_ssh_keys:
fingerprints:
Expand Down Expand Up @@ -55,7 +55,6 @@ jobs:
git push origin main

workflows:
version: 2
build_and_deploy:
jobs:
- build_docs
Expand Down
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
actions:
patterns:
- "*"
10 changes: 8 additions & 2 deletions mnefun/_ssp.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,21 @@ def do_preprocessing_combined(p, subjects, run_indices):
print(' obtained %d epochs from %d events.' % (len(ecg_epochs),
len(ecg_events)))
if len(ecg_epochs) >= 20:
write_events(ecg_eve, ecg_epochs.events)
kwargs = dict()
if "overwrite" in get_args(write_events):
kwargs["overwrite"] = True
write_events(ecg_eve, ecg_epochs.events, **kwargs)
ecg_epochs.save(ecg_epo, **_get_epo_kwargs())
desc_prefix = 'ECG-%s-%s' % tuple(ecg_t_lims)
pr = compute_proj_wrap(
ecg_epochs, p.proj_ave, n_grad=proj_nums[0][0],
n_mag=proj_nums[0][1], n_eeg=proj_nums[0][2],
desc_prefix=desc_prefix, **proj_kwargs)
assert len(pr) == np.sum(proj_nums[0][::p_sl])
write_proj(ecg_proj, pr)
kwargs = dict()
if "overwrite" in get_args(write_events):
kwargs["overwrite"] = True
write_proj(ecg_proj, pr, **kwargs)
projs.extend(pr)
else:
_raise_bad_epochs(raw, ecg_epochs, ecg_events, 'ECG',
Expand Down
Loading