Skip to content

Commit

Permalink
Docs: Fix the daemon management examples (#60)
Browse files Browse the repository at this point in the history
The examples were incorrectly using `GET` requests to start and stop the
daemon, but this should be `POST` requests.

The Quantum ESPRESSO example is also updated to use the SSSP family that
is currently the default installed by `aiida-pseudo install sssp`.
  • Loading branch information
superstar54 committed May 8, 2023
1 parent be9ce97 commit 3f14ea2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/daemon_management/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ def main():
click.echo(f"The daemon is currently running with {num_workers} workers")

click.echo("Stopping the daemon.")
response = request("daemon/stop", method="GET")
response = request("daemon/stop", method="POST")

else:
click.echo("The daemon is currently not running.")
click.echo("Starting the daemon.")
response = request("daemon/start", method="GET")
response = request("daemon/start", method="POST")
num_workers = response["num_workers"]
click.echo(f"The daemon is currently running with {num_workers} workers")

Expand Down
2 changes: 1 addition & 1 deletion examples/submit_quantumespresso_pw/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def main(workchain):
structure_uuid = create_node("core.structure", structure)
parameters_uuid = create_node("core.dict", parameters)
kpoints_uuid = create_node("core.array.kpoints", kpoints)
pseudo_si_uuid = get_pseudo_for_element("SSSP/1.1/PBE/efficiency", "Si")["uuid"]
pseudo_si_uuid = get_pseudo_for_element("SSSP/1.2/PBE/efficiency", "Si")["uuid"]

if workchain:
# Inputs for a ``PwBaseWorkChain`` to compute SCF of Si crystal structure
Expand Down

0 comments on commit 3f14ea2

Please sign in to comment.