Skip to content

docs: remove usage examples and register phenotype methods in Ag3.rst#810

Merged
leehart merged 5 commits intomasterfrom
docs/phenotype-functions
Sep 4, 2025
Merged

docs: remove usage examples and register phenotype methods in Ag3.rst#810
leehart merged 5 commits intomasterfrom
docs/phenotype-functions

Conversation

@mohamed-laarej
Copy link
Copy Markdown
Collaborator

Addresses #809 .

  • Removed usage examples from phenotype_data function docstrings.
  • Added new phenotype methods to Ag3.rst for documentation inclusion.

@mohamed-laarej
Copy link
Copy Markdown
Collaborator Author

Hi @jonbrenas ,

I’ve scoped this PR to the minimal changes requested in #809, removing usage examples and exposing the phenotype methods in the API docs.

While working on this, I noticed some areas in the phenotype docstrings (e.g. type hints, consistency, edge-case notes) that could benefit from clarification and cleanup. If that sounds useful, I’d be happy to open a follow-up PR focused purely on improving documentation. Let me know what you think!

@jonbrenas
Copy link
Copy Markdown
Collaborator

Thanks @mohamed-laarej. This is the perfect PR for all documentation tasks, feel free to make all the changes that you think would improve things.

@jonbrenas
Copy link
Copy Markdown
Collaborator

Thanks @mohamed-laarej.

The way the documentation is generated, the description of the function and of its outputs ought to be before the function definition and look something like this :

            Run a H1X genome-wide scan to detect genome regions with
            shared selective sweeps between two cohorts.
        """,
        returns=dict(
            x="An array containing the window centre point genomic positions.",
            h1x="An array with H1X statistic values for each window.",
            contigs="An array with the contig for each window. The median is chosen for windows overlapping a change of contig.",
        )```

The parameters ought to be described in th `*_params.py` files. Does that make sense? Can you update your code to follow this standard?

@mohamed-laarej
Copy link
Copy Markdown
Collaborator Author

Thanks @jonbrenas for the clarification! I’ll update the docstrings to use the @doc decorator and revise them to follow your feedback and the API documentation standards.

@leehart
Copy link
Copy Markdown
Collaborator

leehart commented Aug 8, 2025

Looks like this just needs an update from the base branch and then a re-review.

@leehart leehart requested a review from jonbrenas August 8, 2025 08:32
Copy link
Copy Markdown
Collaborator

@jonbrenas jonbrenas left a comment

Choose a reason for hiding this comment

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

LGTM.

@leehart leehart merged commit f591dba into master Sep 4, 2025
10 of 11 checks passed
@leehart leehart deleted the docs/phenotype-functions branch September 4, 2025 10:13
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.

3 participants