update documentation - #17
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes public-facing documentation across chebi_utils by converting module headers and public function docstrings to NumPy-style (Parameters/Returns/Notes), and updates the README to reflect the current public API and key features (including the validation split key).
Changes:
- Convert/expand public docstrings in
extract_properties,sample_filters, andobo_extractorto NumPy-style sections. - Move an important SDF parsing caveat into
extract_molecules’ docstringNotes. - Update
README.mdwith thesplits["validation"]breaking change note and add usage examples for FOL facts and hierarchy-aware sampling.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the validation split key breaking change and adds examples for property extraction and hierarchy-aware sampling. |
| chebi_utils/sdf_extractor.py | Moves record-dropping caveats into a Notes section in the function docstring. |
| chebi_utils/sample_filters.py | Adds NumPy-style docstrings and moves queue import to module scope. |
| chebi_utils/obo_extractor.py | Rewrites get_hierarchy_subgraph docstring into NumPy-style Parameters/Returns. |
| chebi_utils/extract_properties.py | Adds NumPy-style docstrings for public APIs related to FOL fact extraction. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Standardizes to numpy docstring format.
Claude says regarding the changes:
Summary
Unified the chebi_utils/ package on NumPy-style docstrings (Parameters/Returns), documenting inputs and outputs for every public method.
extract_properties.py (main work)
sample_filters.py (main work)
obo_extractor.py — converted get_hierarchy_subgraph's prose docstring to NumPy-style.
sdf_extractor.py — folded the "valid but no atoms" data-quirk # note into extract_molecules' docstring as a Notes section (keeping the ChEBI issue link).
Per your choices: private _-helpers were left untouched (public API only), and in-body # explanations were folded into the docstrings. dataset_builder.py and downloader.py already conformed and were left as-is.
Verification: ruff check and ruff format --check pass; all 65 tests pass (the initial failures were just two uninstalled runtime deps in this environment, now installed); help() spot-checks render the new Parameters/Returns sections.