Skip to content

update documentation - #17

Merged
sfluegel05 merged 4 commits into
devfrom
feature/documentation
Jul 22, 2026
Merged

update documentation#17
sfluegel05 merged 4 commits into
devfrom
feature/documentation

Conversation

@sfluegel05

Copy link
Copy Markdown
Contributor

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)

  • Module # header → module docstring.
  • Added full docstrings (folding in the inline # comment blocks) to get_atom_properties, get_bond_properties, get_molecule_level_properties, get_rings, get_steroid_positions.
  • Added Parameters/Returns to mol_to_fol_atoms and get_numerical_facts.

sample_filters.py (main work)

  • Module # header → module docstring.
  • Full docstring for get_closest_negatives; added Parameters to get_direct_neighbors.
  • Moved the local import queue to module top.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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, and obo_extractor to NumPy-style sections.
  • Move an important SDF parsing caveat into extract_molecules’ docstring Notes.
  • Update README.md with the splits["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.

Comment thread chebi_utils/extract_properties.py
Comment thread chebi_utils/extract_properties.py Outdated
Comment thread chebi_utils/sample_filters.py Outdated
sfluegel05 and others added 3 commits July 22, 2026 18:10
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>
@sfluegel05
sfluegel05 merged commit f96aabf into dev Jul 22, 2026
8 checks passed
@sfluegel05
sfluegel05 deleted the feature/documentation branch July 22, 2026 16:12
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