Skip to content

Deprecate console db#841

Merged
tanghaibao merged 6 commits into
mainfrom
deprecate-console-db
Mar 31, 2026
Merged

Deprecate console db#841
tanghaibao merged 6 commits into
mainfrom
deprecate-console-db

Conversation

@tanghaibao

Copy link
Copy Markdown
Owner

No description provided.

tanghaibao and others added 3 commits March 30, 2026 21:34
Remove the console module (thin wrapper around rich.Console) and the db
module (legacy JCVI database connectors for Sybase/MySQL/PostgreSQL/Oracle).
Replace console imports with direct rich.console.Console usage in aws.py,
fetch.py, and formats/base.py. Remove the now-unused set_db_opts method
from OptionParser.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
variation.deconvolute, assembly.syntenypath, annotation.ahrd, apps.emboss,
apps.gbsubmit

Relocate reusable code to consuming modules:
- CoordsLine, Coords, Overlap_types, get_coords_stats -> formats.blast
- CDT class -> compara.pad
- ContigFile/ContigLine/ReadLine -> assembly.postprocess
- read_interpro -> projects.pineapple
- needle/NeedleHeader -> annotation.reformat
Also fix remaining utils.console references in formats.fasta and
algorithms.ec from prior deprecation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
utils.ez_setup

Relocate reusable code to consuming modules:
- Bowtie2 wrappers (BowtieLogFile, check_index, align) -> apps.align
- Download utilities (ALL_DOWNLOADERS, get_best_downloader) -> apps.base
- LASTZ score conversion functions -> formats.maf

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 31, 2026 04:58

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 removes several legacy/duplicate modules (including the prior Rich console singleton and DB helpers) and consolidates selected functionality into fewer modules (notably downloader logic into apps.base and MUMmer .coords parsing/filtering into formats.blast), updating downstream imports accordingly.

Changes:

  • Remove deprecated/legacy modules (console/db/ez_setup, and multiple older command wrappers) and relocate a subset of their functionality into existing modules.
  • Consolidate download helpers into jcvi.apps.base and move .coords parsing/filtering into jcvi.formats.blast, updating callers.
  • Replace imports of the removed console singleton with local rich.console.Console instances / print helpers.

Reviewed changes

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

Show a summary per file
File Description
src/jcvi/variation/deconvolute.py Removed the legacy FASTQ deconvolution CLI module.
src/jcvi/utils/ez_setup.py Removed downloader-selection helper module (functionality moved elsewhere).
src/jcvi/utils/db.py Removed legacy DB connection/query utilities.
src/jcvi/utils/console.py Removed module-level Rich Console singleton.
src/jcvi/utils/aws.py Replaced import of removed console singleton with a local Console() instance.
src/jcvi/projects/pineapple.py Inlined read_interpro() implementation (previously imported from removed module).
src/jcvi/graphics/mummerplot.py Switched .coords import/filtering to formats.blast (coords_filter).
src/jcvi/formats/maf.py Inlined BLASTZ score conversion helpers previously imported from removed apps.lastz.
src/jcvi/formats/fasta.py Replaced printf import with Console().print.
src/jcvi/formats/coords.py Removed standalone .coords parsing/CLI module (parsing moved into formats.blast).
src/jcvi/formats/contig.py Removed TIGR contig parsing module (logic moved into assembly.postprocess).
src/jcvi/formats/cdt.py Removed CDT/GTR parsing module (logic moved into compara.pad).
src/jcvi/formats/blast.py Added .coords parsing/filtering utilities and shared Overlap_types here.
src/jcvi/formats/base.py Replaced console singleton usage in check_exists() with a local Console().
src/jcvi/compara/pad.py Inlined CDT parsing needed for PAD workflow; removed dependency on formats.cdt.
src/jcvi/assembly/syntenypath.py Removed legacy syntenic path assembly module.
src/jcvi/assembly/preprocess.py Updated imports to use apps.align (bowtie wrappers consolidated there).
src/jcvi/assembly/postprocess.py Inlined contig parsing types (ContigFile, etc.) and switched to read_block.
src/jcvi/assembly/goldenpath.py Updated Overlap_types import to come from formats.blast.
src/jcvi/assembly/automaton.py Updated bowtie align import to use apps.align.
src/jcvi/apps/lastz.py Removed legacy LASTZ wrapper module.
src/jcvi/apps/gbsubmit.py Removed legacy GenBank submission tooling module.
src/jcvi/apps/fetch.py Replaced printf/console singleton usage with a local Console() instance.
src/jcvi/apps/emboss.py Removed EMBOSS wrapper module (needle logic moved into annotation.reformat).
src/jcvi/apps/bowtie.py Removed bowtie wrapper module (logic consolidated into apps.align).
src/jcvi/apps/blastplus.py Removed legacy BLAST+ wrapper module.
src/jcvi/apps/base.py Removed DB option helper; moved downloader selection/implementation into this module.
src/jcvi/apps/align.py Added bowtie2 wrapper utilities (log parsing, index check, alignment wrapper) for backward compatibility.
src/jcvi/annotation/reformat.py Inlined EMBOSS needle logic and removed dependency on deleted apps.emboss.
src/jcvi/annotation/automaton.py Updated bowtie index import to use apps.align.
src/jcvi/annotation/ahrd.py Removed legacy AHRD pipeline utility module.
src/jcvi/algorithms/supermap.py Updated CoordsLine import to come from formats.blast.
src/jcvi/algorithms/ec.py Replaced printf import with Console().print.
Comments suppressed due to low confidence (1)

src/jcvi/apps/base.py:257

  • The PR title suggests only deprecating the console/db utilities, but this change set also removes or relocates substantial functionality (e.g., download helpers, bowtie/lastz-related code, coords/contig/cdt utilities). Please confirm the intended scope and, if this is a larger cleanup, consider updating the PR title/description to match so reviewers/users understand the breaking changes.
    def set_downloader(self, downloader=None):
        """
        Add --downloader options for given command line program.
        """
        downloader_choices = [x[0] for x in ALL_DOWNLOADERS]
        self.add_argument(
            "--downloader",
            default=downloader,
            choices=downloader_choices,
            help="Use the specified downloader to retrieve resources",
        )

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

Comment thread src/jcvi/projects/pineapple.py Outdated
Comment thread src/jcvi/formats/blast.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97c9f7cd9a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/jcvi/apps/align.py
return dbfile


def bowtie_align(args):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Re-expose bowtie alignment command through a dispatcher action

This commit deletes src/jcvi/apps/bowtie.py and moves the Bowtie2 wrapper into apps/align.py, but main() in apps/align.py still does not register any Bowtie action. Because ActionDispatcher only allows names in the actions tuple, users now have no CLI path for this workflow (jcvi apps.bowtie ... is gone, and jcvi apps.align bowtie_align ... is rejected), which breaks existing alignment pipelines that invoke Bowtie through jcvi commands.

Useful? React with 👍 / 👎.

tanghaibao and others added 2 commits March 30, 2026 22:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tanghaibao tanghaibao merged commit 5a82b23 into main Mar 31, 2026
6 checks passed
@tanghaibao tanghaibao deleted the deprecate-console-db branch March 31, 2026 05:15
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