Conversation
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-20.04] |
There was a problem hiding this comment.
Do we want to test with different OS?
There was a problem hiding this comment.
probably higher priority is different python versions (since python versions seem to cause more problems)... I suppose, assuming that the tests can run pretty quickly.
There was a problem hiding this comment.
Now set up to test in parallel python 3.7 to python 3.9 on ubuntu, mac, windows
There was a problem hiding this comment.
Running the tests themselves takes about a minute in CI. But the whole takes a bit more time than this because of the set up and tear down
|
Trying to test against actual values, I realizing that the Is this intentional? In [65]: tmp = np.load("TYPEB_FITHRF.npy", allow_pickle=True)
...: print(tmp.item(0)["HRFindex"].shape)
...:
...: tmp = np.load("TYPEC_FITHRF_GLMDENOISE.npy", allow_pickle=True)
...: print(tmp.item(0)["HRFindex"].shape)
...:
...: tmp = np.load("TYPED_FITHRF_GLMDENOISE_RR.npy", allow_pickle=True)
...: print(tmp.item(0)["HRFindex"].shape)
(20, 20, 1)
(20, 20, 1)
(400,) |
Looks like this is because there is not a GLMsingle/glmsingle/glmsingle.py Line 1386 in 0d835eb in an "else" block for model 3 as there is for model 2. |
This is now set up |
|
|
||
| [](https://github.com/cvnlab/GLMsingle/actions/workflows/run_tests_python.yml) | ||
| [](https://github.com/cvnlab/GLMsingle/actions/workflows/run_demos_python.yml) | ||
| [](https://codecov.io/gh/Remi-Gau/GLMsingle) |
There was a problem hiding this comment.
The code coverage is not yet uploaded and so this might require some tweaking after merging:
- setting up an account for cvnlab on codecov (can simply link the github account)
- changing the URL of this badge
But once set up you can know how pull request change the code coverage: like this
Remi-Gau#3 (comment)
README.md
Outdated
| Code dependencies: see [requirements.txt](./requirements.txt) | ||
|
|
||
| Notes: | ||
| * Please note that GLMsingle is not (yet) compatible with Python 3.9 (due to an incompatibility between scikit-learn and Python 3.9). Please use Python 3.8 or earlier. |
There was a problem hiding this comment.
I have removed this since the tests pass with python 3.9.
But there seem to be a different issue with python 3.10 and numpy: I can investigate but I would not consider necessary for this PR
| fracridge>=1.4.3 | ||
| h5py>=3.1.0 | ||
| matplotlib>=3.3.4 | ||
| nibabel>=3.2.2 | ||
| numpy>=1.17.0 | ||
| scikit-learn>=0.23.2 | ||
| scipy>=1.5.4 | ||
| tqdm>=4.63.1 No newline at end of file |
There was a problem hiding this comment.
I have pinned the dependency minimum version for GLMsingle to be those that were installed by default when using python 3.6.
setup.py
Outdated
| setup( | ||
| name='GLMsingle', | ||
| version='0.0.1', | ||
| version='1.0.0', |
There was a problem hiding this comment.
To match what the README and the github tag say
| zip_safe=False, | ||
| install_requires=requires | ||
| install_requires=requires, | ||
| python_requires='>=3.6, <3.10' |
There was a problem hiding this comment.
Specifying which python version to use
| # TODO use same expected data for Python and MATLAB ? | ||
| # TODO in both cases expected results should probably be in a set of CSV files | ||
| # tmp = sio.loadmat(join(expected_dir, "TYPEB_FITHRF.mat")) | ||
| # expected["typeb"]["HRFindex"] = tmp["HRFindex"] |
There was a problem hiding this comment.
In the long run we probably do not want to have different expected data for MATLAB and python, a set of CSV files to read from for both languages could be easier to handle, more interoperable and easier to inspect too.
|
@iancharest |
| [black](https://black.readthedocs.io/en/stable/) (code formater) and | ||
| [flake8](https://flake8.pycqa.org/en/latest/) (style guide enforcement) are used | ||
| on the test code base. | ||
|
|
||
| Ypu can use make to run them automatically with | ||
|
|
||
| ```bash | ||
| make lint/black # to run black | ||
| make lint/flake8 # to run flake8 | ||
| make lint # to run both | ||
| ``` |
There was a problem hiding this comment.
Some of those are for code styling, so it does not have to be done manually. Only applies to the test code base.
Can remove it if you want.
I think that sounds about right. Basically, the code tries to flexibly handle X Y Z (volume) data, or A (surface) data, and there are funny reshapings that have to happen. Hopefully you and @iancharest can sort this out and put this into this pull request. |
Because this has not been merged, the results of the Github continuous integration woklfows are for now only viewable in the action tab of my fork
The initial commit of this PR is common to #44 (some changes are common to both PR and this might help prevent merge conflicts).
relates to #33
TODO
DONE