Skip to content

Commit

Permalink
Update README.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
trygveasp committed Apr 7, 2022
1 parent 99e300c commit c82f4a3
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ folder:

.. code-block:: bash
sudo pip install -e .
sudo pip3 install -e .
or

.. code-block:: bash
sudo pip install -e . --user
pip3 install -e . --user
Create documentation
---------------------------------------------
Expand All @@ -79,3 +79,30 @@ Create documentation
# Create a pdf documentation
make latexpdf
Usage
--------------------

.. code-block:: python
import scheduler
# EcFlow variables parsed in EcFlow job
ecf_name = "%ECF_NAME%"
ecf_pass = "%ECF_PASS%"
ecf_tryno = "%ECF_TRYNO%"
ecf_rid = "%ECF_RID%"
submission_id = "%SUBMISSION_ID%"
task_name = "%TASK%"
task = scheduler.EcflowTask(ecf_name, ecf_tryno, ecf_pass, ecf_rid, submission_id)
env_submit = {}
env_server = {
"ECF_HOST": "localhost",
"ECF_PORT": 3141,
"ECF_PORT_OFFSET": 0
}
joboutdir = "/tmp/job"
sub = scheduler.EcflowSubmitTask(task, env_submit, env_server, joboutdir)
sub.submit()

0 comments on commit c82f4a3

Please sign in to comment.