Skip to content

Commit

Permalink
Make sourcetracker2 gibbs work as a command
Browse files Browse the repository at this point in the history
  • Loading branch information
Oddant1 committed Feb 1, 2024
1 parent 4c7c2eb commit 2c58b87
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def run(self):

description = "Python implementation of the SourceTracker R package."

standalone = ['sourcetracker2=sourcetracker._cli.gibbs:gibbs']
standalone = ['sourcetracker2=sourcetracker._cli.cli:cli']
q2cmds = ['q2-sourcetracker2=sourcetracker._q2.plugin_setup:plugin']

with open('README.md') as f:
Expand Down
20 changes: 0 additions & 20 deletions sourcetracker/_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +0,0 @@
# ----------------------------------------------------------------------------
# Copyright (c) 2016--, Biota Technology.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
from importlib import import_module
import click

from sourcetracker import __version__


@click.group()
@click.version_option(__version__)
def cli():
pass


import_module('sourcetracker._cli.gibbs')
19 changes: 19 additions & 0 deletions sourcetracker/_cli/cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ----------------------------------------------------------------------------
# Copyright (c) 2016--, Biota Technology.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
import click

from importlib import import_module
from sourcetracker import __version__


@click.group()
@click.version_option(__version__)
def cli():
pass

import_module('sourcetracker._cli.gibbs')
2 changes: 1 addition & 1 deletion sourcetracker/_cli/gibbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from biom import Table, load_table
from matplotlib import pyplot as plt

from sourcetracker._cli import cli
from sourcetracker._cli.cli import cli
from sourcetracker._gibbs import gibbs_helper
from sourcetracker._plot import plot_heatmap
from sourcetracker._util import parse_sample_metadata, biom_to_df
Expand Down

0 comments on commit 2c58b87

Please sign in to comment.