Skip to content

[query] add many more examples to the Table docs - #14113

Merged
danking merged 17 commits into
hail-is:mainfrom
danking:better-docs
Jan 16, 2024
Merged

danking merged 17 commits into
hail-is:mainfrom
danking:better-docs

Conversation

@danking

@danking danking commented Dec 21, 2023 •

Copy link
Copy Markdown
Contributor

I wrote examples for several functions.

@danking danking mentioned this pull request Jan 3, 2024
Comment thread hail/Makefile
--html=../build/reports/pytest-doctest.html \
--doctest-modules \
--doctest-glob='*.rst' \
--doctest-continue-on-failure \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without this you only get the first failure in a docstring. Much easier to fix docs with this option enabled.

'data/ld_score_regression.all_phenos.sumstats.mt'
)

print("finished setting up doctest...")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Notice that this message is already printed in init in this file which calls this function, generate_datasets.

@patrick-schultz patrick-schultz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is great!

Comment thread hail/python/hail/table.py Outdated
... dicts,
... partial_type={"milestone":hl.tstr, "labels":hl.tarray(hl.tstr)})
... [{'a': 5, 'b': 10}, {'a': 0, 'b': 200}],
... schema=hl.tstruct(a=hl.tint, b=hl.tint),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should omit the schema, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, yes, great eyes. It's also missing the example output. Updated on both counts.

@danking
danking merged commit 8a0e8e3 into hail-is:main Jan 16, 2024
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.

2 participants