Skip to content

Commit 72fd4bd

Browse files
committed
Updated docs some more..
1 parent 5fbd738 commit 72fd4bd

File tree

1 file changed

+38
-19
lines changed

1 file changed

+38
-19
lines changed

docs/cosmosim/cosmosim.rst

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ successful login no further password is required if desired.
3737

3838
>>> CS.login(username="uname")
3939
uname, enter your CosmoSim password:
40-
40+
4141
Authenticating uname on www.cosmosim.org...
4242
Authentication successful!
4343
>>> # If running from a script (rather than an interactive python session):
@@ -48,7 +48,7 @@ To store the password associated with your username in the keychain:
4848
>>> CS.login(username="uname",store_password=True)
4949
WARNING: No password was found in the keychain for the provided username. [astroquery.cosmosim.core]
5050
uname, enter your CosmoSim password:
51-
51+
5252
Authenticating uname on www.cosmosim.org...
5353
Authentication successful!
5454

@@ -82,11 +82,14 @@ few examples of functions available to the user for these purposes.
8282
.. code-block:: python
8383
8484
>>> CS.check_all_jobs()
85-
{'359748449665484': 'COMPLETED'}
85+
JobID Phase
86+
--------------- ---------
87+
361298054830707 COMPLETED
8688
>>> CS.delete_job(jobid='359748449665484')
8789
Deleted job: 359748449665484
88-
>>> CS.check_all_jobs()
89-
{}
90+
>>> CS.check_all_jobs()
91+
JobID Phase
92+
--------------- ---------
9093
9194
The above function 'check_all_jobs' also supports the usage of a
9295
job's phase status in order to filter through all available CosmoSim
@@ -95,12 +98,16 @@ jobs.
9598
.. code-block:: python
9699
97100
>>> CS.check_all_jobs()
98-
{'359748449665484': 'COMPLETED'}
99-
{'359748449682647': 'ABORTED'}
100-
{'359748449628375': 'ERROR'}
101+
JobID Phase
102+
--------------- ---------
103+
359748449665484 COMPLETED
104+
359748449682647 ABORTED
105+
359748449628375 ERROR
101106
>>> CS.check_all_jobs(phase=['Completed','Aborted'])
102-
{'359748449665484': 'COMPLETED'}
103-
{'359748449682647': 'ABORTED'}
107+
JobID Phase
108+
--------------- ---------
109+
359748449665484 COMPLETED
110+
359748449682647 ABORTED
104111
105112
Additionally, 'check_all_jobs' (and 'delete_all_jobs') accepts both
106113
phase and/or tablename (via a regular expression) as criteria for
@@ -110,19 +117,26 @@ arguments blank will delete ALL jobs!
110117
.. code-block:: python
111118
112119
>>> CS.check_all_jobs()
113-
{'359748449665484': 'COMPLETED'}
114-
{'359748449682647': 'ABORTED'}
115-
{'359748449628375': 'ERROR'}
120+
JobID Phase
121+
--------------- ---------
122+
359748449665484 COMPLETED
123+
359748449682647 ABORTED
124+
359748449628375 ERROR
116125
>>> CS.table_dict()
117126
{'359748449665484': '2014-09-07T05:01:40:0458'}
118127
{'359748449682647': 'table2'}
119128
{'359748449628375': 'table3'}
120129
>>> CS.delete_all_jobs(phase=['Aborted','error'],regex='[a-z]*[0-9]*')
121-
# phases are case insensitive
122130
Deleted job: 359748449682647 (Table: table2)
123131
Deleted job: 359748449628375 (Table: table3)
132+
133+
Note: Arguments for phase are case insensitive. Now, check to see if
134+
the jobs have been deleted:
135+
124136
>>> CS.check_all_jobs()
125-
{'359748449665484': 'COMPLETED'}
137+
JobID Phase
138+
--------------- ---------
139+
359748449665484 COMPLETED
126140

127141
Getting rid of this last job can be done by deleting all jobs with
128142
phase COMPLETED, or it can be done simply by providing the 'delete_job'
@@ -137,16 +151,21 @@ Deleting all jobs, regardless of tablename, and job phase:
137151

138152
.. code-block:: python
139153
140-
>>> CS.check_all_jobs()
141-
{'359748449665484': 'ABORTED', '359748586913123': 'COMPLETED'}
154+
>>> CS.check_all_jobs()
155+
JobID Phase
156+
--------------- ---------
157+
359748449665484 ABORTED
158+
359748586913123 COMPLETED
159+
142160
>>> CS.delete_all_jobs()
143161
Deleted job: 359748449665484
144162
Deleted job: 359748586913123
145163
>>> CS.check_all_jobs()
146-
{}
164+
JobID Phase
165+
--------------- ---------
147166
148167
In addition to the phase and regex arguments for 'check_all_jobs',
149-
selected queries can be sorted using two properties:
168+
selected jobs can be sorted using two properties:
150169

151170
>>> CS.check_all_jobs(phase=['completed'],regex='[a-z]*[0-9]*',sortby='tablename')
152171
JobID Phase Tablename Starttime

0 commit comments

Comments
 (0)