-
Notifications
You must be signed in to change notification settings - Fork 88
Add citation method to ImageJPython class #325
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
base: main
Are you sure you want to change the base?
Conversation
This commit adds a citation method that generates PyImageJ's citation reference and collects the current instance's Python and Java versions. Running ij.py.cite() produces this citation string: Rueden, C.T., Hiner, M.C., Evans, E.L. et al. PyImageJ: A library for integrating ImageJ and Python. Nat Methods 19, 1326–1327 (2022). https://doi.org/10.1038/s41592-022-01655-4 ----------------------- Python version: 3.11.11 Java version: 11.0.26
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #325 +/- ##
==========================================
- Coverage 77.30% 76.52% -0.79%
==========================================
Files 17 17
Lines 2036 2100 +64
==========================================
+ Hits 1574 1607 +33
- Misses 462 493 +31 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This is great! 🌟 Do you think we should include any Python package versions? The versions of pyimagej, scyjava, imglyb, jgo, and jpype all affect behavior pretty substantially. I know it might be a slippery slope, but those in particular are most relevant. I'm dine with leaving them out if y'all feel it would be too much, though. |
I was thinking the same thing honestly. What do you think about collecting versions for I'll also add in a test so codecov will be happy. |
By default calling ij.py.cite() will print the citation to the console. If set to False the citation string will be returned without calling print().
This is super cool, and would be a great addition to the RTD ala "if you found our work useful, please cite the paper!"
The goal of #263 is to aid reproducibility. In other words, we want to be able to reproduce bugs reported by users in addition to being able to reproduce results found from workflows. In pursuit of that goal, I'd lean towards adding more over adding less. This might mean we need an additional utility, maybe an
|
On the Java side, the Regarding requirements for this feature: to best foster reproducibility, we may need to dump a large amount of information, which would then obfuscate the actual citation to use... should we make two separate functions? I ask with no clear opinion in either direction. |
I would think so, this is what I intended when I referenced a second |
Thanks for the feedback! I totally agree it sounds like we want two different functions here. I'll re-work this to split the citation string method into its own thing and add a |
d474b6a
to
1f2cf15
Compare
Okay I made some changes and split >>> ij.py.cite_publication()
=====PyImageJ Citation=====
Rueden, C.T., Hiner, M.C., Evans, E.L. et al.
PyImageJ: A library for integrating ImageJ and Python.
Nat Methods 19, 1326–1327 (2022).
https://doi.org/10.1038/s41592-022-01655-4
>>> ij.py.cite_versions()
=====Environment package versions=====
Python: 3.11.11
Java: 11.0.26
pyimagej: 1.6.1.dev0
scyjava: 1.10.2
imglyb: 2.1.0
jgo: 1.0.6
jpype: 1.5.2
>>> Both these methods by default print to the console, but you can optionally pass @ctrueden do you want to see more packages listed? |
This commit splits the former ij.py.cite() method into cite_publication() and cite_versions() which produce the PyImageJ citation string and the environment packages seperately.
1f2cf15
to
6974c82
Compare
This PR addresses issue #263 and adds a citation method that generates PyImageJ's citation reference and collects the current instance's Python and Java versions.
Running ij.py.cite() produces this citation string:
@ctrueden @hinerm @gselzer thoughts?
P.S. I didn't specifically select the first 3 names for the citation, its what Nature methods generates.