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

🔀 Backmerge sgiavasis/C-PAC-1#2 to bids_ingress branch for sgiavasis/C-PAC-1#1 #2142

Open
wants to merge 106 commits into
base: bids_ingress
Choose a base branch
from

Conversation

shnizzedy
Copy link
Member

Fixes

Resolves merge conflicts for sgiavasis#1 by merging 532322d (sgiavasis/C-PAC-1@develop after merging sgiavasis#2) onto 61d8b6d (latest commit to head branch for sgiavasis#1 as of now)

Description

This is a pretty big PR, just because sgiavasis#2 was a pretty big PR. sgiavasis/C-PAC-1@532322d...FCP-INDI:C-PAC:d5722da1840ad7a66a73ced25583590f9d251970#files_bucket is the diff between the head of this branch and the head of sgiavasis/C-PAC-1@develop (i.e., what the diff will be for sgiavasis#1 if this PR is merged).

Technical details

This PR is almost entirely just merging the changes from sgiavasis#2 and updating tests (see below).

changed logger.warning() + print() + sys.exit()raise Exception()

Changed

except Exception as e: # TODO: raise exception
WFLOGGER.warning("Could not create bids table: %s", e)
print("Could not create bids table: %s", e)
sys.exit(1)
to
except Exception as e:
msg = f"Could not create bids table: {e}"
raise ValueError(msg) from e

Tests

Failing

The tests that are failing are because bids_ingress isn't done yet.

test_motion_filter_connections

I dropped some dummy inputs ("lateral-ventricles-mask", "TR", "scan", "subject") from this test initialization

before_this_test = create_dummy_node("created_before_this_test", pre_resources)
rpool = ResourcePool(cfg=c)
for resource in pre_resources:
if resource.endswith("xfm"):
rpool.set_data(
resource,
before_this_test,
resource,
{},
"",
f"created_before_this_test_{regtool}",
)
else:
rpool.set_data(
resource, before_this_test, resource, {}, "", "created_before_this_test"
)
because they're (also) coming into the resource pool from ingress methods and the nuisance connections were forking across the permutations of these from the dummy node and the ingress nodes. I'm not sure how/why this was a problem here but not before this PR 🤷

test_plugin_param

Updated

cfg = Configuration()
to
cfg = Configuration(
{
"pipeline_setup": {
"output_directory": {"path": str(tmp_path / "out")},
"working_directory": {"path": str(tmp_path / "work")},
"log_directory": {"path": str(tmp_path / "log")},
}
}
)
to use pytest's tmp_path to ensure writeable testing output directories (again, not sure why this became a problem in this branch 🤷)

set_subject doctest

Updated

>>> sub_dict = {'site_id': 'site1', 'subject_id': 'sub1',
... 'unique_id': 'uid1'}
>>> with TemporaryDirectory() as tmpdir:
... subject_id, p_name, log_dir = set_subject(
... sub_dict, Configuration({'pipeline_setup': {'log_directory':
... {'path': tmpdir}}}))
to
>>> sub_group = (('sub1', 'uid1', 'site1'), DataFrame([]))
>>> with TemporaryDirectory() as tmpdir:
... subject_id, p_name, log_dir = set_subject(
... sub_group, Configuration({'pipeline_setup': {'log_directory':
... {'path': tmpdir}}}))
to reflect changes in bids_ingress branch that were causing this doctest to fail

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the bids_ingress branch of the repository.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I updated the changelog.
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

[rebuild base-lite]
[rebuild base-standard]
[run reg-suite]
shnizzedy and others added 23 commits July 18, 2024 09:24
Bumps [setuptools](https://github.com/pypa/setuptools) from 68.0.0 to 70.0.0.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](pypa/setuptools@v68.0.0...v70.0.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
♻️ Split `ResourcePool` into three classes
Remove ones that will come from ingress from dummy node
@shnizzedy shnizzedy added the engine Internal implementation changes that may not be visible to users. label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Internal implementation changes that may not be visible to users.
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

3 participants