Skip to content

Add new command verdi process to interact with running processes#1855

Merged
sphuber merged 2 commits into
aiidateam:developfrom
sphuber:fix_1825_introduce_verdi_process
Aug 8, 2018
Merged

Add new command verdi process to interact with running processes#1855
sphuber merged 2 commits into
aiidateam:developfrom
sphuber:fix_1825_introduce_verdi_process

Conversation

@sphuber
Copy link
Copy Markdown
Contributor

@sphuber sphuber commented Aug 8, 2018

Fixes #1825

All interactions with processes, now go through RabbitMQ. Historically
there is a division in the calculations, where job and inline calculations
are managed through verdi calculation and the work type calculations
through verdi work. However, these commands should really only serve
to introspect the state of a process through the node that serves as its
proxy in the database. Any commands that need to affect the process that
these nodes represent, have to go through RabbitMQ. To make this distinction
clearer to users, the new command verdi process is created.

Any command that interacts with the process, such as kill, play and
pause should go through verdi process. All other commands that only
strictly display information about the process through the calculation
node proxy, should go in verdi calculation and verdi work.

@sphuber sphuber requested a review from muhrin August 8, 2018 12:40
All interactions with processes, now go through RabbitMQ. Historically
there is a division in the calculations, where job and inline calculations
are managed through `verdi calculation` and the work type calculations
through `verdi work`. However, these commands should really only serve
to introspect the state of a process through the node that serves as its
proxy in the database. Any commands that need to affect the process that
these nodes represent, have to go through RabbitMQ. To make this distinction
clearer to users, the new command `verdi process` is created.

Any command that interacts with the process, such as `kill`, `play` and
`pause` should go through `verdi process`. All other commands that only
strictly display information about the process through the calculation
node proxy, should go in `verdi calculation` and `verdi work`.
@sphuber sphuber force-pushed the fix_1825_introduce_verdi_process branch from cd2b8a4 to f9fc184 Compare August 8, 2018 13:17
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 8, 2018

Codecov Report

Merging #1855 into develop will decrease coverage by 0.02%.
The diff coverage is 72.41%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1855      +/-   ##
===========================================
- Coverage    66.81%   66.78%   -0.03%     
===========================================
  Files          316      320       +4     
  Lines        32331    32527     +196     
===========================================
+ Hits         21602    21724     +122     
- Misses       10729    10803      +74
Impacted Files Coverage Δ
aiida/cmdline/params/options/__init__.py 100% <ø> (ø) ⬆️
aiida/cmdline/params/arguments/__init__.py 100% <100%> (ø) ⬆️
aiida/cmdline/utils/common.py 55.62% <100%> (ø) ⬆️
aiida/cmdline/commands/cmd_calculation.py 70.9% <100%> (+0.11%) ⬆️
aiida/cmdline/commands/cmd_verdi.py 87.5% <100%> (ø) ⬆️
aiida/cmdline/commands/cmd_process.py 51.54% <51.54%> (ø)
aiida/cmdline/commands/cmd_work.py 59.19% <74%> (-16.27%) ⬇️
aiida/cmdline/utils/query/mapping.py 79.1% <79.1%> (ø)
aiida/cmdline/utils/query/formatting.py 83.33% <83.33%> (ø)
aiida/cmdline/utils/query/calculation.py 93.22% <93.22%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bd342e...f2c9f35. Read the comment docs.

@verdi_work.command('kill')
@arguments.CALCULATIONS(
type=types.CalculationParamType(sub_classes=('aiida.calculations:work', 'aiida.calculations:function')))
def work_kill(calculations):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Put back with deprecation warning.

--------------
Manage work calculations.

* **kill**: kill a work calculation
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Put back with deprecation

* **pause**: Pause running processes.
* **play**: Play paused processes.
* **watch**: Watch the state transitions for a process.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add list

@sphuber sphuber merged commit dc20dc7 into aiidateam:develop Aug 8, 2018
@sphuber sphuber deleted the fix_1825_introduce_verdi_process branch August 8, 2018 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants