Skip to content

Cleanup untracked scratch on kg-microbe main tree #579

Description

@realmarcin

Context

During the 2026-07-02 branch triage on `chore/refresh-unified-chemical-mappings`, `git status` surfaced 126 untracked entries in the working tree. Most were captured by the new `.gitignore` rules in #578 — but ~30 entries need per-file decisions before they can be either committed, deleted, or gitignored.

What still needs a call

New utility modules (no in-repo references — either real work on the wrong branch, or dead scratch)

  • `kg_microbe/utils/biohub_converter.py`
  • `kg_microbe/utils/diagnose_duplicates.py`
  • `kg_microbe/utils/extract_taxon_strain_nodes.py`
  • `kg_microbe/utils/nlp_utils.py`
  • `kg_microbe/utils/parse_taxon_rank.py` (plus `.py_bak` sibling — the `_bak` is now gitignored by Gitignore local build artifacts and dated snapshot dirs #578)
  • `kg_microbe/utils/transform_utils.py` (name collides with the top-level `transform_utils/` package — check for shadowing bugs)

Scripts at repo root (root-level Python is almost always a one-off)

  • `run.py` — likely wrong (canonical entrypoint is `poetry run kg`)
  • `analyze_categories.py`
  • `download_mediadive_bulk.py` — probably belongs alongside the download.yaml MediaDive work; move under `kg_microbe/` or `scripts/` if permanent
  • `convert_merged_to_nt.yaml`

Unknown directories (peek and decide)

  • `kg_microbe/transform_utils/data/`
  • `kg_microbe/transform_utils/ontology/` — possible typo of the existing `ontologies/` package

Data / mapping / xref files

  • `kg_microbe/transform_utils/bacdive/metabolite_mapping.json`
  • `kg_microbe/transform_utils/bactotraits/BactoTraits.tsv` — 6.2 MB. Per the download.yaml disable PR, BactoTraits V2 is now vendored because upstream TLS is broken. Probably needs to be committed alongside the download.yaml change.
  • `kg_microbe/transform_utils/ontologies/xrefs/mondo_xrefs.tsv`
  • `kg_microbe/transform_utils/ontologies/xrefs/unipathways_xrefs.tsv`

Docs

Mappings

  • `mappings/mediadive_unmapped_ingredients_to_curate.tsv` — generated by `scripts/dump_unmapped_mediadive_ingredients.py`; either commit as a curation-state snapshot, or gitignore

Notebooks

Rule of thumb: notebooks with a clear analytical purpose can be committed; `.ipynb_bak`, `_withoutput.ipynb`, `catboost_info/`, and rendered `.html` are now gitignored by #578.

  • `notebooks/bacdive-api-summary-table.ipynb`
  • `notebooks/bacdive-process-errors-with-genus.ipynb`
  • `notebooks/bacdive-summary-counts.ipynb`
  • `notebooks/bacdive_reformat.ipynb`
  • `notebooks/evaluate_link_pred.ipynb`
  • `notebooks/kg_bacdive.ipynb`
  • `notebooks/kg_microbe_embedding.ipynb`
  • `notebooks/kg_microbe_train_taxa_to_media.ipynb`
  • `notebooks/load_feba.ipynb` — plus `load_feba.ipynb` at repo root (duplicate — pick one location)
  • `notebooks/train_taxa_to_media.ipynb`

Decision checklist per file

  1. Is anything in the repo already importing / referencing it? `grep -r 'basename' .` — no hits = not wired in.
  2. Was it ever tracked? `git log --all --follow -- ` — empty = fresh scratch.
  3. Would losing it be a problem tomorrow? If not, delete.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions