Skip to content

Code quality, documentation, and repo hygiene cleanup - #1

Merged
asifahamed11 merged 1 commit into
mainfrom
refactor/code-quality-cleanup
Jul 1, 2026
Merged

Code quality, documentation, and repo hygiene cleanup#1
asifahamed11 merged 1 commit into
mainfrom
refactor/code-quality-cleanup

Conversation

@asifahamed11

Copy link
Copy Markdown
Owner

Summary

A behavior-preserving cleanup pass to make the codebase read like it was written and maintained by an experienced researcher. No algorithms, hyper-parameters, data handling, training logic, or generated output files were changed — only presentation and code quality.

This was verified by tokenizing every file before/after and comparing all non-comment, non-string tokens (NAME/OP/NUMBER/keywords). The only executable differences are black's formatting (trailing commas, redundant-paren removal, semicolon splitting), one internal variable rename (code8_out -> stage08_out), and the removal of a runtime changelog banner that only printed to the console.

What changed

  • Formatting — standardized the whole src/ tree with black (line length 100). Consistent spacing, quotes, and line wrapping throughout.
  • Comments & docstrings — rewrote comments/docstrings to describe what the code does and removed iteration/revision-history artifacts (CHANGE 1/2/3, FIX 1-7, v4.0, Supervisor Request, Code 8/9, decorative # ==== banners). Added a concise module docstring to every script.
  • Console output — trimmed revision-tag prefixes (e.g. [FIX 7], [CHANGE 3]) from log messages and dropped a changelog banner that was printed at the start of the stage-08 run.
  • Repo hygiene — added a .gitignore (data, outputs, caches, editor cruft; the data/README.md already referenced one) and added a pipeline-stage map to the README.

Deliberately left untouched

To guarantee byte-identical results, every string literal written to an output file (report text, feature_count_audit.csv notes, the best-params change column, figure titles / model_name labels) was preserved exactly as-is.

All files compile (py_compile) after the changes.

Behavior-preserving cleanup: standardized formatting (black), rewrote docstrings/comments to describe functionality (removed revision-history tags), added module docstrings, added .gitignore, and documented the pipeline stages in the README. No changes to algorithms, hyper-parameters, data handling, or generated output files.
Copilot AI review requested due to automatic review settings July 1, 2026 10:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Behavior-preserving cleanup focused on readability and repository hygiene across the TF-DFE pipeline scripts, while keeping the data/training logic intact (aside from formatting and console-text tweaks).

Changes:

  • Apply consistent formatting (Black) and remove legacy revision-history banners/comments across src/.
  • Add/standardize module docstrings and tidy logging output text.
  • Improve repo hygiene/documentation via a new .gitignore and a pipeline stage map in README.md.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/config.py Reformats output directory constants and expands the output-dir creation list for readability.
src/10_exploratory_data_analysis.py Adds module docstring and applies formatting cleanup in EDA script.
src/09_reviewer_experiments.py Rewrites module header docs and refactors formatting/log strings in reviewer experiments utilities.
src/08_tda_fuzzy_ensemble.py Adds module docstring and performs extensive formatting/comment cleanup across the stage-08 pipeline.
src/07_dataset_balancing.py Adds module docstring and applies formatting cleanup.
src/06_clean_and_finalize.py Adds module docstring and applies formatting cleanup.
src/05_remove_leakage.py Adds module docstring and applies formatting/structure cleanup for chunked column dropping.
src/04_feature_engineering.py Adds module docstring and applies formatting cleanup in feature engineering pipeline.
src/03_remove_duplicates.py Adds module docstring and cleans up formatting/quoting.
src/02_remove_missing_values.py Adds module docstring and cleans up formatting for chunked NA filtering.
src/01_dbnsfp_processor.py Adds module docstring and applies formatting cleanup in dbNSFP processing.
README.md Adds a concise pipeline stage map describing the numbered scripts and their roles.
.gitignore Adds standard ignores for data, outputs, caches, and editor/OS artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1378 to +1382
X_test_bio,
y_test,
out,
feature_names=tab_fitted["feature_names"],
)
# ---------------------------------------------------------------------------
# Plotting helpers (unchanged from v3)
# ---------------------------------------------------------------------------
# Plotting helpers (unchanged from )
@asifahamed11
asifahamed11 merged commit c492162 into main Jul 1, 2026
1 check passed
@asifahamed11
asifahamed11 deleted the refactor/code-quality-cleanup branch July 9, 2026 14:11
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