-
Notifications
You must be signed in to change notification settings - Fork 111
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: add --cfg-proc to install, clone, and get #7477
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #7477 +/- ##
==========================================
+ Coverage 90.61% 91.55% +0.93%
==========================================
Files 325 325
Lines 43405 43431 +26
Branches 0 5821 +5821
==========================================
+ Hits 39333 39762 +429
+ Misses 4072 3654 -418
- Partials 0 15 +15
☔ View full report in Codecov by Sentry. |
Maybe it needs to also be implemented for |
I do think that procedure better to operate non-recursively and then indeed it be |
Sorry @bpinsard we didn't follow up on this one! Other @datalad/developers -- any feedback on this one? looks good and usefull to me. |
…t recursive for now (need to be coded recursively in the procedure itself)
0de85d5
to
0a4a226
Compare
changelog addition commit got lost, re-added the label. but CI failed to add that commit
@bpinsard please permit other maintainers to contribute (I think it is the case why it failed) to this PR (checkmark on the side to the right above IIRC). Or produce it manually using |
Not sure what is wrong in the config, I am pretty sure that I simply forked the repo, what access should I grant and to who and where? |
tests fail BTW and need fixing, a sample from appveyor:
|
datalad/core/local/create.py
Outdated
def _procedures_exists(ds, cfg_proc): | ||
# Check if specified cfg_proc(s) can be discovered, storing | ||
# the results so they can be used when the time comes to run | ||
# the procedure. If a procedure cannot be found, raise an | ||
# error to prevent creating the dataset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this function should get into datalad/local/run_procedure.py
to be along with other procedure support functions:
❯ git grep 'def _*get.*proc'
datalad/local/run_procedure.py:def _get_proc_config(name, ds=None):
datalad/local/run_procedure.py:def _get_procedure_implementation(name='*', ds=None):
and should be named more inline with other function names (although yeah -- already inconsistent above IMHO) and a little more descriptive :
not also I swapped the order of args to be more inline with other 2 functions and renamed arg so body should change too
def _procedures_exists(ds, cfg_proc): | |
# Check if specified cfg_proc(s) can be discovered, storing | |
# the results so they can be used when the time comes to run | |
# the procedure. If a procedure cannot be found, raise an | |
# error to prevent creating the dataset. | |
def _get_proc_configs(names, ds): | |
"""Get specifications for discovered procedures. | |
If not a single procedure found, raises `ValueError` | |
""" |
interesting -- you are special @bpinsard ! ;-) ok, nevermind that -- please address my request for harmonization of naming of the helper and address tests fails and I will take care about adding changelog entry later. |
https://github.com/orgs/community/discussions/5634 because the fork is in an org not an individual... |
…t recursive for now (need to be coded recursively in the procedure itself)
3693514
to
a410a0c
Compare
Code Climate has analyzed commit a410a0c and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
tests aren't happy
and may be more -- didn't look in detail. |
Adds the
--cfg-proc
option to install command to allow running commands on dataset post-installation. see #7468It runs procedure after recursive install.
It does not call the procedure recursively for now (recursion can be coded in the procedure itself).
Making it recursive would require way more changes to
get
and other parts of the code.PR checklist