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

Draft pre-init ingression #102

Merged
merged 19 commits into from
Sep 23, 2024
Merged

Draft pre-init ingression #102

merged 19 commits into from
Sep 23, 2024

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Aug 30, 2024

Just a template for integrating @smeisler's ingression package.

Changes proposed in this pull request

Documentation that should be reviewed

@tsalo
Copy link
Member Author

tsalo commented Aug 30, 2024

The conflict is caused by:
    qsirecon 0.1.dev50+gfb6bacf depends on nibabel<=5.2.0
    ingress2qsirecon 0.1.0 depends on nibabel<6.0.0 and >=5.2.1
The conflict is caused by:
    qsirecon 0.1.dev679+g60e4cea.d20240830 depends on nilearn==0.10.1
    ingress2qsirecon 0.1.0 depends on nilearn<0.11.0 and >=0.10.4

@smeisler
Copy link
Contributor

None of my versions pinned for ingress2qsirecon are strictly necessary, so if it would be easier for you if I change it to match qsiprep/recon, let me know.

@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 32 lines in your changes missing coverage. Please review.

Project coverage is 33.74%. Comparing base (361e27f) to head (69f3fd7).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
qsirecon/cli/parser.py 25.00% 15 Missing and 3 partials ⚠️
qsirecon/workflows/base.py 0.00% 13 Missing ⚠️
qsirecon/workflows/recon/anatomical.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
+ Coverage   33.68%   33.74%   +0.05%     
==========================================
  Files          56       56              
  Lines        6937     6855      -82     
  Branches      910      901       -9     
==========================================
- Hits         2337     2313      -24     
+ Misses       4496     4437      -59     
- Partials      104      105       +1     
Flag Coverage Δ
33.74% <20.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tsalo
Copy link
Member Author

tsalo commented Aug 30, 2024

Now that tests are passing, @smeisler do you want to take over this PR and add any tests you might want?

qsirecon/cli/parser.py Outdated Show resolved Hide resolved
@smeisler smeisler self-requested a review September 19, 2024 18:24
@smeisler smeisler marked this pull request as ready for review September 19, 2024 18:24
Copy link
Contributor

@mattcieslak mattcieslak left a comment

Choose a reason for hiding this comment

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

A few minor questions, but I think this looks great

@@ -59,7 +59,10 @@ HCP Young Adult Preprocessed Data
=================================

To use minimally preprocessed dMRI data from HCP-YA specify ``--input-type hcpya``.
The included FNIRT transforms are usable directly. NOTE: this does not work yet.
Note that the transforms to/from MNI space are not able to be used at this time. Please note that if you have the
Copy link
Contributor

Choose a reason for hiding this comment

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

great idea to add this to the docs

pyproject.toml Outdated
"nibabel <= 5.2.0",
"nilearn == 0.10.1",
"nibabel <= 6.0.0",
"nilearn",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a need to unpin this one?

Copy link
Contributor

Choose a reason for hiding this comment

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

ah this was a holdout from some dependency differences between qsirecon and i2q, we should be able to pin it

Copy link
Contributor

Choose a reason for hiding this comment

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

done in last commit


# Make fake BIDS files
bids_scaffold = str(load_resource("bids_scaffold"))
if not op.exists(op.join(config.execution.bids_dir, "dataset_description.json")):
Copy link
Contributor

Choose a reason for hiding this comment

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

could you switch this to use pathlib instead of op? I think we're going to try to consistently use it to be in line with nipreps

Copy link
Contributor

Choose a reason for hiding this comment

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

Think I changed this, untested so far:

if config.workflow.input_type in ("hcpya", "ukb"):
        import shutil

        from ingress2qsirecon.data import load_resource
        from ingress2qsirecon.utils.functions import create_layout
        from ingress2qsirecon.utils.workflows import create_ingress2qsirecon_wf

        # Fake BIDS directory to be created
        config.execution.bids_dir = work_dir / "bids"

        # Make fake BIDS files
        bids_scaffold = load_resource("bids_scaffold")
        if not (config.execution.bids_dir / "dataset_description.json").exists():
            shutil.copytree(
                bids_scaffold,
                config.execution.bids_dir,
                dirs_exist_ok=True,
            )

qsirecon/workflows/base.py Show resolved Hide resolved
Copy link
Contributor

@mattcieslak mattcieslak left a comment

Choose a reason for hiding this comment

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

Excellent!

@mattcieslak mattcieslak merged commit b0005ad into main Sep 23, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants