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

Remove RefLGR from code and refs field from decision trees #965

Merged
merged 8 commits into from
Aug 12, 2023

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Aug 7, 2023

Closes #962.

Changes proposed in this pull request:

  • Remove unused RefLGR logger.
  • Drop refs field from decision trees, and move the references as BibTeX citations to the report field.

tsalo added 4 commits August 3, 2023 12:34
missing_key seems to be specific to a missing "refs" field, so I removed that as well.
@tsalo tsalo added the bug issues describing a bug or error found in the project label Aug 7, 2023
@handwerkerd
Copy link
Member

The reason there are references in the decision trees is because specific decision trees might have their own reference list. That is we want everyone who uses this code to reference the tedana JOSS pub, but if a new decision tree combines the tedana approach with the AROMA approach then they might want people to also cite AROMA and the publication that demonstrated the combination. I didn't link the reference field to anywhere else in the code, but my ideal would be to keep the field and have any references in the decision tree combine with the static references.

@tsalo
Copy link
Member Author

tsalo commented Aug 11, 2023

In that case I think we need to support the references field as a BibTeX-formatted string rather than in-text citations, but I don't know if there's an established format for that in JSON files. It won't go through the RefLGR though. It'll have to get loaded and merged with the main BibTeX file as part of the report curation.

@handwerkerd
Copy link
Member

I was starting to make some suggested changes, but now I think I get this. The idea is that the report field is the text added to the report and the docs now specify that it should include references in the context of the report text. The one bit of lost (non)functionality is that the goal of the json file decision tree is that people can make their own tree without needing to open a PR to the code. If someone wants to add a new reference, they'd need to make a PR to edit https://github.com/ME-ICA/tedana/blob/main/tedana/resources/references.bib

That's not ideal, but, if someone is starting to publish with a new decision tree that uses new references, we'd probably want to have that reference included anyway.

@tsalo
Copy link
Member Author

tsalo commented Aug 11, 2023

That's the one drawback of this PR. Would you like me to figure out a way to keep the refs field in the JSON as a list of BibTeX entries instead?

Copy link
Member

@handwerkerd handwerkerd left a comment

Choose a reason for hiding this comment

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

One minor and one less minor change.
Minor is just make a bit more clear where the references BibTex file is.
Less minor is that you removed the test for if a required key is missing. I put it back in, but I'm now checking to see whether report is missing.

@handwerkerd
Copy link
Member

I think this is a net improvement. If someone has a use case for citing a reference not in the .bib file, it might be easier to just have a very low threshold for us to add references for people rather than designing a system to handle this situation.

If you're fine with #968, approve it so we can merge it in. Then you can use that to make this PR pass all checks & we can then approve this as well.

Copy link
Member

@handwerkerd handwerkerd left a comment

Choose a reason for hiding this comment

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

Just merge the now current main into this so that the style & RTD checks pass & this should be ready to merge.

@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Patch coverage: 87.50% and project coverage change: -0.03% ⚠️

Comparison is base (8daae00) 88.88% compared to head (a096253) 88.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #965      +/-   ##
==========================================
- Coverage   88.88%   88.86%   -0.03%     
==========================================
  Files          27       27              
  Lines        3375     3368       -7     
  Branches      618      618              
==========================================
- Hits         3000     2993       -7     
  Misses        227      227              
  Partials      148      148              
Files Changed Coverage Δ
tedana/selection/component_selector.py 99.00% <ø> (-0.01%) ⬇️
tedana/selection/selection_nodes.py 99.22% <ø> (-0.01%) ⬇️
tedana/workflows/ica_reclassify.py 97.79% <75.00%> (ø)
tedana/selection/selection_utils.py 100.00% <100.00%> (ø)

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

@tsalo tsalo requested a review from handwerkerd August 11, 2023 17:27
Copy link
Member

@handwerkerd handwerkerd left a comment

Choose a reason for hiding this comment

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

LGTM

For the merging of #968 I didn't have a strong opinion about type() is vs isinstance but if you have a preference for isinstance that's fine with me.

@handwerkerd
Copy link
Member

This is fairly minor. I'm fine merging with 1 review if @eurunuela or @dowdlelt don't have time to look. Maybe give until Monday for them to respond?

Copy link
Collaborator

@eurunuela eurunuela left a comment

Choose a reason for hiding this comment

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

LGTM!

@tsalo tsalo merged commit bf3392a into ME-ICA:main Aug 12, 2023
@tsalo
Copy link
Member Author

tsalo commented Aug 12, 2023

Thanks @handwerkerd and @eurunuela!

@tsalo tsalo deleted the reflgr branch August 12, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues describing a bug or error found in the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reference logger is no longer used
3 participants