-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] improve performance and testing (#618)
* update timing * try speed up test by not indexing dependencies * run on latest and oldest matlab * [DATALAD] Recorded changes * [DATALAD] Recorded changes * cancel previous runs * speed up some tests or functions * run slow and fast tests in parallel * windows env var fix * try using globals * fix * add more slow test * add doc
- Loading branch information
Showing
42 changed files
with
433 additions
and
306 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
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
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,6 +1,10 @@ | ||
--- | ||
name: 'matlab: tests' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
|
@@ -19,8 +23,9 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: [R2021a, R2021b, R2022a, R2022b] | ||
version: [R2021a, R2023a] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
test: [slow, fast] | ||
|
||
|
||
runs-on: ${{matrix.os}} | ||
|
@@ -57,7 +62,15 @@ jobs: | |
git clone https://github.com/MOxUnit/MOxUnit.git --depth 1 | ||
git clone https://github.com/MOcov/MOcov.git --depth 1 | ||
- name: Run commands | ||
- name: Run slow tests | ||
if: matrix.test == 'slow' | ||
uses: matlab-actions/[email protected] | ||
with: | ||
command: run MOxUnit/MOxUnit/moxunit_set_path(); addpath(fullfile(pwd, 'MOcov', 'MOcov')); global SLOW; SLOW=true; addpath(getenv('GITHUB_WORKSPACE')); | ||
success = run_tests(); assert(success); | ||
|
||
- name: Run fast tests | ||
if: matrix.test == 'fast' | ||
uses: matlab-actions/[email protected] | ||
with: | ||
command: run MOxUnit/MOxUnit/moxunit_set_path(); addpath(fullfile(pwd, 'MOcov', 'MOcov')); addpath(getenv('GITHUB_WORKSPACE')); success = run_tests(); | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -24,6 +24,7 @@ To see how to install BIDS-Matlab, please check | |
stats_model | ||
transformers | ||
schema | ||
performance | ||
dev_doc | ||
|
||
|
||
|
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,21 @@ | ||
Performance | ||
*********** | ||
|
||
bids-matlab's performance may vary | ||
depending on which options you choose for indexing with :func:`bids.layout`. | ||
|
||
Relying on the BIDS schema (``'use_schema', true``) to only include files that comply with it | ||
may slow down performance a bit. | ||
|
||
Index dependencies (``'index_dependencies', true``) to detect files | ||
with explicit dependencies between them | ||
(for example when a fieldmap mentions that is intended for a specific bold run) | ||
is much slower and you may consider setting this to ``false`` | ||
when if you know that you have no such dependencies in your dataset. | ||
|
||
|
||
.. _fig_benchmark: | ||
.. figure:: images/timing.png | ||
:align: center | ||
|
||
layout indexing performance depending on chosen options |
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
Oops, something went wrong.