after_merge stringlengths 28 79.6k | before_merge stringlengths 20 79.6k | url stringlengths 38 71 | full_traceback stringlengths 43 922k | traceback_type stringclasses 555
values |
|---|---|---|---|---|
def __init__(
self,
keys: KeysCollection,
angle: Union[Sequence[float], float],
keep_size: bool = True,
mode: GridSampleModeSequence = GridSampleMode.BILINEAR,
padding_mode: GridSamplePadModeSequence = GridSamplePadMode.BORDER,
align_corners: Union[Sequence[bool], bool] = False,
dtype: U... | def __init__(
self,
keys: KeysCollection,
angle: Union[Sequence[float], float],
keep_size: bool = True,
mode: GridSampleModeSequence = GridSampleMode.BILINEAR,
padding_mode: GridSamplePadModeSequence = GridSamplePadMode.BORDER,
align_corners: Union[Sequence[bool], bool] = False,
) -> None:
... | https://github.com/Project-MONAI/MONAI/issues/832 | ======================================================================
FAIL: test_training (__main__.IntegrationSegmentation3D)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/test_integration_segmentation_3d.py", line 257, in test_training
rtol=1e-3... | AssertionError |
def __call__(self, data):
d = dict(data)
for idx, key in enumerate(self.keys):
d[key] = self.rotator(
d[key],
mode=self.mode[idx],
padding_mode=self.padding_mode[idx],
align_corners=self.align_corners[idx],
dtype=self.dtype[idx],
)
... | def __call__(self, data):
d = dict(data)
for idx, key in enumerate(self.keys):
d[key] = self.rotator(
d[key],
mode=self.mode[idx],
padding_mode=self.padding_mode[idx],
align_corners=self.align_corners[idx],
)
return d
| https://github.com/Project-MONAI/MONAI/issues/832 | ======================================================================
FAIL: test_training (__main__.IntegrationSegmentation3D)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/test_integration_segmentation_3d.py", line 257, in test_training
rtol=1e-3... | AssertionError |
def __init__(
self,
keys: KeysCollection,
range_x: Union[Tuple[float, float], float] = 0.0,
range_y: Union[Tuple[float, float], float] = 0.0,
range_z: Union[Tuple[float, float], float] = 0.0,
prob: float = 0.1,
keep_size: bool = True,
mode: GridSampleModeSequence = GridSampleMode.BILINEA... | def __init__(
self,
keys: KeysCollection,
range_x: Union[Tuple[float, float], float] = 0.0,
range_y: Union[Tuple[float, float], float] = 0.0,
range_z: Union[Tuple[float, float], float] = 0.0,
prob: float = 0.1,
keep_size: bool = True,
mode: GridSampleModeSequence = GridSampleMode.BILINEA... | https://github.com/Project-MONAI/MONAI/issues/832 | ======================================================================
FAIL: test_training (__main__.IntegrationSegmentation3D)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/test_integration_segmentation_3d.py", line 257, in test_training
rtol=1e-3... | AssertionError |
def __call__(self, data):
self.randomize()
d = dict(data)
if not self._do_transform:
return d
rotator = Rotate(
angle=self.x if d[self.keys[0]].ndim == 3 else (self.x, self.y, self.z),
keep_size=self.keep_size,
)
for idx, key in enumerate(self.keys):
d[key] = rota... | def __call__(self, data):
self.randomize()
d = dict(data)
if not self._do_transform:
return d
rotator = Rotate(
angle=self.x if d[self.keys[0]].ndim == 3 else (self.x, self.y, self.z),
keep_size=self.keep_size,
)
for idx, key in enumerate(self.keys):
d[key] = rota... | https://github.com/Project-MONAI/MONAI/issues/832 | ======================================================================
FAIL: test_training (__main__.IntegrationSegmentation3D)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/test_integration_segmentation_3d.py", line 257, in test_training
rtol=1e-3... | AssertionError |
def paga_path(
adata: AnnData,
nodes: Sequence[Union[str, int]],
keys: Sequence[str],
use_raw: bool = True,
annotations: Sequence[str] = ("dpt_pseudotime",),
color_map: Union[str, Colormap, None] = None,
color_maps_annotations: Mapping[str, Union[str, Colormap]] = MappingProxyType(
d... | def paga_path(
adata: AnnData,
nodes: Sequence[Union[str, int]],
keys: Sequence[str],
use_raw: bool = True,
annotations: Sequence[str] = ("dpt_pseudotime",),
color_map: Union[str, Colormap, None] = None,
color_maps_annotations: Mapping[str, Union[str, Colormap]] = MappingProxyType(
d... | https://github.com/theislab/scanpy/issues/953 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-a9471349c389> in <module>
----> 1 sc.pl.paga_path(adata, nodes=['1Ery'], keys=['Gata2', 'Btg2', 'Btg1'])
~/Documents/Python/scanpy/scanpy/plotting/_to... | TypeError |
def print_versions(*, file=None):
"""Print print versions of imported packages"""
if file is None: # Inform people about the behavior change
warning("If you miss a compact list, please try `print_header`!")
stdout = sys.stdout
try:
buf = sys.stdout = io.StringIO()
sinfo(
... | def print_versions(*, file=None):
"""Print print versions of imported packages"""
if file is None: # Inform people about the behavior change
warning("If you miss a compact list, please try `print_header`!")
stdout = sys.stdout
try:
buf = sys.stdout = io.StringIO()
sinfo(dependen... | https://github.com/theislab/scanpy/issues/1437 | WARNING: If you miss a compact list, please try `print_header`!
Traceback (most recent call last):
File "/home/sturm/anaconda3/envs/scanpy_test/lib/python3.7/site-packages/sinfo/main.py", line 195, in sinfo
mod_version = _find_version(mod.__version__)
AttributeError: module 'importlib_metadata' has no attribute '__vers... | AttributeError |
def obs_df(
adata: AnnData,
keys: Iterable[str] = (),
obsm_keys: Iterable[Tuple[str, int]] = (),
*,
layer: str = None,
gene_symbols: str = None,
use_raw: bool = False,
) -> pd.DataFrame:
"""\
Return values for observations in adata.
Params
------
adata
AnnData ob... | def obs_df(
adata: AnnData,
keys: Iterable[str] = (),
obsm_keys: Iterable[Tuple[str, int]] = (),
*,
layer: str = None,
gene_symbols: str = None,
use_raw: bool = False,
) -> pd.DataFrame:
"""\
Return values for observations in adata.
Params
------
adata
AnnData ob... | https://github.com/theislab/scanpy/issues/1634 | ~/scanpy/scanpy/get/get.py in obs_df(adata, keys, obsm_keys, layer, gene_symbols, use_raw)
301
302 # reorder columns to given order (including duplicates keys if present)
--> 303 df = df[keys]
304 for k, idx in obsm_keys:
305 added_k = f"{k}-{idx}"
KeyError: () | KeyError |
def var_df(
adata: AnnData,
keys: Iterable[str] = (),
varm_keys: Iterable[Tuple[str, int]] = (),
*,
layer: str = None,
) -> pd.DataFrame:
"""\
Return values for observations in adata.
Params
------
adata
AnnData object to get values from.
keys
Keys from eithe... | def var_df(
adata: AnnData,
keys: Iterable[str] = (),
varm_keys: Iterable[Tuple[str, int]] = (),
*,
layer: str = None,
) -> pd.DataFrame:
"""\
Return values for observations in adata.
Params
------
adata
AnnData object to get values from.
keys
Keys from eithe... | https://github.com/theislab/scanpy/issues/1634 | ~/scanpy/scanpy/get/get.py in obs_df(adata, keys, obsm_keys, layer, gene_symbols, use_raw)
301
302 # reorder columns to given order (including duplicates keys if present)
--> 303 df = df[keys]
304 for k, idx in obsm_keys:
305 added_k = f"{k}-{idx}"
KeyError: () | KeyError |
def heatmap(
adata: AnnData,
var_names: Union[_VarNames, Mapping[str, _VarNames]],
groupby: Union[str, Sequence[str]],
use_raw: Optional[bool] = None,
log: bool = False,
num_categories: int = 7,
dendrogram: Union[bool, str] = False,
gene_symbols: Optional[str] = None,
var_group_posit... | def heatmap(
adata: AnnData,
var_names: Union[_VarNames, Mapping[str, _VarNames]],
groupby: Union[str, Sequence[str]],
use_raw: Optional[bool] = None,
log: bool = False,
num_categories: int = 7,
dendrogram: Union[bool, str] = False,
gene_symbols: Optional[str] = None,
var_group_posit... | https://github.com/theislab/scanpy/issues/1591 | TypeError Traceback (most recent call last)
<ipython-input-56-f1ba710dac43> in <module>
9
10 sc.pl.heatmap(a, var_names=a.var_names[:5], groupby=None, swap_axes=True) # is shifted to the left (fig. 1)
---> 11 sc.pl.heatmap(a, var_names=a.var_names[:5], groupby="foo", swap_axes=True)
12
... | TypeError |
def _plot_categories_as_colorblocks(
groupby_ax: Axes,
obs_tidy: pd.DataFrame,
colors=None,
orientation: Literal["top", "bottom", "left", "right"] = "left",
cmap_name: str = "tab20",
):
"""\
Plots categories as colored blocks. If orientation is 'left', the categories
are plotted vertical... | def _plot_categories_as_colorblocks(
groupby_ax: Axes,
obs_tidy: pd.DataFrame,
colors=None,
orientation: Literal["top", "bottom", "left", "right"] = "left",
cmap_name: str = "tab20",
):
"""\
Plots categories as colored blocks. If orientation is 'left', the categories
are plotted vertical... | https://github.com/theislab/scanpy/issues/1591 | TypeError Traceback (most recent call last)
<ipython-input-56-f1ba710dac43> in <module>
9
10 sc.pl.heatmap(a, var_names=a.var_names[:5], groupby=None, swap_axes=True) # is shifted to the left (fig. 1)
---> 11 sc.pl.heatmap(a, var_names=a.var_names[:5], groupby="foo", swap_axes=True)
12
... | TypeError |
def recipe_seurat(
adata: AnnData,
log: bool = True,
plot: bool = False,
copy: bool = False,
) -> Optional[AnnData]:
"""\
Normalization and filtering as of Seurat [Satija15]_.
This uses a particular preprocessing.
Expects non-logarithmized data.
If using logarithmized data, pass `l... | def recipe_seurat(
adata: AnnData,
log: bool = True,
plot: bool = False,
copy: bool = False,
) -> Optional[AnnData]:
"""\
Normalization and filtering as of Seurat [Satija15]_.
This uses a particular preprocessing.
Expects non-logarithmized data.
If using logarithmized data, pass `l... | https://github.com/theislab/scanpy/issues/1326 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-bfa4168a87e6> in <module>
1 adata.raw = adata
----> 2 sc.pp.recipe_weinreb17(adata, log=False)
3 sc.tl.pca(adata)
/opt/anaconda3/lib/python3.7/site-pa... | AttributeError |
def swap_axes(self, swap_axes: Optional[bool] = True):
"""
Plots a transposed image.
By default, the x axis contains `var_names` (e.g. genes) and the y
axis the `groupby` categories. By setting `swap_axes` then x are
the `groupby` categories and y the `var_names`.
Parameters
----------
... | def swap_axes(self, swap_axes: Optional[bool] = True):
"""
Plots a transposed image.
By default, the x axis contains `var_names` (e.g. genes) and the y
axis the `groupby` categories. By setting `swap_axes` then x are
the `groupby` categories and y the `var_names`.
Parameters
----------
... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def add_dendrogram(
self,
show: Optional[bool] = True,
dendrogram_key: Optional[str] = None,
size: Optional[float] = 0.8,
):
"""\
Show dendrogram based on the hierarchical clustering between the `groupby`
categories. Categories are reordered to match the dendrogram order.
Th... | def add_dendrogram(
self,
show: Optional[bool] = True,
dendrogram_key: Optional[str] = None,
size: Optional[float] = 0.8,
):
"""
Show dendrogram based on the hierarchical clustering between the `groupby`
categories. Categories are reordered to match the dendrogram order.
The dendrogram ... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def add_totals(
self,
show: Optional[bool] = True,
sort: Literal["ascending", "descending"] = None,
size: Optional[float] = 0.8,
color: Optional[Union[ColorLike, Sequence[ColorLike]]] = None,
):
"""\
Show barplot for the number of cells in in `groupby` category.
The barplot is b... | def add_totals(
self,
show: Optional[bool] = True,
sort: Literal["ascending", "descending"] = None,
size: Optional[float] = 0.8,
color: Optional[Union[ColorLike, Sequence[ColorLike]]] = None,
):
"""
Show barplot for the number of cells in in `groupby` category.
The barplot is by default... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def style(self, cmap: Optional[str] = DEFAULT_COLORMAP):
"""\
Set visual style parameters
Parameters
----------
cmap
colormap
Returns
-------
BasePlot
"""
self.cmap = cmap
| def style(self, cmap: Optional[str] = DEFAULT_COLORMAP):
self.cmap = cmap
| https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def legend(
self,
show: Optional[bool] = True,
title: Optional[str] = DEFAULT_COLOR_LEGEND_TITLE,
width: Optional[float] = DEFAULT_LEGENDS_WIDTH,
):
"""\
Configure legend parameters
Parameters
----------
show
Set to 'False' to hide the default plot of the... | def legend(
self,
show: Optional[bool] = True,
title: Optional[str] = DEFAULT_COLOR_LEGEND_TITLE,
width: Optional[float] = DEFAULT_LEGENDS_WIDTH,
):
"""
Configure legend parameters.
Parameters
----------
show
Set to `False` to hide the default plot of the legend.
title
... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def style(
self,
cmap: str = DEFAULT_COLORMAP,
color_on: Optional[Literal["dot", "square"]] = DEFAULT_COLOR_ON,
dot_max: Optional[float] = DEFAULT_DOT_MAX,
dot_min: Optional[float] = DEFAULT_DOT_MIN,
smallest_dot: Optional[float] = DEFAULT_SMALLEST_DOT,
largest_dot: Optional[float] = DEFAULT... | def style(
self,
cmap: str = DEFAULT_COLORMAP,
color_on: Optional[Literal["dot", "square"]] = DEFAULT_COLOR_ON,
dot_max: Optional[float] = DEFAULT_DOT_MAX,
dot_min: Optional[float] = DEFAULT_DOT_MIN,
smallest_dot: Optional[float] = DEFAULT_SMALLEST_DOT,
largest_dot: Optional[float] = DEFAULT... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def legend(
self,
show: Optional[bool] = True,
show_size_legend: Optional[bool] = True,
show_colorbar: Optional[bool] = True,
size_title: Optional[str] = DEFAULT_SIZE_LEGEND_TITLE,
colorbar_title: Optional[str] = DEFAULT_COLOR_LEGEND_TITLE,
width: Optional[float] = DEFAULT_LEGENDS_WIDTH,
):
... | def legend(
self,
show: Optional[bool] = True,
show_size_legend: Optional[bool] = True,
show_colorbar: Optional[bool] = True,
size_title: Optional[str] = DEFAULT_SIZE_LEGEND_TITLE,
colorbar_title: Optional[str] = DEFAULT_COLOR_LEGEND_TITLE,
width: Optional[float] = DEFAULT_LEGENDS_WIDTH,
):
... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def _dotplot(
dot_size,
dot_color,
dot_ax,
cmap: str = "Reds",
color_on: Optional[str] = "dot",
y_label: Optional[str] = None,
dot_max: Optional[float] = None,
dot_min: Optional[float] = None,
standard_scale: Literal["var", "group"] = None,
smallest_dot: Optional[float] = 0.0,
... | def _dotplot(
dot_size,
dot_color,
dot_ax,
cmap: str = "Reds",
color_on: Optional[str] = "dot",
y_label: Optional[str] = None,
dot_max: Optional[float] = None,
dot_min: Optional[float] = None,
standard_scale: Literal["var", "group"] = None,
smallest_dot: Optional[float] = 0.0,
... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def dotplot(
adata: AnnData,
var_names: Union[_VarNames, Mapping[str, _VarNames]],
groupby: Union[str, Sequence[str]],
use_raw: Optional[bool] = None,
log: bool = False,
num_categories: int = 7,
expression_cutoff: float = 0.0,
mean_only_expressed: bool = False,
cmap: str = "Reds",
... | def dotplot(
adata: AnnData,
var_names: Union[_VarNames, Mapping[str, _VarNames]],
groupby: Union[str, Sequence[str]],
use_raw: Optional[bool] = None,
log: bool = False,
num_categories: int = 7,
expression_cutoff: float = 0.0,
mean_only_expressed: bool = False,
cmap: str = "Reds",
... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def style(
self,
cmap: str = DEFAULT_COLORMAP,
edge_color: Optional[ColorLike] = DEFAULT_EDGE_COLOR,
edge_lw: Optional[float] = DEFAULT_EDGE_LW,
):
"""\
Modifies plot visual parameters.
Parameters
----------
cmap
String denoting matplotlib color map.
... | def style(
self,
cmap: str = DEFAULT_COLORMAP,
edge_color: Optional[ColorLike] = DEFAULT_EDGE_COLOR,
edge_lw: Optional[float] = DEFAULT_EDGE_LW,
):
"""
Modifies plot graphical parameters
Parameters
----------
cmap
String denoting matplotlib color map.
... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def matrixplot(
adata: AnnData,
var_names: Union[_VarNames, Mapping[str, _VarNames]],
groupby: Union[str, Sequence[str]],
use_raw: Optional[bool] = None,
log: bool = False,
num_categories: int = 7,
figsize: Optional[Tuple[float, float]] = None,
dendrogram: Union[bool, str] = False,
t... | def matrixplot(
adata: AnnData,
var_names: Union[_VarNames, Mapping[str, _VarNames]],
groupby: Union[str, Sequence[str]],
use_raw: Optional[bool] = None,
log: bool = False,
num_categories: int = 7,
figsize: Optional[Tuple[float, float]] = None,
dendrogram: Union[bool, str] = False,
t... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def style(
self,
cmap: str = DEFAULT_COLORMAP,
stripplot: Optional[bool] = DEFAULT_STRIPPLOT,
jitter: Optional[Union[float, bool]] = DEFAULT_JITTER,
jitter_size: Optional[int] = DEFAULT_JITTER_SIZE,
linewidth: Optional[float] = DEFAULT_LINE_WIDTH,
row_palette: Optional[str] = DEFAULT_ROW_PAL... | def style(
self,
cmap: str = DEFAULT_COLORMAP,
stripplot: Optional[bool] = DEFAULT_STRIPPLOT,
jitter: Optional[Union[float, bool]] = DEFAULT_JITTER,
jitter_size: Optional[int] = DEFAULT_JITTER_SIZE,
linewidth: Optional[float] = DEFAULT_LINE_WIDTH,
row_palette: Optional[str] = DEFAULT_ROW_PAL... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def stacked_violin(
adata: AnnData,
var_names: Union[_VarNames, Mapping[str, _VarNames]],
groupby: Union[str, Sequence[str]],
log: bool = False,
use_raw: Optional[bool] = None,
num_categories: int = 7,
title: Optional[str] = None,
colorbar_title: Optional[str] = StackedViolin.DEFAULT_COL... | def stacked_violin(
adata: AnnData,
var_names: Union[_VarNames, Mapping[str, _VarNames]],
groupby: Union[str, Sequence[str]],
log: bool = False,
use_raw: Optional[bool] = None,
num_categories: int = 7,
title: Optional[str] = None,
colorbar_title: Optional[str] = StackedViolin.DEFAULT_COL... | https://github.com/theislab/scanpy/issues/1307 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/1204/lib/python3.6/site-packages/setuptools_scm/git.py:68: UserWarning: "/home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/checkouts/1204" is shallow and may cause errors
warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
/hom... | sphinx.errors.SphinxWarning |
def _prepare_dataframe(
adata: AnnData,
var_names: Union[_VarNames, Mapping[str, _VarNames]],
groupby: Optional[str] = None,
use_raw: Optional[bool] = None,
log: bool = False,
num_categories: int = 7,
layer=None,
gene_symbols: Optional[str] = None,
):
"""
Given the anndata object... | def _prepare_dataframe(
adata: AnnData,
var_names: Union[_VarNames, Mapping[str, _VarNames]],
groupby: Optional[str] = None,
use_raw: Optional[bool] = None,
log: bool = False,
num_categories: int = 7,
layer=None,
gene_symbols: Optional[str] = None,
):
"""
Given the anndata object... | https://github.com/theislab/scanpy/issues/1277 | ERROR: Gene symbol 'ENSGALG00000048305' not found in given gene_symbols column: 'varnames'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-40-80ce653c9d2e> in <module>
----> 1 sc.pl.heatmap(
2 ada... | TypeError |
def circles(x, y, s, ax, marker=None, c="b", vmin=None, vmax=None, **kwargs):
"""
Taken from here: https://gist.github.com/syrte/592a062c562cd2a98a83
Make a scatter plot of circles.
Similar to pl.scatter, but the size of circles are in data scale.
Parameters
----------
x, y : scalar or array... | def circles(x, y, s, ax, marker=None, c="b", vmin=None, vmax=None, **kwargs):
"""
Taken from here: https://gist.github.com/syrte/592a062c562cd2a98a83
Make a scatter plot of circles.
Similar to pl.scatter, but the size of circles are in data scale.
Parameters
----------
x, y : scalar or array... | https://github.com/theislab/scanpy/issues/1225 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-3-1ffa4586cef4> in <module>
----> 1 sc.pl.spatial(adata)
~/github/scanpy/scanpy/plotting/_tools/scatterplots.py in spatial(adata, img_key, library_id, c... | AttributeError |
def _standardize_data(
model: pd.DataFrame,
data: pd.DataFrame,
batch_key: str,
) -> Tuple[pd.DataFrame, pd.DataFrame, np.ndarray, np.ndarray]:
"""\
Standardizes the data per gene.
The aim here is to make mean and variance be comparable across batches.
Parameters
--------
model
... | def _standardize_data(
model: pd.DataFrame,
data: pd.DataFrame,
batch_key: str,
) -> Tuple[pd.DataFrame, pd.DataFrame, np.ndarray, np.ndarray]:
"""\
Standardizes the data per gene.
The aim here is to make mean and variance be comparable across batches.
Parameters
--------
model
... | https://github.com/theislab/scanpy/issues/1170 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-5-350690ae55dc> in <module>
1 # ComBat batch correction
----> 2 sc.pp.combat(adata, key='sample')
~/anaconda2/envs/scanpy/lib/python3.6/site-packages/sc... | ValueError |
def combat(
adata: AnnData,
key: str = "batch",
covariates: Optional[Collection[str]] = None,
inplace: bool = True,
) -> Union[AnnData, np.ndarray, None]:
"""\
ComBat function for batch effect correction [Johnson07]_ [Leek12]_
[Pedersen12]_.
Corrects for batch effects by fitting linear ... | def combat(
adata: AnnData,
key: str = "batch",
covariates: Optional[Collection[str]] = None,
inplace: bool = True,
) -> Union[AnnData, np.ndarray, None]:
"""\
ComBat function for batch effect correction [Johnson07]_ [Leek12]_
[Pedersen12]_.
Corrects for batch effects by fitting linear ... | https://github.com/theislab/scanpy/issues/1170 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-5-350690ae55dc> in <module>
1 # ComBat batch correction
----> 2 sc.pp.combat(adata, key='sample')
~/anaconda2/envs/scanpy/lib/python3.6/site-packages/sc... | ValueError |
def _download_visium_dataset(sample_id: str, base_dir: Optional[Path] = None):
"""
Params
------
sample_id
String name of example visium dataset.
base_dir
Where to download the dataset to.
"""
import tarfile
if base_dir is None:
base_dir = settings.datasetdir
... | def _download_visium_dataset(sample_id: str, base_dir: Optional[Path] = None):
"""
Params
------
sample_id
String name of example visium dataset.
base_dir
Where to download the dataset to.
"""
import tarfile
if base_dir is None:
base_dir = settings.datasetdir
... | https://github.com/theislab/scanpy/issues/1184 | FileNotFoundError: [Errno 2] No such file or directory: '/Users/lisa/data/V1_Breast_Cancer_Block_A_Section_1' | FileNotFoundError |
def _download(url: str, path: Path):
from tqdm.auto import tqdm
from urllib.request import urlretrieve
path.parent.mkdir(parents=True, exist_ok=True)
with tqdm(unit="B", unit_scale=True, miniters=1, desc=path.name) as t:
def update_to(b=1, bsize=1, tsize=None):
if tsize is not None... | def _download(url: str, path: Path):
from tqdm.auto import tqdm
from urllib.request import urlretrieve
path.parent.mkdir(parents=True, exist_ok=True)
with tqdm(unit="B", unit_scale=True, miniters=1, desc=path.name) as t:
def update_to(b=1, bsize=1, tsize=None):
if tsize is not None... | https://github.com/theislab/scanpy/issues/1082 | /scanpy/scanpy/datasets/_ebi_expression_atlas.py in download_experiment(accession)
41
42 _download(
---> 43 download_url + "experiment-design", experiment_dir / "experimental_design.tsv",
44 )
45 _download(
/scanpy/scanpy/readwrite.py in _download(url, path)
877 except Exception:
878 ... | TypeError |
def _init_umap(self, adata):
from umap import UMAP
self._umap = UMAP(
metric=adata.uns["neighbors"]["params"]["metric"],
random_state=adata.uns["umap"]["params"].get("random_state", 0),
)
self._umap.embedding_ = adata.obsm["X_umap"]
self._umap._raw_data = self._rep
self._umap._... | def _init_umap(self, adata):
from umap import UMAP
self._umap = UMAP(metric=adata.uns["neighbors"]["params"]["metric"])
self._umap.embedding_ = adata.obsm["X_umap"]
self._umap._raw_data = self._rep
self._umap._sparse_data = issparse(self._rep)
self._umap._small_data = self._rep.shape[0] < 4096... | https://github.com/theislab/scanpy/issues/1036 | ------------------------------------------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------------------------------------------
running ingest
____________________________________________________... | ImportError |
def umap(
adata: AnnData,
min_dist: float = 0.5,
spread: float = 1.0,
n_components: int = 2,
maxiter: Optional[int] = None,
alpha: float = 1.0,
gamma: float = 1.0,
negative_sample_rate: int = 5,
init_pos: Union[_InitPos, np.ndarray, None] = "spectral",
random_state: AnyRandom = 0... | def umap(
adata: AnnData,
min_dist: float = 0.5,
spread: float = 1.0,
n_components: int = 2,
maxiter: Optional[int] = None,
alpha: float = 1.0,
gamma: float = 1.0,
negative_sample_rate: int = 5,
init_pos: Union[_InitPos, np.ndarray, None] = "spectral",
random_state: AnyRandom = 0... | https://github.com/theislab/scanpy/issues/1036 | ------------------------------------------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------------------------------------------
running ingest
____________________________________________________... | ImportError |
def dca(
adata: AnnData,
mode: Literal["denoise", "latent"] = "denoise",
ae_type: _AEType = "zinb-conddisp",
normalize_per_cell: bool = True,
scale: bool = True,
log1p: bool = True,
# network args
hidden_size: Sequence[int] = (64, 32, 64),
hidden_dropout: Union[float, Sequence[float]... | def dca(
adata: AnnData,
mode: Literal["denoise", "latent"] = "denoise",
ae_type: _AEType = "zinb-conddisp",
normalize_per_cell: bool = True,
scale: bool = True,
log1p: bool = True,
# network args
hidden_size: Sequence[int] = (64, 32, 64),
hidden_dropout: Union[float, Sequence[float]... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def magic(
adata: AnnData,
name_list: Union[Literal["all_genes", "pca_only"], Sequence[str], None] = None,
*,
knn: int = 5,
decay: Optional[float] = 1,
knn_max: Optional[int] = None,
t: Union[Literal["auto"], int] = 3,
n_pca: Optional[int] = 100,
solver: Literal["exact", "approximate... | def magic(
adata: AnnData,
name_list: Union[Literal["all_genes", "pca_only"], Sequence[str], None] = None,
*,
knn: int = 5,
decay: Optional[float] = 1,
knn_max: Optional[int] = None,
t: Union[Literal["auto"], int] = 3,
n_pca: Optional[int] = 100,
solver: Literal["exact", "approximate... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def phate(
adata: AnnData,
n_components: int = 2,
k: int = 5,
a: int = 15,
n_landmark: int = 2000,
t: Union[int, str] = "auto",
gamma: float = 1.0,
n_pca: int = 100,
knn_dist: str = "euclidean",
mds_dist: str = "euclidean",
mds: Literal["classic", "metric", "nonmetric"] = "me... | def phate(
adata: AnnData,
n_components: int = 2,
k: int = 5,
a: int = 15,
n_landmark: int = 2000,
t: Union[int, str] = "auto",
gamma: float = 1.0,
n_pca: int = 100,
knn_dist: str = "euclidean",
mds_dist: str = "euclidean",
mds: Literal["classic", "metric", "nonmetric"] = "me... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def neighbors(
adata: AnnData,
n_neighbors: int = 15,
n_pcs: Optional[int] = None,
use_rep: Optional[str] = None,
knn: bool = True,
random_state: AnyRandom = 0,
method: Optional[_Method] = "umap",
metric: Union[_Metric, _MetricFn] = "euclidean",
metric_kwds: Mapping[str, Any] = Mappi... | def neighbors(
adata: AnnData,
n_neighbors: int = 15,
n_pcs: Optional[int] = None,
use_rep: Optional[str] = None,
knn: bool = True,
random_state: Optional[Union[int, RandomState]] = 0,
method: Optional[_Method] = "umap",
metric: Union[_Metric, _MetricFn] = "euclidean",
metric_kwds: M... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def compute_neighbors_umap(
X: Union[np.ndarray, csr_matrix],
n_neighbors: int,
random_state: AnyRandom = None,
metric: Union[_Metric, _MetricFn] = "euclidean",
metric_kwds: Mapping[str, Any] = MappingProxyType({}),
angular: bool = False,
verbose: bool = False,
):
"""This is from umap.fu... | def compute_neighbors_umap(
X: Union[np.ndarray, csr_matrix],
n_neighbors: int,
random_state: Optional[Union[int, RandomState]] = None,
metric: Union[_Metric, _MetricFn] = "euclidean",
metric_kwds: Mapping[str, Any] = MappingProxyType({}),
angular: bool = False,
verbose: bool = False,
):
... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def compute_neighbors(
self,
n_neighbors: int = 30,
knn: bool = True,
n_pcs: Optional[int] = None,
use_rep: Optional[str] = None,
method: _Method = "umap",
random_state: AnyRandom = 0,
write_knn_indices: bool = False,
metric: _Metric = "euclidean",
metric_kwds: Mapping[str, Any] ... | def compute_neighbors(
self,
n_neighbors: int = 30,
knn: bool = True,
n_pcs: Optional[int] = None,
use_rep: Optional[str] = None,
method: _Method = "umap",
random_state: Optional[Union[int, RandomState]] = 0,
write_knn_indices: bool = False,
metric: _Metric = "euclidean",
metric_... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def recipe_weinreb17(
adata: AnnData,
log: bool = True,
mean_threshold: float = 0.01,
cv_threshold: int = 2,
n_pcs: int = 50,
svd_solver="randomized",
random_state: AnyRandom = 0,
copy: bool = False,
) -> Optional[AnnData]:
"""\
Normalization and filtering as of [Weinreb17]_.
... | def recipe_weinreb17(
adata: AnnData,
log: bool = True,
mean_threshold: float = 0.01,
cv_threshold: int = 2,
n_pcs: int = 50,
svd_solver="randomized",
random_state: Union[int, RandomState] = 0,
copy: bool = False,
) -> Optional[AnnData]:
"""\
Normalization and filtering as of [We... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def pca(
data: Union[AnnData, np.ndarray, spmatrix],
n_comps: Optional[int] = None,
zero_center: Optional[bool] = True,
svd_solver: str = "arpack",
random_state: AnyRandom = 0,
return_info: bool = False,
use_highly_variable: Optional[bool] = None,
dtype: str = "float32",
copy: bool =... | def pca(
data: Union[AnnData, np.ndarray, spmatrix],
n_comps: Optional[int] = None,
zero_center: Optional[bool] = True,
svd_solver: str = "arpack",
random_state: Optional[Union[int, RandomState]] = 0,
return_info: bool = False,
use_highly_variable: Optional[bool] = None,
dtype: str = "fl... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def subsample(
data: Union[AnnData, np.ndarray, spmatrix],
fraction: Optional[float] = None,
n_obs: Optional[int] = None,
random_state: AnyRandom = 0,
copy: bool = False,
) -> Optional[AnnData]:
"""\
Subsample to a fraction of the number of observations.
Parameters
----------
da... | def subsample(
data: Union[AnnData, np.ndarray, spmatrix],
fraction: Optional[float] = None,
n_obs: Optional[int] = None,
random_state: Union[int, RandomState] = 0,
copy: bool = False,
) -> Optional[AnnData]:
"""\
Subsample to a fraction of the number of observations.
Parameters
---... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def downsample_counts(
adata: AnnData,
counts_per_cell: Optional[Union[int, Collection[int]]] = None,
total_counts: Optional[int] = None,
*,
random_state: AnyRandom = 0,
replace: bool = False,
copy: bool = False,
) -> Optional[AnnData]:
"""\
Downsample counts from count matrix.
... | def downsample_counts(
adata: AnnData,
counts_per_cell: Optional[Union[int, Collection[int]]] = None,
total_counts: Optional[int] = None,
*,
random_state: Optional[Union[int, RandomState]] = 0,
replace: bool = False,
copy: bool = False,
) -> Optional[AnnData]:
"""\
Downsample counts ... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def _downsample_array(
col: np.ndarray,
target: int,
random_state: AnyRandom = 0,
replace: bool = True,
inplace: bool = False,
):
"""\
Evenly reduce counts in cell to target amount.
This is an internal function and has some restrictions:
* total counts in cell must be less than tar... | def _downsample_array(
col: np.ndarray,
target: int,
random_state: Optional[Union[int, RandomState]] = 0,
replace: bool = True,
inplace: bool = False,
):
"""\
Evenly reduce counts in cell to target amount.
This is an internal function and has some restrictions:
* total counts in ce... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def draw_graph(
adata: AnnData,
layout: _Layout = "fa",
init_pos: Union[str, bool, None] = None,
root: Optional[int] = None,
random_state: AnyRandom = 0,
n_jobs: Optional[int] = None,
adjacency: Optional[spmatrix] = None,
key_added_ext: Optional[str] = None,
copy: bool = False,
*... | def draw_graph(
adata: AnnData,
layout: _Layout = "fa",
init_pos: Union[str, bool, None] = None,
root: Optional[int] = None,
random_state: Optional[Union[int, RandomState]] = 0,
n_jobs: Optional[int] = None,
adjacency: Optional[spmatrix] = None,
key_added_ext: Optional[str] = None,
c... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def leiden(
adata: AnnData,
resolution: float = 1,
*,
restrict_to: Optional[Tuple[str, Sequence[str]]] = None,
random_state: _utils.AnyRandom = 0,
key_added: str = "leiden",
adjacency: Optional[sparse.spmatrix] = None,
directed: bool = True,
use_weights: bool = True,
n_iterations... | def leiden(
adata: AnnData,
resolution: float = 1,
*,
restrict_to: Optional[Tuple[str, Sequence[str]]] = None,
random_state: Optional[Union[int, RandomState]] = 0,
key_added: str = "leiden",
adjacency: Optional[sparse.spmatrix] = None,
directed: bool = True,
use_weights: bool = True,... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def louvain(
adata: AnnData,
resolution: Optional[float] = None,
random_state: _utils.AnyRandom = 0,
restrict_to: Optional[Tuple[str, Sequence[str]]] = None,
key_added: str = "louvain",
adjacency: Optional[spmatrix] = None,
flavor: Literal["vtraag", "igraph", "rapids"] = "vtraag",
direct... | def louvain(
adata: AnnData,
resolution: Optional[float] = None,
random_state: Optional[Union[int, RandomState]] = 0,
restrict_to: Optional[Tuple[str, Sequence[str]]] = None,
key_added: str = "louvain",
adjacency: Optional[spmatrix] = None,
flavor: Literal["vtraag", "igraph", "rapids"] = "vt... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def score_genes(
adata: AnnData,
gene_list: Sequence[str],
ctrl_size: int = 50,
gene_pool: Optional[Sequence[str]] = None,
n_bins: int = 25,
score_name: str = "score",
random_state: AnyRandom = 0,
copy: bool = False,
use_raw: bool = None,
) -> Optional[AnnData]:
"""\
Score a ... | def score_genes(
adata: AnnData,
gene_list: Sequence[str],
ctrl_size: int = 50,
gene_pool: Optional[Sequence[str]] = None,
n_bins: int = 25,
score_name: str = "score",
random_state: Optional[Union[int, RandomState]] = 0,
copy: bool = False,
use_raw: bool = None,
) -> Optional[AnnData... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def tsne(
adata: AnnData,
n_pcs: Optional[int] = None,
use_rep: Optional[str] = None,
perplexity: Union[float, int] = 30,
early_exaggeration: Union[float, int] = 12,
learning_rate: Union[float, int] = 1000,
random_state: AnyRandom = 0,
use_fast_tsne: bool = True,
n_jobs: Optional[int... | def tsne(
adata: AnnData,
n_pcs: Optional[int] = None,
use_rep: Optional[str] = None,
perplexity: Union[float, int] = 30,
early_exaggeration: Union[float, int] = 12,
learning_rate: Union[float, int] = 1000,
random_state: Union[int, RandomState] = 0,
use_fast_tsne: bool = True,
n_jobs... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def umap(
adata: AnnData,
min_dist: float = 0.5,
spread: float = 1.0,
n_components: int = 2,
maxiter: Optional[int] = None,
alpha: float = 1.0,
gamma: float = 1.0,
negative_sample_rate: int = 5,
init_pos: Union[_InitPos, np.ndarray, None] = "spectral",
random_state: AnyRandom = 0... | def umap(
adata: AnnData,
min_dist: float = 0.5,
spread: float = 1.0,
n_components: int = 2,
maxiter: Optional[int] = None,
alpha: float = 1.0,
gamma: float = 1.0,
negative_sample_rate: int = 5,
init_pos: Union[_InitPos, np.ndarray, None] = "spectral",
random_state: Optional[Unio... | https://github.com/theislab/scanpy/issues/1057 | /home/docs/checkouts/readthedocs.org/user_builds/icb-scanpy/envs/latest/lib/python3.6/site-packages/anndata/_core/anndata.py:21: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import RangeIndex
... | sphinx.errors.SphinxWarning |
def enrich(
container: Iterable[str],
*,
org: str = "hsapiens",
gprofiler_kwargs: Mapping[str, Any] = MappingProxyType({}),
) -> pd.DataFrame:
"""\
Get enrichment for DE results.
This is a thin convenience wrapper around the very useful gprofiler_.
This method dispatches on the first a... | def enrich(
container: Iterable[str],
*,
org: str = "hsapiens",
gprofiler_kwargs: Mapping[str, Any] = MappingProxyType({}),
) -> pd.DataFrame:
"""\
Get enrichment for DE results.
This is a thin convenience wrapper around the very useful gprofiler_.
This method dispatches on the first a... | https://github.com/theislab/scanpy/issues/1043 | AssertionError: query failed with error 500 | AssertionError |
def _enrich_anndata(
adata: AnnData,
group: str,
*,
org: Optional[str] = "hsapiens",
key: str = "rank_genes_groups",
pval_cutoff: float = 0.05,
log2fc_min: Optional[float] = None,
log2fc_max: Optional[float] = None,
gene_symbols: Optional[str] = None,
gprofiler_kwargs: Mapping[st... | def _enrich_anndata(
adata: AnnData,
group: str,
*,
org: Optional[str] = "hsapiens",
key: str = "rank_genes_groups",
pval_cutoff: float = 0.05,
log2fc_min: Optional[float] = None,
log2fc_max: Optional[float] = None,
gene_symbols: Optional[str] = None,
gprofiler_kwargs: Mapping[st... | https://github.com/theislab/scanpy/issues/1043 | AssertionError: query failed with error 500 | AssertionError |
def top_segment_proportions_sparse_csr(data, indptr, ns):
# work around https://github.com/numba/numba/issues/5056
indptr = indptr.astype(np.int64)
ns = np.sort(ns)
maxidx = ns[-1]
sums = np.zeros((indptr.size - 1), dtype=data.dtype)
values = np.zeros((indptr.size - 1, len(ns)), dtype=np.float64... | def top_segment_proportions_sparse_csr(data, indptr, ns):
ns = np.sort(ns)
maxidx = ns[-1]
sums = np.zeros((indptr.size - 1), dtype=data.dtype)
values = np.zeros((indptr.size - 1, len(ns)), dtype=np.float64)
# Just to keep it simple, as a dense matrix
partitioned = np.zeros((indptr.size - 1, max... | https://github.com/theislab/scanpy/issues/978 | ---------------------------------------------------------------------------
TypingError Traceback (most recent call last)
<ipython-input-5-0d8cf2779f18> in <module>
1 adata = sc.datasets.pbmc3k()
----> 2 sc.pp.calculate_qc_metrics(adata, inplace=True)
~/packages/anaconda3/envs/testscanpy1... | TypingError |
def print_versions(*, file=None):
"""Print print versions of imported packages"""
if file is None:
sinfo(dependencies=True)
else:
stdout = sys.stdout
try:
sys.stdout = file
sinfo(dependencies=True)
finally:
sys.stdout = stdout
| def print_versions():
"""\
Versions that might influence the numerical results.
Matplotlib and Seaborn are excluded from this.
"""
from ._settings import settings
modules = ["scanpy"] + _DEPENDENCIES_NUMERICS
print(
" ".join(f"{mod}=={ver}" for mod, ver in _versions_dependencies(mo... | https://github.com/theislab/scanpy/issues/978 | ---------------------------------------------------------------------------
TypingError Traceback (most recent call last)
<ipython-input-5-0d8cf2779f18> in <module>
1 adata = sc.datasets.pbmc3k()
----> 2 sc.pp.calculate_qc_metrics(adata, inplace=True)
~/packages/anaconda3/envs/testscanpy1... | TypingError |
def print_version_and_date(*, file=None):
"""\
Useful for starting a notebook so you see when you started working.
"""
from . import __version__
if file is None:
file = sys.stdout
print(
f"Running Scanpy {__version__}, on {datetime.now():%Y-%m-%d %H:%M}.",
file=file,
... | def print_version_and_date():
"""\
Useful for starting a notebook so you see when you started working.
"""
from . import __version__
from ._settings import settings
print(
f"Running Scanpy {__version__}, on {datetime.now():%Y-%m-%d %H:%M}.",
file=settings.logfile,
)
| https://github.com/theislab/scanpy/issues/978 | ---------------------------------------------------------------------------
TypingError Traceback (most recent call last)
<ipython-input-5-0d8cf2779f18> in <module>
1 adata = sc.datasets.pbmc3k()
----> 2 sc.pp.calculate_qc_metrics(adata, inplace=True)
~/packages/anaconda3/envs/testscanpy1... | TypingError |
def train():
"""Training loop for awd language model."""
ntasgd = False
best_val = float("Inf")
start_train_time = time.time()
parameters = model.collect_params()
param_dict_avg = None
t = 0
avg_trigger = 0
n = 5
valid_losses = []
for epoch in range(args.epochs):
tota... | def train():
"""Training loop for awd language model."""
ntasgd = False
best_val = float("Inf")
start_train_time = time.time()
parameters = model.collect_params()
param_dict_avg = None
t = 0
avg_trigger = 0
n = 5
valid_losses = []
for epoch in range(args.epochs):
tota... | https://github.com/dmlc/gluon-nlp/issues/1055 | Traceback (most recent call last):
File "word_language_model.py", line 468, in <module>
train()
File "word_language_model.py", line 426, in train
trainer.learning_rate))
UnicodeEncodeError: 'ascii' codec can't encode character '\uff0c' in position 62: ordinal not in range(128) | UnicodeEncodeError |
def load_embedding_from_path(args):
"""Load a TokenEmbedding."""
if args.embedding_path.endswith(".bin"):
with utils.print_time("load fastText model."):
model = nlp.model.train.FasttextEmbeddingModel.load_fasttext_format(
args.embedding_path
)
idx_to_token... | def load_embedding_from_path(args):
"""Load a TokenEmbedding."""
if args.embedding_path.endswith(".bin"):
with utils.print_time("load fastText model."):
model = nlp.model.train.FasttextEmbeddingModel.load_fasttext_format(
args.embedding_path
)
idx_to_token... | https://github.com/dmlc/gluon-nlp/issues/905 | Traceback (most recent call last):
File "evaluate_pretrained.py", line 216, in <module>
vocab.set_embedding(token_embedding_)
File "/Users/siyuanl/private/gluon-nlp/src/gluonnlp/vocab/vocab.py", line 412, in set_embedding
new_idx_to_vec[1:, col_start:col_end] = embs[self._idx_to_token[1:]]
File "/Users/siyuanl/private/... | KeyError |
def enforce_max_size(token_embedding, size):
assert token_embedding.idx_to_vec is not None
if size and len(token_embedding.idx_to_token) > size:
assert size > 0
size = size + 1 if token_embedding.unknown_token is not None else size
token_embedding = nlp.embedding.TokenEmbedding(
... | def enforce_max_size(token_embedding, size):
assert token_embedding.idx_to_vec is not None
if size and len(token_embedding.idx_to_token) > size:
assert size > 0
size = size + 1 if token_embedding.unknown_token is not None else size
token_embedding._idx_to_token = token_embedding._idx_to_... | https://github.com/dmlc/gluon-nlp/issues/905 | Traceback (most recent call last):
File "evaluate_pretrained.py", line 216, in <module>
vocab.set_embedding(token_embedding_)
File "/Users/siyuanl/private/gluon-nlp/src/gluonnlp/vocab/vocab.py", line 412, in set_embedding
new_idx_to_vec[1:, col_start:col_end] = embs[self._idx_to_token[1:]]
File "/Users/siyuanl/private/... | KeyError |
def set_embedding(self, *embeddings):
"""Attaches one or more embeddings to the indexed text tokens.
Parameters
----------
embeddings : None or tuple of :class:`gluonnlp.embedding.TokenEmbedding` instances
The embedding to be attached to the indexed tokens. If a tuple of multiple embeddings
... | def set_embedding(self, *embeddings):
"""Attaches one or more embeddings to the indexed text tokens.
Parameters
----------
embeddings : None or tuple of :class:`gluonnlp.embedding.TokenEmbedding` instances
The embedding to be attached to the indexed tokens. If a tuple of multiple embeddings
... | https://github.com/dmlc/gluon-nlp/issues/905 | Traceback (most recent call last):
File "evaluate_pretrained.py", line 216, in <module>
vocab.set_embedding(token_embedding_)
File "/Users/siyuanl/private/gluon-nlp/src/gluonnlp/vocab/vocab.py", line 412, in set_embedding
new_idx_to_vec[1:, col_start:col_end] = embs[self._idx_to_token[1:]]
File "/Users/siyuanl/private/... | KeyError |
def _tokenize_mteval_13a(segment):
r"""
Tokenizes a string following the tokenizer in mteval-v13a.pl.
See https://github.com/moses-smt/mosesdecoder/"
"blob/master/scripts/generic/mteval-v14.pl#L917-L942
Parameters
----------
segment: str
A string to be tokenzied
Returns
... | def _tokenize_mteval_13a(segment):
r"""
Tokenizes a string following the tokenizer in mteval-v13a.pl.
See https://github.com/moses-smt/mosesdecoder/"
"blob/master/scripts/generic/mteval-v14.pl#L917-L942
Parameters
----------
segment: str
A string to be tokenzied
Returns
... | https://github.com/dmlc/gluon-nlp/issues/349 | 2018-09-26 05:38:28,761 - root - Namespace(average_checkpoint=False, average_start=5, batch_size=2700, beam_size=4, bleu='13a', bucket_ratio=0.0, bucket_scheme='exp', dataset='WMT2$
14BPE', dropout=0.1, epochs=30, epsilon=0.1, full=False, gpus='0,1,2,3,4,5,6,7', hidden_size=2048, log_interval=10, lp_alpha=0.6, lp_k=5, ... | UnicodeDecodeError |
def compute_bleu(
reference_corpus_list,
translation_corpus,
tokenized=True,
tokenizer="13a",
max_n=4,
smooth=False,
lower_case=False,
bpe=False,
split_compound_word=False,
):
r"""Compute bleu score of translation against references.
Parameters
----------
reference_c... | def compute_bleu(
reference_corpus_list,
translation_corpus,
tokenized=True,
tokenizer="13a",
max_n=4,
smooth=False,
lower_case=False,
bpe=False,
split_compound_word=False,
):
r"""Compute bleu score of translation against references.
Parameters
----------
reference_c... | https://github.com/dmlc/gluon-nlp/issues/349 | 2018-09-26 05:38:28,761 - root - Namespace(average_checkpoint=False, average_start=5, batch_size=2700, beam_size=4, bleu='13a', bucket_ratio=0.0, bucket_scheme='exp', dataset='WMT2$
14BPE', dropout=0.1, epochs=30, epsilon=0.1, full=False, gpus='0,1,2,3,4,5,6,7', hidden_size=2048, log_interval=10, lp_alpha=0.6, lp_k=5, ... | UnicodeDecodeError |
def load_cached_dataset(prefix):
cached_file_path = os.path.join(_C.CACHE_PATH, prefix + ".npz")
if os.path.exists(cached_file_path):
print("Load cached data from {}".format(cached_file_path))
dat = np.load(cached_file_path, encoding="latin1")
return ArrayDataset(np.array(dat["src_data"]... | def load_cached_dataset(prefix):
cached_file_path = os.path.join(_C.CACHE_PATH, prefix + ".npz")
if os.path.exists(cached_file_path):
print("Load cached data from {}".format(cached_file_path))
dat = np.load(cached_file_path)
return ArrayDataset(np.array(dat["src_data"]), np.array(dat["tg... | https://github.com/dmlc/gluon-nlp/issues/349 | 2018-09-26 05:38:28,761 - root - Namespace(average_checkpoint=False, average_start=5, batch_size=2700, beam_size=4, bleu='13a', bucket_ratio=0.0, bucket_scheme='exp', dataset='WMT2$
14BPE', dropout=0.1, epochs=30, epsilon=0.1, full=False, gpus='0,1,2,3,4,5,6,7', hidden_size=2048, log_interval=10, lp_alpha=0.6, lp_k=5, ... | UnicodeDecodeError |
def remove_user(self, group_item, user_id):
self._remove_user(group_item, user_id)
try:
users = group_item.users
for user in users:
if user.id == user_id:
users.remove(user)
break
except UnpopulatedPropertyError:
# If we aren't populated, d... | def remove_user(self, group_item, user_id):
self._remove_user(group_item, user_id)
try:
user_set = group_item.users
for user in user_set:
if user.id == user_id:
user_set.remove(user)
break
except UnpopulatedPropertyError:
# If we aren't pop... | https://github.com/tableau/server-client-python/issues/162 | Traceback (most recent call last):
File "create_group.py", line 50, in <module>
main()
File "create_group.py", line 45, in main
server.groups.add_user(group, new_user._id)
File "/Library/Python/2.7/site-packages/tableauserverclient/server/endpoint/groups_endpoint.py", line 70, in add_user
user_set.add(new_user)
Attribu... | AttributeError |
def add_user(self, group_item, user_id):
new_user = self._add_user(group_item, user_id)
try:
users = group_item.users
users.append(new_user)
group_item._set_users(users)
except UnpopulatedPropertyError:
# If we aren't populated, do nothing to the user list
pass
lo... | def add_user(self, group_item, user_id):
new_user = self._add_user(group_item, user_id)
try:
user_set = group_item.users
user_set.add(new_user)
group_item._set_users(user_set)
except UnpopulatedPropertyError:
# If we aren't populated, do nothing to the user list
pass
... | https://github.com/tableau/server-client-python/issues/162 | Traceback (most recent call last):
File "create_group.py", line 50, in <module>
main()
File "create_group.py", line 45, in main
server.groups.add_user(group, new_user._id)
File "/Library/Python/2.7/site-packages/tableauserverclient/server/endpoint/groups_endpoint.py", line 70, in add_user
user_set.add(new_user)
Attribu... | AttributeError |
def random_affine_generator(
batch_size: int,
height: int,
width: int,
degrees: torch.Tensor,
translate: Optional[torch.Tensor] = None,
scale: Optional[torch.Tensor] = None,
shear: Optional[torch.Tensor] = None,
same_on_batch: bool = False,
) -> Dict[str, torch.Tensor]:
r"""Get param... | def random_affine_generator(
batch_size: int,
height: int,
width: int,
degrees: torch.Tensor,
translate: Optional[torch.Tensor] = None,
scale: Optional[torch.Tensor] = None,
shear: Optional[torch.Tensor] = None,
same_on_batch: bool = False,
) -> Dict[str, torch.Tensor]:
r"""Get param... | https://github.com/kornia/kornia/issues/785 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-30-cf0a915755df> in <module>
----> 1 out = transform_fcn(x[0])
~/default-env/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, ... | TypeError |
def _fetchable_partitions(self):
fetchable = self._subscriptions.fetchable_partitions()
# do not fetch a partition if we have a pending fetch response to process
current = self._next_partition_records
pending = copy.copy(self._completed_fetches)
if current:
fetchable.discard(current.topic_pa... | def _fetchable_partitions(self):
fetchable = self._subscriptions.fetchable_partitions()
if self._next_partition_records:
fetchable.discard(self._next_partition_records.topic_partition)
for fetch in self._completed_fetches:
fetchable.discard(fetch.topic_partition)
return fetchable
| https://github.com/dpkp/kafka-python/issues/1399 | Traceback (most recent call last):
[...]
File "[...]/kafka/consumer/group.py", line 603, in poll
records = self._poll_once(remaining, max_records)
File "[...]/kafka/consumer/group.py", line 643, in _poll_once
self._fetcher.send_fetches()
File "[...]/kafka/consumer/fetcher.py", line 131, in send_fetches
for node_id, req... | RuntimeError |
def _poll(self, timeout, sleep=True):
# select on reads across all connected sockets, blocking up to timeout
assert self.in_flight_request_count() > 0 or self._connecting or sleep
responses = []
processed = set()
start_select = time.time()
ready = self._selector.select(timeout)
end_select ... | def _poll(self, timeout, sleep=True):
# select on reads across all connected sockets, blocking up to timeout
assert self.in_flight_request_count() > 0 or self._connecting or sleep
responses = []
processed = set()
start_select = time.time()
ready = self._selector.select(timeout)
end_select ... | https://github.com/dpkp/kafka-python/issues/791 | Traceback (most recent call last):
File "python/server.py", line 84, in init
File "/usr/local/lib/python2.7/site-packages/six.py", line 558, in next
return type(self).__next__(self)
File "/usr/local/lib/python2.7/site-packages/kafka/consumer/group.py", line 863, in __next__
File "/usr/local/lib/python2.7/site-packages/... | socket.error |
def get_commands_from_metadata(image_layer):
"""Given the image layer object, get the list of command objects that
created the layer. Return an empty list of we can't do that"""
# set up notice origin for the layer
origin_layer = "Layer {}".format(image_layer.layer_index)
# check if there is a key c... | def get_commands_from_metadata(image_layer):
"""Given the image layer object, get the list of command objects that
created the layer. Return an empty list of we can't do that"""
# set up notice origin for the layer
origin_layer = "Layer {}".format(image_layer.layer_index)
# check if there is a key c... | https://github.com/tern-tools/tern/issues/838 | Traceback (most recent call last):
File "/usr/local/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/tern/__main__.py", line 192, in main
do_main(args)
File "/usr/local/lib/python3.7/dist-packages/tern/__main__.py", line 95, in do_main
crun.execute_image(args)
File "/usr/loca... | UnboundLocalError |
def extract_image(args):
"""The image can either be downloaded from a container registry or provided
as an image tarball. Extract the image into a working directory accordingly
Return an image name and tag and an image digest if it exists"""
if args.docker_image:
# extract the docker image
... | def extract_image(args):
"""The image can either be downloaded from a container registry or provided
as an image tarball. Extract the image into a working directory accordingly
Return an image name and tag and an image digest if it exists"""
if args.docker_image:
# extract the docker image
... | https://github.com/tern-tools/tern/issues/874 | { memoryInfo:
'{"rss":39120896,"heapTotal":9961472,"heapUsed":5357888,"external":8962}',
errorCode: 1,
errorSignal: null,
errorMessage:
'Traceback (most recent call last):\n File "/usr/local/bin/tern", line 8, in <module>\n sys.exit(main())\n File "/usr/local/lib/python3.7/dist-packages/tern/__main__.py", line 192... | exception |
def execute_image(args):
"""Execution path for container images"""
logger.debug("Starting analysis...")
image_string = extract_image(args)
# If the image has been extracted, load the metadata
if image_string:
full_image = cimage.load_full_image(image_string)
# check if the image was ... | def execute_image(args):
"""Execution path for container images"""
logger.debug("Starting analysis...")
image_string = extract_image(args)
# If the image has been extracted, load the metadata
if image_string:
full_image = cimage.load_full_image(image_string)
# check if the image was ... | https://github.com/tern-tools/tern/issues/828 | $ tern report -o output.txt -i fossid-nginx:2020.2
2020-11-11 08:35:17,611 - DEBUG - __main__ - Starting...
2020-11-11 08:35:17,611 - DEBUG - prep - Setting up...
2020-11-11 08:35:18,060 - DEBUG - run - Starting analysis...
2020-11-11 08:35:18,154 - DEBUG - docker_api - Checking if image "fossid-nginx:2020.2" is availa... | AttributeError |
def pull_image(image_tag_string, client):
"""Pull an image from a container registry using Docker
Note: this function uses the Docker API to pull from a container
registry and is not responsible for configuring what registry to use"""
logger.debug('Attempting to pull image "%s"', image_tag_string)
t... | def pull_image(image_tag_string, client):
"""Pull an image from a container registry using Docker
Note: this function uses the Docker API to pull from a container
registry and is not responsible for configuring what registry to use"""
logger.debug('Attempting to pull image "%s"', image_tag_string)
t... | https://github.com/tern-tools/tern/issues/828 | $ tern report -o output.txt -i fossid-nginx:2020.2
2020-11-11 08:35:17,611 - DEBUG - __main__ - Starting...
2020-11-11 08:35:17,611 - DEBUG - prep - Setting up...
2020-11-11 08:35:18,060 - DEBUG - run - Starting analysis...
2020-11-11 08:35:18,154 - DEBUG - docker_api - Checking if image "fossid-nginx:2020.2" is availa... | AttributeError |
def dump_docker_image(image_tag):
"""Given an image and tag or image and digest, use the Docker API to get
a container image representation into the working directory"""
image_metadata = None
# open up a client first
# if this fails we cannot proceed further so we will exit
client = check_docker... | def dump_docker_image(image_tag):
"""Given an image and tag or image and digest, use the Docker API to get
a container image representation into the working directory"""
image_metadata = None
# open up a client first
# if this fails we cannot proceed further so we will exit
client = check_docker... | https://github.com/tern-tools/tern/issues/828 | $ tern report -o output.txt -i fossid-nginx:2020.2
2020-11-11 08:35:17,611 - DEBUG - __main__ - Starting...
2020-11-11 08:35:17,611 - DEBUG - prep - Setting up...
2020-11-11 08:35:18,060 - DEBUG - run - Starting analysis...
2020-11-11 08:35:18,154 - DEBUG - docker_api - Checking if image "fossid-nginx:2020.2" is availa... | AttributeError |
def load_full_image(image_tag_string):
"""Create image object from image name and tag and return the object"""
test_image = DockerImage(image_tag_string)
failure_origin = formats.image_load_failure.format(testimage=test_image.repotag)
try:
test_image.load_image()
except (
NameError,
... | def load_full_image(image_tag_string, digest_string):
"""Create image object from image name and tag and return the object"""
test_image = DockerImage(image_tag_string, digest_string)
failure_origin = formats.image_load_failure.format(testimage=test_image.repotag)
try:
test_image.load_image()
... | https://github.com/tern-tools/tern/issues/797 | tevoinea@tevoinea-Virtual-Machine:~/tern$ docker run --privileged --device /dev/fuse -v /var/run/docker.sock:/var/run/docker.sock --rm ternd report -f json -i ubuntu@sha256:2b90cad5ded7946db07a28252618b9c8b7f4f103fc39266bcc795719d1362d40 > output.json
2020-09-03 21:00:57,783 - DEBUG - __main__ - Starting...
2020-09-03 ... | subprocess.CalledProcessError |
def extract_image(args):
"""The image can either be downloaded from a container registry or provided
as an image tarball. Extract the image into a working directory accordingly
Return an image name and tag and an image digest if it exists"""
if args.docker_image:
# extract the docker image
... | def extract_image(args):
"""The image can either be downloaded from a container registry or provided
as an image tarball. Extract the image into a working directory accordingly
Return an image name and tag and an image digest if it exists"""
if args.docker_image:
# extract the docker image
... | https://github.com/tern-tools/tern/issues/797 | tevoinea@tevoinea-Virtual-Machine:~/tern$ docker run --privileged --device /dev/fuse -v /var/run/docker.sock:/var/run/docker.sock --rm ternd report -f json -i ubuntu@sha256:2b90cad5ded7946db07a28252618b9c8b7f4f103fc39266bcc795719d1362d40 > output.json
2020-09-03 21:00:57,783 - DEBUG - __main__ - Starting...
2020-09-03 ... | subprocess.CalledProcessError |
def execute_image(args):
"""Execution path for container images"""
logger.debug("Starting analysis...")
image_string = extract_image(args)
# If the image has been extracted, load the metadata
if image_string:
full_image = cimage.load_full_image(image_string)
# check if the image was ... | def execute_image(args):
"""Execution path for container images"""
logger.debug("Starting analysis...")
image_string, image_digest = extract_image(args)
# If the image has been extracted, load the metadata
if image_string:
full_image = cimage.load_full_image(image_string, image_digest)
... | https://github.com/tern-tools/tern/issues/797 | tevoinea@tevoinea-Virtual-Machine:~/tern$ docker run --privileged --device /dev/fuse -v /var/run/docker.sock:/var/run/docker.sock --rm ternd report -f json -i ubuntu@sha256:2b90cad5ded7946db07a28252618b9c8b7f4f103fc39266bcc795719d1362d40 > output.json
2020-09-03 21:00:57,783 - DEBUG - __main__ - Starting...
2020-09-03 ... | subprocess.CalledProcessError |
def full_image_analysis(dfile, redo, driver, keep, extension):
"""This subroutine is executed when a Dockerfile is successfully built"""
image_list = []
# attempt to load the built image metadata
full_image = cimage.load_full_image(dfile)
if full_image.origins.is_empty():
# Add an image orig... | def full_image_analysis(dfile, redo, driver, keep, extension):
"""This subroutine is executed when a Dockerfile is successfully built"""
image_list = []
# attempt to load the built image metadata
full_image = cimage.load_full_image(dfile, "")
if full_image.origins.is_empty():
# Add an image ... | https://github.com/tern-tools/tern/issues/797 | tevoinea@tevoinea-Virtual-Machine:~/tern$ docker run --privileged --device /dev/fuse -v /var/run/docker.sock:/var/run/docker.sock --rm ternd report -f json -i ubuntu@sha256:2b90cad5ded7946db07a28252618b9c8b7f4f103fc39266bcc795719d1362d40 > output.json
2020-09-03 21:00:57,783 - DEBUG - __main__ - Starting...
2020-09-03 ... | subprocess.CalledProcessError |
def get_commands_from_history(image_layer):
"""Given the image layer object and the shell, get the list of command
objects that created the layer"""
# set up notice origin for the layer
origin_layer = "Layer: " + image_layer.fs_hash[:10]
if image_layer.created_by:
instruction = created_to_in... | def get_commands_from_history(image_layer):
"""Given the image layer object and the shell, get the list of command
objects that created the layer"""
# set up notice origin for the layer
origin_layer = "Layer: " + image_layer.fs_hash[:10]
if image_layer.created_by:
instruction = created_to_in... | https://github.com/tern-tools/tern/issues/636 | /* snip */
2020-04-14 20:17:02,098 - DEBUG - common - Reading files in filesystem...
Traceback (most recent call last):
File "/usr/local/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/tern/__main__.py", line 201, in main
do_main(args)
File "/usr/local/lib/python3.8/dist-pac... | UnboundLocalError |
def check_git_src(dockerfile_path):
"""Given the src_path and the dockerfile path, return the git
repository name and sha information in the format of string.
Currently we only consider the following situation:
- target_git_project
- dir1
- dir2/dockerfile
So we only use dockerfile_p... | def check_git_src(dockerfile_path):
"""Given the src_path and the dockerfile path, return the git
repository name and sha information in the format of string.
Currently we only consider the following situation:
- target_git_project
- dir1
- dir2/dockerfile
So we only use dockerfile_p... | https://github.com/tern-tools/tern/issues/642 | Traceback (most recent call last):
File "/home/rjudge/ternenv/bin/tern", line 10, in <module>
sys.exit(main())
File "/home/rjudge/ternenv/tern/tern/__main__.py", line 201, in main
do_main(args)
File "/home/rjudge/ternenv/tern/tern/__main__.py", line 90, in do_main
run.execute_dockerfile(args)
File "/home/rjudge/ternenv... | FileNotFoundError |
def get_git_url(dockerfile_path):
"""Given a dockerfile_path, return url of git project which contains
the dockerfile in a form of list."""
# get the path of the folder containing the dockerfile
dockerfile_folder_path = os.path.dirname(os.path.abspath(dockerfile_path))
command = ["git", "remote", "-... | def get_git_url(dockerfile_path):
"""Given a dockerfile_path, return url of git project which contains
the dockerfile in a form of list."""
# get the path of the folder containing the dockerfile
dockerfile_folder_path = os.path.dirname(dockerfile_path)
command = ["git", "remote", "-v"]
try:
... | https://github.com/tern-tools/tern/issues/642 | Traceback (most recent call last):
File "/home/rjudge/ternenv/bin/tern", line 10, in <module>
sys.exit(main())
File "/home/rjudge/ternenv/tern/tern/__main__.py", line 201, in main
do_main(args)
File "/home/rjudge/ternenv/tern/tern/__main__.py", line 90, in do_main
run.execute_dockerfile(args)
File "/home/rjudge/ternenv... | FileNotFoundError |
def get_git_toplevel(path):
"""Given a path, return the absolute path to the top level directory if it
is in a git repository. Empty string will be returned if not.
Path should be a path to a directory not to a file."""
command = ["git", "rev-parse", "--show-toplevel"]
path_to_toplevel = ""
try:... | def get_git_toplevel(path):
"""Given a path, return the absolute path to the top level directory if it
is in a git repository. Empty string will be returned if not.
Path should be a path to a directory not to a file."""
command = ["git", "rev-parse", "--show-toplevel"]
path_to_toplevel = ""
try:... | https://github.com/tern-tools/tern/issues/642 | Traceback (most recent call last):
File "/home/rjudge/ternenv/bin/tern", line 10, in <module>
sys.exit(main())
File "/home/rjudge/ternenv/tern/tern/__main__.py", line 201, in main
do_main(args)
File "/home/rjudge/ternenv/tern/tern/__main__.py", line 90, in do_main
run.execute_dockerfile(args)
File "/home/rjudge/ternenv... | FileNotFoundError |
def close_client():
"""End docker interactions by closing the client. This is meant to be
used after analysis is done"""
try:
client.close()
except (AttributeError, requests.exceptions.ConnectionError):
# it should either already be closed, no socker is in use,
# or docker is not... | def close_client():
"""End docker interactions by closing the client. This is meant to be
used after analysis is done"""
try:
client.close()
except requests.exceptions.ConnectionError:
# it should either already be closed or docker is not setup
# either way, the socket is closed
... | https://github.com/tern-tools/tern/issues/628 | 2020-04-08 09:28:59,030 - DEBUG - run - Teardown...
Traceback (most recent call last):
File "/home/rjudge/ternenv/bin/tern", line 10, in <module>
sys.exit(main())
File "/home/rjudge/ternenv/tern/tern/__main__.py", line 201, in main
do_main(args)
File "/home/rjudge/ternenv/tern/tern/__main__.py", line 113, in do_main
ru... | AttributeError |
def pull_image(image_tag_string):
"""Try to pull an image from Dockerhub"""
logger.debug('Attempting to pull image "%s"', image_tag_string)
try:
image = client.images.pull(image_tag_string)
logger.debug('Image "%s" downloaded', image_tag_string)
return image
except (docker.errors... | def pull_image(image_tag_string):
"""Try to pull an image from Dockerhub"""
logger.debug('Attempting to pull image "%s"', image_tag_string)
try:
image = client.images.pull(image_tag_string)
logger.debug('Image "%s" downloaded', image_tag_string)
return image
except docker.errors.... | https://github.com/tern-tools/tern/issues/610 | 2020-03-26 15:05:54,287 - DEBUG - container - Checking if image "photon:broken" is available on disk...
2020-03-26 15:05:54,290 - DEBUG - container - Attempting to pull image "photon:broken"
Traceback (most recent call last):
File "/home/rjudge/ternenv/lib/python3.6/site-packages/docker/api/client.py", line 261, in _ra... | requests.exceptions.HTTPError |
def prep_rootfs(rootfs_dir):
"""Mount required filesystems in the rootfs directory"""
rootfs_path = os.path.abspath(rootfs_dir)
proc_path = os.path.join(rootfs_path, "proc")
sys_path = os.path.join(rootfs_path, "sys")
dev_path = os.path.join(rootfs_path, "dev")
if not os.path.exists(proc_path):
... | def prep_rootfs(rootfs_dir):
"""Mount required filesystems in the rootfs directory"""
rootfs_path = os.path.abspath(rootfs_dir)
try:
root_command(mount_proc, os.path.join(rootfs_path, "proc"))
root_command(mount_sys, os.path.join(rootfs_path, "sys"))
root_command(mount_dev, os.path.j... | https://github.com/tern-tools/tern/issues/538 | 2020-02-16 17:00:00,058 - ERROR - rootfs - b'mount: /home/oc37ejuc/.tern/temp/mergedir/proc: mount point does not exist.\n'
Traceback (most recent call last):
File "/home/oc37ejuc/ternenv/bin/tern", line 11, in <module>
sys.exit(main())
File "/home/oc37ejuc/ternenv/lib/python3.6/site-packages/tern/__main__.py", line 17... | subprocess.CalledProcessError |
def do_main(args):
"""Execute according to subcommands"""
# set bind mount location if working in a container
rootfs.set_mount_dir(args.bind_mount)
# create working directory
create_top_dir()
if args.log_stream:
# set up console logs
global logger
global console
l... | def do_main(args):
"""Execute according to subcommands"""
# create working directory
create_top_dir()
if args.log_stream:
# set up console logs
global logger
global console
logger.addHandler(console)
logger.debug("Starting...")
if args.clear_cache:
logger.... | https://github.com/tern-tools/tern/issues/498 | docker build -t ternd .
./docker_run.sh workdir ternd "report -i golang:alpine"
-------------------------OUTPUT-------------------------
Traceback (most recent call last):
File "/usr/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/tern/__main__.py", line 167, in main
do_main(args)... | subprocess.CalledProcessError |
def main():
parser = argparse.ArgumentParser(
formatter_class=argparse.RawTextHelpFormatter,
prog="Tern",
description="""
Tern is a container image component curation tool. Tern retrieves
information about packages that are installed in a container image.
Learn more at https://gi... | def main():
parser = argparse.ArgumentParser(
formatter_class=argparse.RawTextHelpFormatter,
prog="Tern",
description="""
Tern is a container image component curation tool. Tern retrieves
information about packages that are installed in a container image.
Learn more at https://gi... | https://github.com/tern-tools/tern/issues/498 | docker build -t ternd .
./docker_run.sh workdir ternd "report -i golang:alpine"
-------------------------OUTPUT-------------------------
Traceback (most recent call last):
File "/usr/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/tern/__main__.py", line 167, in main
do_main(args)... | subprocess.CalledProcessError |
def execute_docker_image(args):
"""Execution path if given a Docker image"""
logger.debug("Setting up...")
image_string = args.docker_image
if not args.raw_image:
# don't check docker daemon for raw images
container.check_docker_setup()
else:
image_string = args.raw_image
... | def execute_docker_image(args):
"""Execution path if given a Docker image"""
logger.debug("Setting up...")
image_string = args.docker_image
if not args.raw_image:
# don't check docker daemon for raw images
container.check_docker_setup()
else:
image_string = args.raw_image
... | https://github.com/tern-tools/tern/issues/498 | docker build -t ternd .
./docker_run.sh workdir ternd "report -i golang:alpine"
-------------------------OUTPUT-------------------------
Traceback (most recent call last):
File "/usr/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/tern/__main__.py", line 167, in main
do_main(args)... | subprocess.CalledProcessError |
def execute_dockerfile(args):
"""Execution path if given a dockerfile"""
container.check_docker_setup()
logger.debug("Setting up...")
report.setup(dockerfile=args.dockerfile)
# attempt to build the image
logger.debug("Building Docker image...")
# placeholder to check if we can analyze the fu... | def execute_dockerfile(args):
"""Execution path if given a dockerfile"""
container.check_docker_setup()
logger.debug("Setting up...")
report.setup(dockerfile=args.dockerfile)
# attempt to build the image
logger.debug("Building Docker image...")
# placeholder to check if we can analyze the fu... | https://github.com/tern-tools/tern/issues/498 | docker build -t ternd .
./docker_run.sh workdir ternd "report -i golang:alpine"
-------------------------OUTPUT-------------------------
Traceback (most recent call last):
File "/usr/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/tern/__main__.py", line 167, in main
do_main(args)... | subprocess.CalledProcessError |
def clean_working_dir():
"""Clean up the working directory
If bind_mount is true then leave the upper level directory"""
path = rootfs.get_working_dir()
if os.path.exists(path):
shutil.rmtree(path)
| def clean_working_dir(bind_mount):
"""Clean up the working directory
If bind_mount is true then leave the upper level directory"""
path = rootfs.get_working_dir()
if os.path.exists(path):
if bind_mount:
# clean whatever is in temp_folder without removing the folder
inodes... | https://github.com/tern-tools/tern/issues/498 | docker build -t ternd .
./docker_run.sh workdir ternd "report -i golang:alpine"
-------------------------OUTPUT-------------------------
Traceback (most recent call last):
File "/usr/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/tern/__main__.py", line 167, in main
do_main(args)... | subprocess.CalledProcessError |
def load():
"""Load the cache"""
global cache
# Do not try to populate the cache if there is no cache available
if not os.path.exists(os.path.join(rootfs.mount_dir, cache_file)):
return
with open(os.path.join(rootfs.mount_dir, cache_file)) as f:
cache = yaml.safe_load(f)
| def load():
"""Load the cache"""
global cache
# Do not try to populate the cache if there is no cache available
if not os.path.exists(os.path.join(get_top_dir(), cache_file)):
return
with open(os.path.join(get_top_dir(), cache_file)) as f:
cache = yaml.safe_load(f)
| https://github.com/tern-tools/tern/issues/498 | docker build -t ternd .
./docker_run.sh workdir ternd "report -i golang:alpine"
-------------------------OUTPUT-------------------------
Traceback (most recent call last):
File "/usr/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/tern/__main__.py", line 167, in main
do_main(args)... | subprocess.CalledProcessError |
def save():
"""Save the cache to the cache file"""
with open(os.path.join(rootfs.mount_dir, cache_file), "w") as f:
yaml.dump(cache, f, default_flow_style=False)
| def save():
"""Save the cache to the cache file"""
with open(os.path.join(get_top_dir(), cache_file), "w") as f:
yaml.dump(cache, f, default_flow_style=False)
| https://github.com/tern-tools/tern/issues/498 | docker build -t ternd .
./docker_run.sh workdir ternd "report -i golang:alpine"
-------------------------OUTPUT-------------------------
Traceback (most recent call last):
File "/usr/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/tern/__main__.py", line 167, in main
do_main(args)... | subprocess.CalledProcessError |
def clear():
"""Empty the cache - don't use unless you really have to"""
global cache
cache = {}
with open(os.path.join(rootfs.mount_dir, cache_file), "w") as f:
yaml.dump(cache, f, default_flow_style=False)
| def clear():
"""Empty the cache - don't use unless you really have to"""
global cache
cache = {}
with open(os.path.join(get_top_dir(), cache_file), "w") as f:
yaml.dump(cache, f, default_flow_style=False)
| https://github.com/tern-tools/tern/issues/498 | docker build -t ternd .
./docker_run.sh workdir ternd "report -i golang:alpine"
-------------------------OUTPUT-------------------------
Traceback (most recent call last):
File "/usr/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/tern/__main__.py", line 167, in main
do_main(args)... | subprocess.CalledProcessError |
def get_working_dir():
"""General purpose utility to return the absolute path of the working
directory"""
return os.path.join(mount_dir, constants.temp_folder)
| def get_working_dir():
"""General purpose utility to return the absolute path of the working
directory"""
return os.path.join(general.get_top_dir(), constants.temp_folder)
| https://github.com/tern-tools/tern/issues/498 | docker build -t ternd .
./docker_run.sh workdir ternd "report -i golang:alpine"
-------------------------OUTPUT-------------------------
Traceback (most recent call last):
File "/usr/bin/tern", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/tern/__main__.py", line 167, in main
do_main(args)... | subprocess.CalledProcessError |
def start_container(image_tag_string):
"""Start the test container in detach state"""
try:
client.containers.run(image_tag_string, name=container, detach=True)
except requests.exceptions.HTTPError:
# container may already be running
pass
try:
remove_container()
cl... | def start_container(image_tag_string):
"""Start the test container in detach state"""
try:
client.containers.run(image_tag_string, name=container, detach=True)
except HTTPError:
# container may already be running
pass
try:
remove_container()
client.containers.run(... | https://github.com/tern-tools/tern/issues/207 | (ternenv) browne@ubuntu18:~/ternenv/tern$ tern -l report -f output.txt -i debian:buster
2019-04-05 00:27:08,017 - DEBUG - __main__ - Starting...
2019-04-05 00:27:08,018 - DEBUG - report - Setting up...
2019-04-05 00:27:08,018 - DEBUG - container - Checking if image "debian:buster" is available on disk...
Traceback (mos... | FileNotFoundError |
def execute_docker_image(args):
"""Execution path if given a Docker image"""
logger.debug("Setting up...")
image_string = args.docker_image
if not args.raw_image:
# don't check docker daemon for raw images
container.check_docker_setup()
else:
image_string = args.raw_image
... | def execute_docker_image(args):
"""Execution path if given a Docker image"""
logger.debug("Setting up...")
image_string = args.docker_image
if not args.raw_image:
# don't check docker daemon for raw images
check_docker_daemon()
else:
image_string = args.raw_image
report.s... | https://github.com/tern-tools/tern/issues/207 | (ternenv) browne@ubuntu18:~/ternenv/tern$ tern -l report -f output.txt -i debian:buster
2019-04-05 00:27:08,017 - DEBUG - __main__ - Starting...
2019-04-05 00:27:08,018 - DEBUG - report - Setting up...
2019-04-05 00:27:08,018 - DEBUG - container - Checking if image "debian:buster" is available on disk...
Traceback (mos... | FileNotFoundError |
def execute_dockerfile(args):
"""Execution path if given a dockerfile"""
container.check_docker_setup()
logger.debug("Setting up...")
report.setup(dockerfile=args.dockerfile)
# attempt to build the image
logger.debug("Building Docker image...")
# placeholder to check if we can analyze the fu... | def execute_dockerfile(args):
"""Execution path if given a dockerfile"""
check_docker_daemon()
logger.debug("Setting up...")
report.setup(dockerfile=args.dockerfile)
# attempt to build the image
logger.debug("Building Docker image...")
# placeholder to check if we can analyze the full image
... | https://github.com/tern-tools/tern/issues/207 | (ternenv) browne@ubuntu18:~/ternenv/tern$ tern -l report -f output.txt -i debian:buster
2019-04-05 00:27:08,017 - DEBUG - __main__ - Starting...
2019-04-05 00:27:08,018 - DEBUG - report - Setting up...
2019-04-05 00:27:08,018 - DEBUG - container - Checking if image "debian:buster" is available on disk...
Traceback (mos... | FileNotFoundError |
def root_command(command, *extra):
"""Invoke a shell command as root or using sudo. The command is a
list of shell command words"""
full_cmd = []
sudo = True
if os.getuid() == 0:
sudo = False
if sudo:
full_cmd.append("sudo")
full_cmd.extend(command)
for arg in extra:
... | def root_command(command, *extra):
"""Invoke a shell command as root or using sudo. The command is a
list of shell command words"""
full_cmd = []
sudo = True
if os.getuid() == 0:
sudo = False
if sudo:
full_cmd.append("sudo")
full_cmd.extend(command)
for arg in extra:
... | https://github.com/tern-tools/tern/issues/433 | $ python
Python 3.7.3 (default, Apr 3 2019, 19:16:38)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
from tern.classes.docker_image import DockerImage
d = DockerImage('ubuntu:14.04')
d.load_image()
Traceback (most recent call ... | PermissionError |
def extract_layer_tar(layer_tar_path, directory_path):
"""Assuming all the metadata for an image has been extracted into the
temp folder, extract the tarfile into the required directory"""
os.makedirs(directory_path)
with open(os.devnull, "w") as test:
result = subprocess.call(
["tar... | def extract_layer_tar(layer_tar_path, directory_path):
"""Assuming all the metadata for an image has been extracted into the
temp folder, extract the tarfile into the required directory"""
with tarfile.open(layer_tar_path) as tar:
tar.extractall(directory_path)
| https://github.com/tern-tools/tern/issues/433 | $ python
Python 3.7.3 (default, Apr 3 2019, 19:16:38)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
from tern.classes.docker_image import DockerImage
d = DockerImage('ubuntu:14.04')
d.load_image()
Traceback (most recent call ... | PermissionError |
def analyze_docker_image(image_obj, redo=False, dockerfile=False):
"""Given a DockerImage object, for each layer, retrieve the packages, first
looking up in cache and if not there then looking up in the command
library. For looking up in command library first mount the filesystem
and then look up the co... | def analyze_docker_image(image_obj, redo=False, dockerfile=False):
"""Given a DockerImage object, for each layer, retrieve the packages, first
looking up in cache and if not there then looking up in the command
library. For looking up in command library first mount the filesystem
and then look up the co... | https://github.com/tern-tools/tern/issues/142 | 2018-12-12 17:09:39,537 - DEBUG - tern - Starting...
2018-12-12 17:09:39,538 - DEBUG - container - Running command: docker ps
2018-12-12 17:09:39,574 - DEBUG - report - Setting up...
2018-12-12 17:09:39,575 - DEBUG - container - Running command: docker images clearlinux/stacks-dlrs-mkl:latest
2018-12-12 17:09:39,630 - ... | AttributeError |
def analyze_docker_image(image_obj, dockerfile=False):
"""Given a DockerImage object, for each layer, retrieve the packages, first
looking up in cache and if not there then looking up in the command
library. For looking up in command library first mount the filesystem
and then look up the command librar... | def analyze_docker_image(image_obj, dockerfile=False):
"""Given a DockerImage object, for each layer, retrieve the packages, first
looking up in cache and if not there then looking up in the command
library. For looking up in command library first mount the filesystem
and then look up the command librar... | https://github.com/tern-tools/tern/issues/121 | 2018-11-07 12:31:41,261 - DEBUG - tern - Starting...
2018-11-07 12:31:41,268 - DEBUG - container - Running command: docker ps
2018-11-07 12:31:41,344 - DEBUG - report - Setting up...
2018-11-07 12:31:45,410 - DEBUG - container - Running command: docker images docker.io/hello-world:latest
2018-11-07 12:31:45,478 - DEBUG... | KeyError |
def execute_docker_image(args):
"""Execution path if given a Docker image"""
check_docker_daemon()
logger.debug("Setting up...")
setup(image_tag_string=args.docker_image)
# attempt to get built image metadata
full_image = load_full_image(args.docker_image)
if full_image.origins.is_empty():
... | def execute_docker_image(args):
"""Execution path if given a Docker image"""
check_docker_daemon()
logger.debug("Setting up...")
setup(image_tag_string=args.docker_image)
# attempt to get built image metadata
full_image = load_full_image(args.docker_image)
if full_image.origins.is_empty():
... | https://github.com/tern-tools/tern/issues/120 | 2018-11-07 20:44:35,853 - DEBUG - rootfs - Running command: sudo rm -rf temp/mergedir
Traceback (most recent call last):
File "./tern", line 91, in
main(args)
File "./tern", line 47, in main
report.execute_docker_image(args)
File "/home/armijn/git/tern/report/report.py", line 402, in execute_docker_image
teardown()
Fil... | subprocess.CalledProcessError |
def to_dict(self):
layer_dict = {}
pkg_list = []
for pkg in self.__packages:
pkg_list.append(pkg.to_dict())
layer_dict.update(
{
self.fs_hash: {
"packages": pkg_list,
"tar_file": self.tar_file,
"created_by": self.created_by,
... | def to_dict(self):
layer_dict = {}
pkg_list = []
for pkg in self.__packages:
pkg_list.append(pkg.to_dict())
layer_dict.update(
{
self.fs_hash: {
"packages": pkg_list,
"tar_file": self.__tar_file,
"created... | https://github.com/tern-tools/tern/issues/96 | $ python tests/test_class_image_layer.py
E....E
======================================================================
ERROR: testAddNotice (_main_.TestClassImageLayer)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/test_class_image_layer.py", line... | AttributeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.