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] Microscopy: Add validation of JSON for photo files #1415

Merged
merged 22 commits into from
Jul 19, 2022

Conversation

mariehbourget
Copy link
Contributor

@mariehbourget mariehbourget commented Feb 6, 2022

This PR adds validation of the new JSON file associated with microscopy photo files in:

Still WIP as the spec PR is not approved yet.

The new JSON file includes the IntendedFor field.
I used the same error code (37) and validation steps as in nii.js here.

New photos and associated JSON files are added in microscopy examples in:

@rwblair
Copy link
Member

rwblair commented Feb 11, 2022

These changes look good. I'm looking at a way to combine the logic from different parts of the validator. I'll update this PR accordingly depending on what I find.

@rwblair rwblair mentioned this pull request Feb 11, 2022
5 tasks
@mariehbourget
Copy link
Contributor Author

Hi @rwblair, is there any news on this PR?
Thanks!

@rwblair
Copy link
Member

rwblair commented Jul 8, 2022

@mariehbourget I made a PR against this branch:
neuropoly#8

Adds some tests and rebases on master. I also tested against the bids-examples branch and it worked as expected.Once tests are passing for this I'll go ahead and merge it.

@mariehbourget
Copy link
Contributor Author

Thanks @rwblair!
Just to make sure I understand correctly, you need me to merge neuropoly#8 first?

As for merging to the bids-validator master, we may want to wait for bids-standard/bids-specification#1000 to be approved, I'll ask for a final review.

@mariehbourget mariehbourget changed the title [WIP] [ENH] Microscopy: Add validation of JSON for photo files [ENH] Microscopy: Add validation of JSON for photo files Jul 8, 2022
@rwblair
Copy link
Member

rwblair commented Jul 8, 2022

Just to make sure I understand correctly, you need me to merge neuropoly#8 first?

That be great, depending on how the CI does I may make more PRs.

Waiting for the specification merge to happen first isn't a problem.

@mariehbourget
Copy link
Contributor Author

mariehbourget commented Jul 18, 2022

Hi @rwblair!
I merged the PR (neuropoly 8) and the specification PR bids-standard/bids-specification#1000 was approved last week, so I think we are OK to proceed.

There are some errors with the last merge that I don't fully understand, let me know if there is anything I can do to help.
Thanks!

@sappelhoff
Copy link
Member

sappelhoff commented Jul 19, 2022

@mariehbourget is the box "allow commits from maintainers" not checked? I just wanted to push a fix but couldn't do it.

Anyhow, fixes are in neuropoly#9, which you can simply merge :-) --> but in the future it would be nice to tick the "allow commits from maintainers" box

@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #1415 (3e83193) into master (4feb91b) will increase coverage by 0.84%.
The diff coverage is 73.91%.

@@            Coverage Diff             @@
##           master    #1415      +/-   ##
==========================================
+ Coverage   84.10%   84.95%   +0.84%     
==========================================
  Files          90       90              
  Lines        3631     3683      +52     
  Branches     1098     1121      +23     
==========================================
+ Hits         3054     3129      +75     
+ Misses        483      467      -16     
+ Partials       94       87       -7     
Impacted Files Coverage Δ
bids-validator/src/options.js 100.00% <ø> (ø)
bids-validator/utils/options.js 70.83% <ø> (ø)
...ds-validator/validators/microscopy/checkSamples.js 100.00% <ø> (ø)
...validator/validators/tsv/validateContRecordings.js 100.00% <ø> (ø)
...ids-validator/validators/tsv/validateTsvColumns.js 52.56% <30.76%> (-1.08%) ⬇️
bids-validator/utils/issues/index.js 79.54% <50.00%> (-0.69%) ⬇️
bids-validator/validators/json/json.js 98.29% <50.00%> (-0.83%) ⬇️
bids-validator/utils/files/readDir.js 78.06% <78.94%> (-0.15%) ⬇️
...lidator/validators/microscopy/checkJSONAndField.js 92.98% <88.23%> (-4.17%) ⬇️
bids-validator/validators/microscopy/ometiff.js 72.97% <90.00%> (-0.64%) ⬇️
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4feb91b...3e83193. Read the comment docs.

@mariehbourget
Copy link
Contributor Author

Anyhow, fixes are in neuropoly#9, which you can simply merge :-) --> but in the future it would be nice to tick the "allow commits from maintainers" box

Hi @sappelhoff, thanks for the PR neuropoly#9, it is now merged.

I would gladly grant you access of course but I could not find the "allow commits from maintainers" box anywhere, sorry about that. Is it supposed to be on the main page of the PR (this page)?

@sappelhoff
Copy link
Member

see the lower right of this screenshot:
image

or simply: Open a pull request of yours and search for "Allow edits and access to secrets by maintainers" or subsets of this string (just via ctrl+F search in your browser)

@mariehbourget
Copy link
Contributor Author

Hum, that's what I thought from the github help pages but I have nothing under the "participants":

image

I'll keep looking and check if there is something in our fork settings.

@sappelhoff
Copy link
Member

Yes, perhaps it's because you submitted the PR from a "third party" organization account 🤔 ... either the situation there is completely different OR you have insufficient rights there 🤷‍♂️ anyhow the solution is probably to next time do a PR from you personal fork :-)

@rwblair rwblair merged commit 67885b8 into bids-standard:master Jul 19, 2022
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.

3 participants