Add verdi code duplicate#1737
Conversation
Still to do: * add possibility to override parameters * store duplicated code * add tests
still to do * add option to hide previous code * add tests
|
@sphuber The tests fail when "submitting 15 old-style calculations to the daemon", and the error is https://travis-ci.org/ltalirz/aiida_core/jobs/403912242#L1540 This is unexpected, since I haven't modified any calculation-related files. Is the reason for the error that it tries to find the string If you don't have any pointers, I'll investigate, just wanted to ask first. |
| def cli(self, *args): # pylint: disable=unused-argument,no-self-use | ||
| verdi.main() | ||
|
|
||
| # pylint: disable=fixme |
There was a problem hiding this comment.
Never use this, instead replace old TODO comment with an issue, unless it is obviously outdated of course.
For new TODO comments: commit using --no-verify.
Reason: TODO comments should only be used to indicate that action is required before merging. In which case they should cause tests to fail.
|
This is the last open PR for the |
|
Don't wait for this one, it is not essential.
I can fix it once I'm back from holidays.
Cheers from Chicago!
On Mon, Jul 23, 2018, 16:18 Sebastiaan Huber ***@***.***> wrote:
This is the last open PR for the verdi branch. Would it be possible to
get it ready for merging by tomorrow? In that case @DropD
<https://github.com/DropD> and me can rip out the old plumbing and rely
solely on click. If not, maybe we could merge anyway and open an issue for
the remaining sub tasks?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1737 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABASPdA6ewWvaaKIPBOTF9E3xwcuXGw0ks5uJj3BgaJpZM4VJXxW>
.
--
Sent from mobile phone
|
The `.name` attribute call was removed, leading the EntryPoint instance to be set, instead of its `simpleplugins.templatereplacer` name
Codecov Report
@@ Coverage Diff @@
## develop #1737 +/- ##
===========================================
+ Coverage 67.28% 67.37% +0.09%
===========================================
Files 320 320
Lines 33178 33264 +86
===========================================
+ Hits 22325 22413 +88
+ Misses 10853 10851 -2
Continue to review full report at Codecov.
|
* also: fix info msg for `verdi code delete`
|
I've now added a test for the non-interactive version and for the interactive version. |
fix interactive unit test for verdi code duplicate
|
@DropD Please have a look, from my point of view it can be merged. Currently, code_duplicate duplicates the options of code setup (with some extra stuff to set the defaults from the code to be duplicated). P.S. When you said I should rebase this in order to be credited, is this still needed? |
|
Why can't we just define the common options/arguments once in the As far as the rebase goes, since you have added the last few commits, I think the attribution will go to you when we squash and merge Finally, you put in the PR header that this fixes #1788 , but that does not seem to be the case? |
@sphuber I started doing this but I'm not sure this belongs together with the other options since it is rather code-specific (and this is not always obvious from the name of the option): ON_COMPUTER = OverridableOption(
'--on-computer/--store-in-db',
is_eager=False,
default=True,
prompt='Installed on target computer?')
REMOTE_ABS_PATH = OverridableOption(
'--remote-abs-path',
prompt='Remote absolute path',
type=types.AbsolutePathParamType(dir_okay=False),
help=('[if --on-computer]: the absolute path to the executable on the remote machine'))
CODE_FOLDER = OverridableOption(
'--code-folder',
prompt='Local directory containing the code',
type=click.Path(file_okay=False, exists=True, readable=True),
help=('[if --store-in-db]: directory containing the executable and all other files necessary for running it'))
CODE_REL_PATH = OverridableOption(
'--code-rel-path',
prompt='Relative path of executable inside code folder',
type=click.Path(dir_okay=False),
help=('[if --store-in-db]: relative path of the executable ' + \
'inside the code-folder'))If you like, I can still define them as
Good catch - I must have misread the PR title |
|
I don't think it would be too big of a problem too put them in the general |
|
@sphuber I am getting error messages (see particularly sqlalchemy build on travis) that seem to be entirely unrelated to my PR. |
|
I have no clue, the build simply seems to timeout because one of the unittests seems stuck. Do the tests run locally? I have at least a problem one my local workstation that the test that tries to delete a profile |
according to @sphuber, rebasing should not be necessary
fix #1500
fix #1790
Still to do:
verdi code duplicateandverdi code setup