Skip to content

Fix CI - #58

Merged
jpjarnoux merged 4 commits into
devfrom
bugfix/tests
Jul 23, 2026
Merged

Fix CI#58
jpjarnoux merged 4 commits into
devfrom
bugfix/tests

Conversation

@jpjarnoux

@jpjarnoux jpjarnoux commented Jul 23, 2026

Copy link
Copy Markdown
Member

Description

pyhmmer 0.12.0 changed HMM.name/.accession/.description (and the matching Hit/Sequence/Alignment attributes) from bytes to str. Since the dependency was unpinned (>=0.11.1), CI picked up 0.12.x and every .decode("UTF-8") call on these attributes started raising AttributeError: 'str' object has no attribute 'decode'. This broke panorama utils --hmm, which cascaded into failures for test_write_systems, test_pansystems_command, test_compare_spots_command, and test_compare_systems_command since none of the shared test pangenomes ever got systems detected.

Separately, the Ruff CI workflow was linting the entire repo instead of just panorama//tests/, failing on an unrelated formatting issue in .github/scripts/.

What changed

  • Pinned pyhmmer>=0.12.0 in pyproject.toml and panorama.yml, and updated panorama/utility/genInput.py, panorama/utility/translate/macsymodel_translator.py, and panorama/annotate/hmm_search.py to use plain str access on HMM/Hit/Sequence/Alignment attributes (dropped all .decode("UTF-8")/.encode("UTF-8") calls).
  • Fixed assign_hit() and annot_with_hmmscan()'s debug callback in hmm_search.py, which had the same latent bug on the hmmscan fallback path (not exercised by CI's small test dataset, but would break on real large-data runs).
  • Scoped .github/workflows/ruff.yml to src: "panorama tests" so it only lints the paths it's supposed to, instead of the whole repo.

Testing

Test environment:

  • Dataset used: no external test data available locally (PANORAMA_test); verified manually against the real pyhmmer 0.12.1 install in the project's panorama conda env.
  • Key parameters: constructed HMM/TextSequence objects via pyhmmer.plan7.HMM.sample / pyhmmer.easel.TextSequence.

Results:

  • parse_hmm_info, write_hmm, process_hmm_name, process_hmm_accession all run correctly end-to-end against pyhmmer 0.12.1 (previously raised AttributeError).
  • TextSequence/MSA name-and-accession assignment/digitization confirmed working with plain str.
  • ruff format --check and ruff check pass cleanly when scoped to panorama tests (verified locally with ruff 0.15.22, matching CI).
  • Did not run the full functional/pytest suite (no local test data, pytest/ruff not installed in the panorama conda env) — recommend CI confirms the previously-failing tests now pass.

Documentation

  • Added/updated code comments
  • Added/updated docstring
  • Updated README or docs if needed
  • Added example usage (if relevant)

Checklist

  • My code follows the project guidelines
  • Complex logic is commented
  • No unnecessary files or debug code included
  • My PR is targeting the dev branch

Additional notes

Anyone with an existing panorama conda env built before this change should recreate/update it (pyhmmer>=0.12.0) to match the new floor.

@jpjarnoux
jpjarnoux merged commit 61c8bea into dev Jul 23, 2026
3 checks passed
@jpjarnoux jpjarnoux changed the title Update the code with pyhmmer minimum version 0.12.0 Fix Ci Jul 23, 2026
@jpjarnoux jpjarnoux changed the title Fix Ci Fix CI Jul 23, 2026
@jpjarnoux
jpjarnoux deleted the bugfix/tests branch July 23, 2026 12:38
@jpjarnoux jpjarnoux mentioned this pull request Jul 23, 2026
8 tasks
jpjarnoux added a commit that referenced this pull request Jul 23, 2026
## Description

Release PR merging `dev` into `main`, bringing `main` from `1.0.0` up to
`1.0.4`. This covers several bug fixes (annotation timing, path
resolution, CLI argument names), a dependency floor bump for `pyhmmer`
(0.12.0, required for compatibility with its `bytes`→`str` API change),
removal of unsupported/dead CLI options, a large documentation overhaul
(developer guide, API reference, citation guide, quick-start), and CI
workflow cleanup.

## What changed

- **Fixes:**
- Fixed annotation monitoring accumulating elapsed time across
pangenomes instead of per-pangenome (#48).
- Fixed relative path resolution so `pangenome.h5` is found correctly
regardless of where the pangenome TSV/CLI is invoked from (#54).
- Fixed wrong argument names in the `compare_spots`/`compare_systems`
commands.
  - Fixed a CI failure (#49).
- **Dependencies:**
- Pinned `pyhmmer>=0.12.0` in `pyproject.toml` and `panorama.yml`;
updated `genInput.py`, `macsymodel_translator.py`, and `hmm_search.py`
to use plain `str` access on HMM/Hit/Sequence/Alignment attributes now
that pyhmmer 0.12+ returns `str` instead of `bytes` (#58).
- **Removed:**
- Removed unsupported `--conserved_spots` option from `write_flat.py`
(#56).
  - Removed the automatic version-bump GitHub Actions workflow (#52).
- **Utilities:**
- Added a `resolve_path` utility, integrated into `check_tsv_sanity` for
robust pangenome path resolution.
- **CI:**
- Scoped the Ruff format/lint workflow to `panorama`/`tests` only (`src`
input), so it no longer lints unrelated paths like `.github/scripts/`.
- Skipped test/Ruff workflow runs on `doc/*` branches and fixed
duplicate doc-check workflow runs.
- **Documentation:**
  - Added a "How to cite" guide and citation `.bib` files (#55).
  - Added a pull request template for contributions (#51).
- Large developer-guide and API-documentation restructuring: new I/O
layer and detection-workflow pages, cleaned-up autosummary/API
structure, removed several outdated developer docs.
- Numerous formatting/typo/link fixes across user and modeler
documentation; added PANORAMA logo and citation/paper badges to the
README.

## Testing

**Test environment:**

- Dataset used: no external `PANORAMA_test` dataset run as part of this
release PR itself — each underlying change was tested/verified
individually in its own PR (see #48, #49, #51, #52, #54, #55, #56, #57,
#58).
- Key parameters: N/A (aggregation PR).

**Results:**

- All constituent PRs passed CI (Ruff + pytest, Ubuntu/macOS, Python
3.12) individually before merging into `dev`.
- Recommend a final CI run on this PR against `main` before merging.

## Documentation

- [x] Added/updated code comments
- [x] Added/updated docstring
- [x] Updated README or docs if needed
- [ ] Added example usage (if relevant)

## Checklist

- [x] My code follows the project guidelines
- [x] Complex logic is commented
- [x] No unnecessary files or debug code included
- [ ] My PR is targeting the `dev` branch (this PR targets `main`, as a
release merge)

## Additional notes

`VERSION` is already at `1.0.4` on `dev` (bumped incrementally across
the merged PRs); no further manual bump should be needed for this
release. Anyone with an existing `panorama` conda env built before
`pyhmmer>=0.12.0` was pinned should recreate/update it to match the new
floor.
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.

1 participant