codecov-io: # [Codecov](https://codecov.io/gh/spacetx/starfish/pull/1525?src=pr&el=h1) Report
> Merging [#1525](https://codecov.io/gh/spacetx/starfish/pull/1525?src=pr&el=desc) into [master](https://codecov.io/gh/spacetx/starfish/commit/a5b405b37e7c2ad377bccfbde1c429bf2a1ad333?src=pr&el=desc) will **decrease** coverage by `32.14%`.
> The diff coverage is `25%`.

[![Impacted file tree graph](https://codecov.io/gh/spacetx/starfish/pull/1525/graphs/tree.svg?width=650&token=kliQHejt6T&height=150&src=pr)](https://codecov.io/gh/spacetx/starfish/pull/1525?src=pr&el=tree)

```diff
@@             Coverage Diff             @@
##           master    #1525       +/-   ##
===========================================
- Coverage    87.1%   54.96%   -32.15%     
===========================================
  Files         139      139               
  Lines        4988     4992        +4     
===========================================
- Hits         4345     2744     -1601     
- Misses        643     2248     +1605
```


| [Impacted Files](https://codecov.io/gh/spacetx/starfish/pull/1525?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [starfish/core/experiment/builder/\_\_init\_\_.py](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree#diff-c3RhcmZpc2gvY29yZS9leHBlcmltZW50L2J1aWxkZXIvX19pbml0X18ucHk=) | `29.21% <25%> (-67.26%)` | :arrow_down: |
| [...tructured\_formatter/structured\_formatter\_script.py](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree#diff-c3RhcmZpc2gvY29yZS9leHBlcmltZW50L2J1aWxkZXIvdGVzdC9zdHJ1Y3R1cmVkX2Zvcm1hdHRlci9zdHJ1Y3R1cmVkX2Zvcm1hdHRlcl9zY3JpcHQucHk=) | `0% <0%> (-100%)` | :arrow_down: |
| [starfish/test/full\_pipelines/api/test\_dartfish.py](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree#diff-c3RhcmZpc2gvdGVzdC9mdWxsX3BpcGVsaW5lcy9hcGkvdGVzdF9kYXJ0ZmlzaC5weQ==) | `20% <0%> (-80%)` | :arrow_down: |
| [...e/experiment/builder/test/factories/all\_purpose.py](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree#diff-c3RhcmZpc2gvY29yZS9leHBlcmltZW50L2J1aWxkZXIvdGVzdC9mYWN0b3JpZXMvYWxsX3B1cnBvc2UucHk=) | `21.27% <0%> (-78.73%)` | :arrow_down: |
| [...ilder/test/structured\_formatter/test\_single\_fov.py](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree#diff-c3RhcmZpc2gvY29yZS9leHBlcmltZW50L2J1aWxkZXIvdGVzdC9zdHJ1Y3R1cmVkX2Zvcm1hdHRlci90ZXN0X3NpbmdsZV9mb3YucHk=) | `23.52% <0%> (-76.48%)` | :arrow_down: |
| [starfish/test/full\_pipelines/api/test\_iss\_api.py](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree#diff-c3RhcmZpc2gvdGVzdC9mdWxsX3BpcGVsaW5lcy9hcGkvdGVzdF9pc3NfYXBpLnB5) | `23.52% <0%> (-76.48%)` | :arrow_down: |
| [starfish/test/full\_pipelines/api/test\_merfish.py](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree#diff-c3RhcmZpc2gvdGVzdC9mdWxsX3BpcGVsaW5lcy9hcGkvdGVzdF9tZXJmaXNoLnB5) | `24.39% <0%> (-75.61%)` | :arrow_down: |
| [...re/spots/DetectSpots/local\_search\_blob\_detector.py](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree#diff-c3RhcmZpc2gvY29yZS9zcG90cy9EZXRlY3RTcG90cy9sb2NhbF9zZWFyY2hfYmxvYl9kZXRlY3Rvci5weQ==) | `25% <0%> (-70.2%)` | :arrow_down: |
| [starfish/core/spacetx\_format/test\_fuzz.py](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree#diff-c3RhcmZpc2gvY29yZS9zcGFjZXR4X2Zvcm1hdC90ZXN0X2Z1enoucHk=) | `31.03% <0%> (-68.97%)` | :arrow_down: |
| [starfish/core/util/click/\_\_init\_\_.py](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree#diff-c3RhcmZpc2gvY29yZS91dGlsL2NsaWNrL19faW5pdF9fLnB5) | `25.92% <0%> (-66.67%)` | :arrow_down: |
| ... and [77 more](https://codecov.io/gh/spacetx/starfish/pull/1525/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/spacetx/starfish/pull/1525?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/spacetx/starfish/pull/1525?src=pr&el=footer). Last update [a5b405b...1e8f692](https://codecov.io/gh/spacetx/starfish/pull/1525?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

diff --git a/README.rst b/README.rst
index 8e52f3e6..e95ed095 100644
--- a/README.rst
+++ b/README.rst
@@ -1,17 +1,29 @@
 Starfish
 ========
 
-.. image:: https://travis-ci.com/spacetx/starfish.svg?branch=master
-    :target: https://travis-ci.com/spacetx/starfish
-    :width: 20%
-.. image:: https://codecov.io/gh/spacetx/starfish/branch/master/graph/badge.svg
-    :target: https://codecov.io/gh/spacetx/starfish
+
+.. image:: https://img.shields.io/pypi/v/starfish   
+    :target: https://pypi.org/project/starfish/
+    :alt: PyPI
+    
+.. image:: https://img.shields.io/pypi/dm/starfish   
+   :target: https://pypistats.org/packages/starfish
+   :alt: PyPI - Downloads
+
 .. image:: https://readthedocs.org/projects/spacetx-starfish/badge/?version=latest
     :target: https://spacetx-starfish.readthedocs.io/en/latest/?badge=latest
     :alt: Documentation Status
+    
 .. image:: https://join-cziscience-slack.herokuapp.com/badge.svg
     :target: https://join-cziscience-slack.herokuapp.com/
     :alt: Join the CZI Science slack
+    
+.. image:: https://travis-ci.com/spacetx/starfish.svg?branch=master
+    :target: https://travis-ci.com/spacetx/starfish
+    
+.. image:: https://codecov.io/gh/spacetx/starfish/branch/master/graph/badge.svg
+    :target: https://codecov.io/gh/spacetx/starfish
+    
 
 .. ideally we could use the ..include directive here instead of copy and pasting the following
    information
diff --git a/starfish/core/experiment/builder/__init__.py b/starfish/core/experiment/builder/__init__.py
index 738714d1..99e9b55c 100644
--- a/starfish/core/experiment/builder/__init__.py
+++ b/starfish/core/experiment/builder/__init__.py
@@ -30,6 +30,7 @@ from slicedimage import (
 
 from starfish import FieldOfView
 from starfish.core.codebook.codebook import Codebook
+from starfish.core.errors import DataFormatWarning
 from starfish.core.experiment.builder.orderediterator import join_axes_labels, ordered_iterator
 from starfish.core.experiment.version import CURRENT_VERSION
 from starfish.core.types import Axes, Coordinates
@@ -116,6 +117,14 @@ def build_irregular_image(
                 current_ch,
                 current_zplane
             )
+            for axis in (Axes.X, Axes.Y):
+                if image.shape[axis] < max(len(rounds), len(chs), len(zplanes)):
+                    warnings.warn(
+                        f"{axis} axis appears to be smaller than rounds/chs/zplanes, which is "
+                        "unusual",
+                        DataFormatWarning
+                    )
+
             tile = Tile(
                 image.coordinates,
                 {

Add sanity checks to data formatting tools
## Objective

*As a user of spacetx format, I want starfish to catch common errors so that it's easier to debug simple problems in data formatting*

### Acceptance Criteria
* a warning is emitted if the shape of x & y aren't >= the shape of r, c, and z

### Notes
See: #1502 for rationale
diff --git a/starfish/core/experiment/builder/test/test_small_axis.py b/starfish/core/experiment/builder/test/test_small_axis.py
new file mode 100644
index 00000000..0cc39e84
--- /dev/null
+++ b/starfish/core/experiment/builder/test/test_small_axis.py
@@ -0,0 +1,66 @@
+import warnings
+from typing import Callable, Collection, Mapping, Sequence
+
+import pytest
+
+from starfish.core.errors import DataFormatWarning
+from starfish.core.types import Coordinates, CoordinateValue
+from .factories.all_purpose import collection_factory
+from .factories.unique_tiles import UniqueTiles
+from .. import TileIdentifier
+
+
+@pytest.mark.parametrize(
+    "num_round_labels, num_ch_labels, num_zplane_labels, tile_height, tile_width, has_warnings",
+    (
+        (1, 1, 1, 100, 100, False),
+        (1, 1, 1000, 100, 100, True),
+        (1, 1000, 1, 100, 100, True),
+        (1000, 1, 1, 100, 100, True),
+        (1000, 1, 1, 10000, 100, True),
+        (1000, 1, 1, 100, 10000, True),
+    )
+)
+def test_small_axis(
+        num_round_labels,
+        num_ch_labels,
+        num_zplane_labels,
+        tile_height,
+        tile_width,
+        has_warnings,
+):
+    tile_identifiers: Collection[TileIdentifier] = [
+        TileIdentifier(0, round_label, ch_label, zplane_label)
+        for round_label in range(num_round_labels)
+        for ch_label in range(num_ch_labels)
+        for zplane_label in range(num_zplane_labels)
+    ]
+
+    def make_tile_coordinate_callback(
+            all_zplane_labels: Sequence[int]
+    ) -> Callable[[TileIdentifier], Mapping[Coordinates, CoordinateValue]]:
+        def tile_coordinate_callback(
+                tile_identifier: TileIdentifier
+        ) -> Mapping[Coordinates, CoordinateValue]:
+            zplane_offset = all_zplane_labels.index(tile_identifier.zplane_label)
+            return {
+                Coordinates.X: (0.0, 0.1),
+                Coordinates.Y: (0.0, 0.1),
+                Coordinates.Z: zplane_offset * 0.1,
+            }
+
+        return tile_coordinate_callback
+
+    with warnings.catch_warnings(record=True) as warnings_:
+        collection_factory(
+            UniqueTiles,
+            tile_identifiers,
+            make_tile_coordinate_callback(
+                sorted(set(tile_identifier.zplane_label for tile_identifier in tile_identifiers))),
+            tile_height,
+            tile_width,
+        )
+        assert has_warnings == (
+            0 != len(
+                [warning for warning in warnings_
+                 if issubclass(warning.category, DataFormatWarning)]))

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist
apt-get update apt-get install -y gcc
3.6
REQUIREMENTS.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
async-generator==1.10
attrs==22.2.0
backcall==0.2.0
bleach==4.1.0
boto3==1.23.10
botocore==1.26.10
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
click==8.0.4
comm==0.1.4
coverage==6.2
cycler==0.11.0
dataclasses==0.8
decorator==4.4.2
defusedxml==0.7.1
diskcache==5.6.3
entrypoints==0.4
execnet==1.9.0
idna==3.10
imageio==2.15.0
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig==1.1.1
ipykernel==5.5.6
ipython==7.16.3
ipython-genutils==0.2.0
ipywidgets==7.8.5
jedi==0.17.2
Jinja2==3.0.3
jmespath==0.10.0
joblib==1.1.1
jsonschema==3.2.0
jupyter-client==7.1.2
jupyter-core==4.9.2
jupyterlab-pygments==0.1.2
jupyterlab_widgets==1.1.11
kiwisolver==1.3.1
MarkupSafe==2.0.1
matplotlib==3.3.4
mistune==0.8.4
mpmath==1.3.0
nbclient==0.5.9
nbconvert==6.0.7
nbformat==5.1.3
nest-asyncio==1.6.0
networkx==2.5.1
notebook==6.4.10
numpy==1.19.5
packaging==21.3
pandas==1.1.5
pandocfilters==1.5.1
parso==0.7.1
pexpect==4.9.0
pickleshare==0.7.5
Pillow==8.4.0
pluggy==1.0.0
prometheus-client==0.17.1
prompt-toolkit==3.0.36
ptyprocess==0.7.0
py==1.11.0
pycparser==2.21
Pygments==2.14.0
pyparsing==3.1.4
pyrsistent==0.18.0
pytest==7.0.1
pytest-cov==4.0.0
pytest-xdist==3.0.2
python-dateutil==2.9.0.post0
pytz==2025.2
PyWavelets==1.1.1
PyYAML==6.0.1
pyzmq==25.1.2
regional==1.1.2
requests==2.27.1
s3transfer==0.5.2
scikit-image==0.17.2
scikit-learn==0.24.2
scipy==1.5.4
semantic-version==2.10.0
Send2Trash==1.8.3
showit==1.1.4
six==1.17.0
slicedimage==4.0.4
-e git+https://github.com/spacetx/starfish.git@323cbe70feaa655ac6c82e6c291016b4f6535d73#egg=starfish
sympy==1.9
terminado==0.12.1
testpath==0.6.0
threadpoolctl==3.1.0
tifffile==2020.9.3
tomli==1.2.3
tornado==6.1
tqdm==4.64.1
trackpy==0.5.0
traitlets==4.3.3
typing_extensions==4.1.1
urllib3==1.26.20
validators==0.20.0
wcwidth==0.2.13
webencodings==0.5.1
widgetsnbextension==3.6.10
xarray==0.16.2
zipp==3.6.0

name: starfish
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - argon2-cffi==21.3.0
      - argon2-cffi-bindings==21.2.0
      - async-generator==1.10
      - attrs==22.2.0
      - backcall==0.2.0
      - bleach==4.1.0
      - boto3==1.23.10
      - botocore==1.26.10
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - click==8.0.4
      - comm==0.1.4
      - coverage==6.2
      - cycler==0.11.0
      - dataclasses==0.8
      - decorator==4.4.2
      - defusedxml==0.7.1
      - diskcache==5.6.3
      - entrypoints==0.4
      - execnet==1.9.0
      - idna==3.10
      - imageio==2.15.0
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - ipykernel==5.5.6
      - ipython==7.16.3
      - ipython-genutils==0.2.0
      - ipywidgets==7.8.5
      - jedi==0.17.2
      - jinja2==3.0.3
      - jmespath==0.10.0
      - joblib==1.1.1
      - jsonschema==3.2.0
      - jupyter-client==7.1.2
      - jupyter-core==4.9.2
      - jupyterlab-pygments==0.1.2
      - jupyterlab-widgets==1.1.11
      - kiwisolver==1.3.1
      - markupsafe==2.0.1
      - matplotlib==3.3.4
      - mistune==0.8.4
      - mpmath==1.3.0
      - nbclient==0.5.9
      - nbconvert==6.0.7
      - nbformat==5.1.3
      - nest-asyncio==1.6.0
      - networkx==2.5.1
      - notebook==6.4.10
      - numpy==1.19.5
      - packaging==21.3
      - pandas==1.1.5
      - pandocfilters==1.5.1
      - parso==0.7.1
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pillow==8.4.0
      - pluggy==1.0.0
      - prometheus-client==0.17.1
      - prompt-toolkit==3.0.36
      - ptyprocess==0.7.0
      - py==1.11.0
      - pycparser==2.21
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pyrsistent==0.18.0
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - pytest-xdist==3.0.2
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pywavelets==1.1.1
      - pyyaml==6.0.1
      - pyzmq==25.1.2
      - regional==1.1.2
      - requests==2.27.1
      - s3transfer==0.5.2
      - scikit-image==0.17.2
      - scikit-learn==0.24.2
      - scipy==1.5.4
      - semantic-version==2.10.0
      - send2trash==1.8.3
      - showit==1.1.4
      - six==1.17.0
      - slicedimage==4.0.4
      - sympy==1.9
      - terminado==0.12.1
      - testpath==0.6.0
      - threadpoolctl==3.1.0
      - tifffile==2020.9.3
      - tomli==1.2.3
      - tornado==6.1
      - tqdm==4.64.1
      - trackpy==0.5.0
      - traitlets==4.3.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - validators==0.20.0
      - wcwidth==0.2.13
      - webencodings==0.5.1
      - widgetsnbextension==3.6.10
      - xarray==0.16.2
      - zipp==3.6.0
prefix: /opt/conda/envs/starfish

starfish/core/experiment/builder/test/test_small_axis.py::test_small_axis[1-1-1000-100-100-True] starfish/core/experiment/builder/test/test_small_axis.py::test_small_axis[1-1000-1-100-100-True] starfish/core/experiment/builder/test/test_small_axis.py::test_small_axis[1000-1-1-100-100-True] starfish/core/experiment/builder/test/test_small_axis.py::test_small_axis[1000-1-1-10000-100-True] starfish/core/experiment/builder/test/test_small_axis.py::test_small_axis[1000-1-1-100-10000-True]
starfish/core/experiment/builder/test/test_small_axis.py::test_small_axis[1-1-1-100-100-False]
README.rst starfish/core/experiment/builder/__init__.py
README.rst starfish/core/experiment/builder/__init__.py