[ENH]: Implement a command to print the running environment details #33
No reviewers
Labels
No labels
CRITICAL
Stale
WIP
bug
concept
coordinate
dataset
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
maintenance
maps
marker
mask
on hold
parcellation
preprocess
question
ready
storage
template-space
triage
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
juaml/junifer!33
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/wtf-cmd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Are you requiring a new dataset or marker?
Which feature do you want to include?
I've seen this in datalad and it's a very cool feature. When you run
datalad wtf, you get a verbose print of all the characteristics of the runtime environment. Thus, whenever you submit an issue, you can copy/paste the output to help the developers understand what's going on.How do you imagine this integrated in junifer?
As a new command in
junifer.api.cliso we can runjunifer wtfDo you have a sample code that implements this outside of junifer?
Anything else to say?
We can check datalad, but beware of the license. Maybe we can also get an approval to copy/paste and release under AGPLv3.
@fraimondo Do we start with something minimal for our use-case, or do we go "full" wtf?
The idea is to have something that can help us debug. I would go full wtf
Okay I'll try to adapt the datalad code then.
Just a thought: we output it as JSON?
nono, print in the terminal
check
datalad wtfOkay. Well what I meant was output JSON in terminal so it's easy to copy and paste.
Ask for permission, they use a different licence!
Yes, but we use AGPLv3, so we are restricting more.
They use MIT which I think allows for copying, I'll ask anyway.
We will anyway adapt it and not have the exact same code.
Reading is also some way of "copying". Ask anyways, does not harm.
Yeah of course.
@fraimondo Okay so I have a basic version working with motivation from datalad. I have kept it focused on our use-case as
datalad wtfhas a lot of stuff which is better run from there. Let me know what you think. After an initial review, I'll add the tests and it should be good to go.Codecov Report
97.50% <97.50%> (ø)81.96% <100.00%> (+3.01%)@ -0,0 +1,132 @@"""Provide utility functions for the api sub-package."""I would go full environment versions here, not only dependencies.
@ -0,0 +1,132 @@"""Provide utility functions for the api sub-package."""Ignored built-in modules as it doesn't make sense.
Can we do what I mention in my comment? Or its way too complicated for now?
We can either create a low-priority issue or code it now.
@ -0,0 +1,132 @@"""Provide utility functions for the api sub-package."""Can we read this from the pyproject.toml file?
Or we need to manually hardcode here?
I have the impression that it will end-up like the
_version.pyfile, which is created on build/install@ -0,0 +1,132 @@"""Provide utility functions for the api sub-package."""The only reason I want to avoid reading from
pyproject.tomlis because of the extra I/O. The dependencies are not going to change frequently so hardcoding it doesn't seem like a bad idea.I don't really get the analogy with the
_version.pythough.@ -0,0 +1,132 @@"""Provide utility functions for the api sub-package."""On build/install time, a file
_dependencies.pyis created with an array that contains the dependencies.Soon, we will start having "conditional" dependencies in which some specific markers will require some dependencies. I'm just trying to avoid having always in mind that we need to manage dependencies in two different sites.
@ -0,0 +1,132 @@"""Provide utility functions for the api sub-package."""e.g.:
pip install junifer[mri]pip install junifer[eeg]pip install junifer[surf]pip install junifer[dmri]... etc@ -0,0 +1,132 @@"""Provide utility functions for the api sub-package."""I don't remember seeing
_dependencies.pybut will check it.@ -0,0 +1,132 @@"""Provide utility functions for the api sub-package."""I see what you mean. These conditional dependencies would go in the
[project.optional-dependencies]block of thepyproject.tomllike we have now fordevanddocs. So, the "base" dependencies for example,numpyornilearnstay the same and we can check for them. But, I agree that maintaining dependencies in two places is a bit troublesome. Let me see if I can find a way to hook into the setuptools or something similar to extract information without requiring extra I/O.@ -0,0 +1,132 @@"""Provide utility functions for the api sub-package."""Now implemented with an improved regex search.