Skip to content

DOC: making sure doctests pass more often #694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions docs/io/uws.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ UWS job documents can be parsed directly from URLs, files, or strings using the
... ORDER BY phot_g_mean_mag
... """
>>> async_job = tap_service.submit_job(ex_query)
>>> async_job.run().wait() # doctest: +ELLIPSIS
>>> async_job.run().wait()
<pyvo.dal.tap.AsyncTAPJob object at 0x...>
>>>
>>> # Parse a single job from a UWS service
Expand All @@ -39,7 +39,7 @@ UWS job documents can be parsed directly from URLs, files, or strings using the
>>> jobs = parse_job_list('http://dc.g-vo.org/tap/async')
>>> # Show jobs
>>> if len(jobs) >= 1:
... print(f"Example job: {jobs[0].jobid} is {jobs[0].phase}") # doctest: +ELLIPSIS
... print(f"Example job: {jobs[0].jobid} is {jobs[0].phase}")
Example job: ... is ...
>>>
>>> print(f"Successfully parsed {len(jobs)} jobs") # doctest: +SKIP
Expand Down Expand Up @@ -380,9 +380,30 @@ While the examples above focus on individual jobs, you can also parse job lists:
>>> # jobs = parse_job_list('job_list.xml')
>>>
>>> # Iterate through jobs (each is a JobSummary object)
>>> for job in jobs: # doctest: +ELLIPSIS
... print(f"Job {job.jobid}: {job.phase}")
Job ...: COMPLETED
>>> for job in jobs:
... print(f"Job {job.jobid}: {job.phase}") # doctest: +IGNORE_OUTPUT
Job tk7xsqux: PENDING
Job swmua8pe: ERROR
Job e58i7yoa: ERROR
Job 84w2yz8q: COMPLETED
Job 6r51ymds: COMPLETED
Job undl67gs: COMPLETED
Job _wyoqule: COMPLETED
Job ltct6n8d: COMPLETED
Job 71kg_stz: COMPLETED
Job sc9vc_8h: ERROR
Job psn4i8_s: ERROR
Job kbrhcstw: COMPLETED
Job lvzez3fa: COMPLETED
Job l9pfluab: COMPLETED
Job lkv6rlxx: COMPLETED
Job yb77nhg3: COMPLETED
Job vkf4h48y: PENDING
Job xr3g9c4d: ERROR
Job x9xryn2x: COMPLETED
Job wba5foai: COMPLETED
Job pni8axcg: ERROR
Job j6ip1kn_: ERROR


Error Handling
Expand Down
Loading