Skip to content

Conversation

@jeipollack
Copy link
Contributor

@jeipollack jeipollack commented Dec 17, 2025

Summary

This PR introduces pre-commit hooks to enforce code quality and documentation formatting across the WaveDiff repository.

Closes #194

The configuration includes:

  • Ruff for linting and automatic fixes
  • blacken-docs for formatting Markdown and reStructuredText files
  • Trailing-whitespace, YAML, and TOML checks
  • Global exclusions have been added to prevent formatting or linting of:
    • Jupyter notebooks (*.ipynb)
    • Historical directories under papers/

What’s Changed

  • .pre-commit-config.yaml updated with hooks and global exclude
  • Reformatted configuration and documentation files according to hooks
  • Updated several files where minor formatting fixes were applied
  • No code logic was modified; all changes are formatting or configuration.

How to Test / Verify

  1. Install pre-commit if not already installed:
  • pip install pre-commit
  1. Install hooks:
  • pre-commit install
  1. Run hooks on all files:
  • pre-commit run --all-files
  1. Verify that:
  • No files under papers/ or Jupyter notebooks are modified
  • All .py, .md, .rst, .yaml, .toml files conform to the defined hooks

Scope

  • Repository-wide pre-commit hooks and formatting enforcement
  • Global exclusions prevent historical data and notebooks from being reformatted

Reviewer Notes

  • Ensure .pre-commit-config.yaml matches the project conventions and desired hooks
  • Confirm that global exclusions work as intended
  • CI will automatically enforce these hooks for future commits

Next Steps

  • After merge, all developers should run:
  • pre-commit install
  • Add/update instructions in CONTRIBUTING.md about pre-commit usage
  • Consider adding hooks to CI for push validation

Jennifer Pollack added 26 commits December 17, 2025 16:16
…ean up submodule docs, update conf.py, and update pyproject.toml version
- Removed old auto-generated wf_psf.rst from _autosummary
- Updated toc.rst (fixed tab issues, reference api.rst)
- Added api.rst with :recursive: directive and wf_psf.run entrypoint
- Refined __init__.py docstrings for all subpackages for clarity and consistency
- Updated module-level docstrings (purpose, authors, TensorFlow notes, etc.)
- Shorten sections to make developer-friendly
- Added new structure for each section: Purppose, Key Fields, Notes, General Notes, etc, where applicable
- Partial completion - new PR is required to verify optional versus required settings
- Added cross-references between config sections
- Clarified required fields for ground_truth_model.model_params
- Updated General Notes and reorganized section numbering
- Improved examples and directory structures
- Fixed build warnings due to missing anchors and code block lexing
- Add developer dir with subpage files: CoC, Git Workflow, Contributing files point to root-level docs
- Add index.md with subpages
@jeipollack jeipollack added the documentation Improvements or additions to documentation label Dec 17, 2025
@jeipollack jeipollack linked an issue Dec 17, 2025 that may be closed by this pull request
@jeipollack jeipollack changed the base branch from main to develop December 17, 2025 18:02
@jeipollack jeipollack self-assigned this Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Development

Successfully merging this pull request may close these issues.

Add pre-commit hooks for linting and documentation formatting

2 participants