internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: yt-project/yt

Issue:
BLD: non-isolated builds are broken
### Bug report

**Bug summary**

#4894 appears to break non-isolated builds as exercised in bleeding-edge CI:
[example logs](https://github.com/yt-project/yt/actions/runs/8980365465)

@yut23, would you be able to take a look ?



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -7,6 +7,7 @@
 from setuptools import Distribution, setup
 
 from setupext import (
+    NUMPY_MACROS,
     check_CPP14_flags,
     check_for_openmp,
     check_for_pyembree,
@@ -111,6 +112,7 @@ def has_ext_modules(self):
         {
             "sources": ["yt/utilities/lib/fixed_interpolator.cpp"],
             "include_dirs": clib_include_dirs,
+            "define_macros": NUMPY_MACROS,
         },
     )
 
diff --git a/setupext.py b/setupext.py
--- a/setupext.py
+++ b/setupext.py
@@ -394,6 +394,13 @@ def get_python_include_dirs():
     return include_dirs
 
 
+NUMPY_MACROS = [
+    ("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION"),
+    # keep in sync with runtime requirements (pyproject.toml)
+    ("NPY_TARGET_VERSION", "NPY_1_19_API_VERSION"),
+]
+
+
 def create_build_ext(lib_exts, cythonize_aliases):
     class build_ext(_build_ext):
         # subclass setuptools extension builder to avoid importing cython and numpy
@@ -425,11 +432,7 @@ def finalize_options(self):
             self.include_dirs.append(numpy.get_include())
             self.include_dirs.append(ewah_bool_utils.get_include())
 
-            define_macros = [
-                ("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION"),
-                # keep in sync with runtime requirements (pyproject.toml)
-                ("NPY_TARGET_VERSION", "NPY_1_19_API_VERSION"),
-            ]
+            define_macros = NUMPY_MACROS
 
             if self.define is None:
                 self.define = define_macros
diff --git a/yt/funcs.py b/yt/funcs.py
--- a/yt/funcs.py
+++ b/yt/funcs.py
@@ -515,7 +515,7 @@ def update_git(path):
 def rebuild_modules(path, f):
     f.write("Rebuilding modules\n\n")
     p = subprocess.Popen(
-        [sys.executable, "setup.py", "build_ext", "-i"],
+        [sys.executable, "setup.py", "build_clib", "build_ext", "-i"],
         cwd=path,
         stdout=subprocess.PIPE,
         stderr=subprocess.STDOUT,


Test patch:
Repository: yt-project/yt

Issue:
BUG: Multiple fields break sanitization
Calling `ds.r[:].mean([("gas", "density"), ("gas", "temperature")])` fails, claiming it can't identify the field `[("gas", "density"), ("gas", "temperature")]`.

This is because it calls `weight_field = sanitize_weight_field(self.ds, field, weight)`, which tries to regard `field` as a single field name.

A simple fix, which would only fix in the case of manually specifying the `weight_field`, would be to put the `field_object` assignment inside the conditional for if `weight_field is None`.  A slightly better fix would be to have it check that the type is the same for all the specified fields, which would require some "ensure this is a list of field types" or something.



Discussion:

Resolving patch:
diff --git a/yt/data_objects/data_containers.py b/yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py
+++ b/yt/data_objects/data_containers.py
@@ -33,8 +33,8 @@
 
 
 def sanitize_weight_field(ds, field, weight):
-    field_object = ds._get_field_info(field)
     if weight is None:
+        field_object = ds._get_field_info(field)
         if field_object.sampling_type == "particle":
             if field_object.name[0] == "gas":
                 ptype = ds._sph_ptypes[0]


Test patch:
Repository: shapiromatron/hawc

Issue:
Filter animal endpoint list by effect subtype
Go to https://v2626umcth922.rtord.epa.gov/ani/assessment/483/endpoints/ and click Filter Endpoints.

The user wants to be able to filter the endpoint list by Effect Subtype. Use the same interface as the Effect filter, with an autocomplete. Note the Order By dropdown has effect subtype as an option, so subtype data might already be available on page display.

Associated with JIRA APPDEV-3863.


Discussion:

Resolving patch:
diff --git a/project/animal/forms.py b/project/animal/forms.py
--- a/project/animal/forms.py
+++ b/project/animal/forms.py
@@ -658,6 +658,12 @@ class EndpointFilterForm(forms.Form):
         help_text="ex: alanine aminotransferase (ALT)",
         required=False)
 
+    effect_subtype = forms.CharField(
+        label='Effect Subtype',
+        widget=selectable.AutoCompleteWidget(lookups.RelatedEndpointEffectSubtypeLookup),
+        help_text="ex: ",
+        required=False)
+
     tags = forms.CharField(
         label='Tags',
         widget=selectable.AutoCompleteWidget(EffectTagLookup),
@@ -730,6 +736,7 @@ def get_query(self):
         system = self.cleaned_data.get('system')
         organ = self.cleaned_data.get('organ')
         effect = self.cleaned_data.get('effect')
+        effect_subtype = self.cleaned_data.get('effect_subtype')
         tags = self.cleaned_data.get('tags')
         dose_units = self.cleaned_data.get('dose_units')
 
@@ -758,6 +765,8 @@ def get_query(self):
             query &= Q(organ__icontains=organ)
         if effect:
             query &= Q(effect__icontains=effect)
+        if effect_subtype:
+            query &= Q(effect_subtype__icontains=effect_subtype)
         if tags:
             query &= Q(effects__name__icontains=tags)
         if dose_units:
diff --git a/project/animal/lookups.py b/project/animal/lookups.py
--- a/project/animal/lookups.py
+++ b/project/animal/lookups.py
@@ -53,6 +53,12 @@ class RelatedEndpointEffectLookup(RelatedDistinctStringLookup):
     related_filter = 'assessment_id'
 
 
+class RelatedEndpointEffectSubtypeLookup(RelatedDistinctStringLookup):
+    model = models.Endpoint
+    distinct_field = "effect_subtype"
+    related_filter = 'assessment_id'
+
+
 class ExpChemicalLookup(DistinctStringLookup):
     model = models.Experiment
     distinct_field = "chemical"
@@ -166,6 +172,7 @@ def get_item_value(self, obj):
 registry.register(RelatedEndpointSystemLookup)
 registry.register(RelatedEndpointOrganLookup)
 registry.register(RelatedEndpointEffectLookup)
+registry.register(RelatedEndpointEffectSubtypeLookup)
 
 registry.register(ExpChemicalLookup)
 registry.register(ExpCasLookup)


Test patch:
Repository: shapiromatron/hawc

Issue:
dosing regime dose groups hotfix
We had a reported data corruption issue where a user edited content in a dosing regime and then after saving, we found multiple endpoint-groups with the same endpoint group id, which shouldn't be possible.

After investigation, we found it was an error in the signal which keeps dose-groups and endpoint-groups synced. If there were multiple representation of dose-groups, for example 5 dose-groups and 2 units, then hawc would create 10 endpoint-groups instead of 5. Further, it would create these even for endpoints where data is not extracted.

Here we fix this issue and write a few tests.


Discussion:

Resolving patch:
diff --git a/hawc/apps/animal/admin.py b/hawc/apps/animal/admin.py
--- a/hawc/apps/animal/admin.py
+++ b/hawc/apps/animal/admin.py
@@ -35,6 +35,13 @@ class AnimalGroupAdmin(admin.ModelAdmin):
     )
     list_filter = ("species", "strain", "sex", "experiment__study__assessment_id")
     search_fields = ("name",)
+    raw_id_fields = ("experiment", "species", "strain", "dosing_regime", "siblings")
+
+
+class DoseGroupInline(admin.TabularInline):
+    model = models.DoseGroup
+    raw_id_fields = ("dose_units",)
+    extra = 0
 
 
 @admin.register(models.DosingRegime)
@@ -54,6 +61,12 @@ class DosingRegimeAdmin(admin.ModelAdmin):
     )
     list_select_related = ("dosed_animals",)
     search_fields = ("dosed_animals__name",)
+    inlines = (DoseGroupInline,)
+
+
+class EndpointGroupInline(admin.TabularInline):
+    model = models.EndpointGroup
+    extra = 0
 
 
 @admin.register(models.Endpoint)
@@ -71,3 +84,13 @@ class EndpointAdmin(admin.ModelAdmin):
     )
     list_filter = ("system", "organ", "data_extracted", "assessment_id")
     search_fields = ("name",)
+    raw_id_fields = (
+        "assessment",
+        "animal_group",
+        "system_term",
+        "organ_term",
+        "effect_term",
+        "effect_subtype_term",
+        "name_term",
+    )
+    inlines = (EndpointGroupInline,)
diff --git a/hawc/services/utils/git.py b/hawc/services/utils/git.py
--- a/hawc/services/utils/git.py
+++ b/hawc/services/utils/git.py
@@ -16,7 +16,7 @@ def current(cls, cwd: str = ".") -> "Commit":
             A Commit instance
         """
         cmd = "git log -1 --format=%H"
-        sha = subprocess.check_output(cmd.split(), cwd=cwd).decode().strip()[:12]
+        sha = subprocess.check_output(cmd.split(), cwd=cwd).decode().strip()[:8]
         cmd = "git show -s --format=%ct"
         dt = datetime.fromtimestamp(
             int(subprocess.check_output(cmd.split(), cwd=cwd).decode().strip())


Test patch:
Repository: mantl/mantl

Issue:
Update Dockerfile for terraform
- [ ] Add terraform install to Dockerfile
- [ ] change CMD to be a script that provisions via terraform and ansible



Discussion:
@kenjones-cisco we've moved to using terraform for cloud deployments, this still reflects the old deployment method. 

One issue I've found is that the terraform binary available from hashicorp doesn't seem to run in Alpine linux. 

@stevendborrelli is there a prefered base? centos, debian, ubuntu. I had considered updating but with the changes over the past week or so I thought it would be a good idea to wait for 0.3 to settle.


Resolving patch:
diff --git a/plugins/inventory/terraform.py b/plugins/inventory/terraform.py
--- a/plugins/inventory/terraform.py
+++ b/plugins/inventory/terraform.py
@@ -373,8 +373,10 @@ def main():
     parser.add_argument('--nometa',
                         action='store_true',
                         help='with --list, exclude hostvars')
-    default_root = os.path.abspath(os.path.join(os.path.dirname(__file__),
-                                                '..', '..', ))
+    default_root = os.environ.get('TERRAFORM_STATE_ROOT',
+                                  os.path.abspath(os.path.join(os.path.dirname(__file__),
+                                                               '..', '..', )))
+
     parser.add_argument('--root',
                         default=default_root,
                         help='custom root to search for `.tfstate`s in')


Test patch:
Repository: mantl/mantl

Issue:
upgrade path from 0.5.1 to 0.6
0.6 will include updated versions of marathon (0.13), mesos (0.25), and consul (0.6.3). We want to support an upgrade of an existing 0.5.1 cluster.
- [x] mesos/marathon: https://github.com/CiscoCloud/microservices-infrastructure/blob/master/playbooks/upgrade-mesos-marathon.yml
- [ ] consul upgrade
- [ ] vault (depending if https://github.com/CiscoCloud/microservices-infrastructure/tree/feature/vault-ssl makes it to this release)
- [ ] document upgrade process



Discussion:

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -56,9 +56,9 @@
 # built documents.
 #
 # The short X.Y version.
-version = '0.3'
+version = '0.6'
 # The full version, including alpha/beta/rc tags.
-release = '0.3'
+release = '0.6'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.


Test patch:
Repository: mantl/mantl

Issue:
gce builds broken with terraform 0.6.11
As of terraform 0.6.11 (possibly even 0.6.10 but I haven't confirmed), the gce instance module should use `assigned_nat_ip` instead of `nat_ip` to populate the `gce_ips` terraform output. As of now, when used along with terraform 0.6.11, that output is always blank which makes it unusable with dns modules. Also, [terraform.py](https://github.com/CiscoCloud/terraform.py/issues/35) needs to be updated to use `assigned_nat_ip` so that the public ip address is populated correctly.

See https://github.com/hashicorp/terraform/issues/4896 for the background on the change.



Discussion:

Resolving patch:
diff --git a/plugins/inventory/terraform.py b/plugins/inventory/terraform.py
--- a/plugins/inventory/terraform.py
+++ b/plugins/inventory/terraform.py
@@ -393,8 +393,8 @@ def gce_host(resource, module_name):
 
     try:
         attrs.update({
-            'ansible_ssh_host': interfaces[0]['access_config'][0]['nat_ip'],
-            'public_ipv4': interfaces[0]['access_config'][0]['nat_ip'],
+            'ansible_ssh_host': interfaces[0]['access_config'][0]['nat_ip'] or interfaces[0]['access_config'][0]['assigned_nat_ip'],
+            'public_ipv4': interfaces[0]['access_config'][0]['nat_ip'] or interfaces[0]['access_config'][0]['assigned_nat_ip'],
             'private_ipv4': interfaces[0]['address'],
             'publicly_routable': True,
         })


Test patch:
Repository: mantl/mantl

Issue:
Replace cisco logo with Mantl logo in documentation
Now that Mantl has it's own logo (see http://mantl.io and the readme), should we replace [the Cisco logo](https://github.com/CiscoCloud/mantl/blob/master/docs/_static/cisco.png) we use in the docs? 
- Ansible version (`ansible --version`): n/a
- Python version (`python --version`): n/a
- Git commit hash or branch: n/a
- Cloud Environment: n/a
- Terraform version (`terraform version`): n/a



Discussion:

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -114,7 +114,7 @@
 html_theme_options = {
     'github_user': 'ciscocloud',
     'github_repo': 'mantl',
-    'logo': 'cisco.png',
+    'logo': 'mantl-logo.png',
     'logo_name': True,
 }
 


Test patch:
Repository: EsupPortail/Esup-Pod

Issue:
[V2.7.1] Dépot de vidéo par utilisateur non-staff
Bonjour,
Sur un pod avec les options suivantes :
USE_CHUNKED_UPLOAD = True
RESTRICT_EDIT_VIDEO_ACCESS_TO_STAFF_ONLY = True

Lorsqu'un utilisateur non-staff est connecté à Pod, il a la possibilité de téléverser une vidéo, alors que ca ne devrait pas être le cas.
Il me semble que le lien "Ajouter une vidéo" ne devrait apparaître que pour un utilisateur staff dans ce cas.

D'ailleurs, cela crée des incohérences, car l'utilisateur non-staff peux envoyer la vidéo mais quand le transfert est fini, il est redirigé vers une page "L'accès à l'ajout de vidéo est restreint, si vous voulez ajouter des vidéos contactez nous"


Discussion:
Bien vu, je corrige ça
`Il me semble que le lien "Ajouter une vidéo" ne devrait apparaître que pour un utilisateur staff dans ce cas.`
En revanche, le bouton apparait toujours, même si l'option est activée, c'est le comportement normal

Resolving patch:
diff --git a/pod/video/views.py b/pod/video/views.py
--- a/pod/video/views.py
+++ b/pod/video/views.py
@@ -1617,6 +1617,7 @@ def video_add(request):
         'max_size': VIDEO_MAX_UPLOAD_SIZE,
         'allow_extension': allow_extension,
         'allowed_text': allowed_text,
+        'restricted_to_staff': RESTRICT_EDIT_VIDEO_ACCESS_TO_STAFF_ONLY,
         'TRANSCRIPT': TRANSCRIPT})
 
 


Test patch:
Repository: rasterio/rasterio

Issue:
rasterize - incorrect use of output argument
Around line 299 in features.py

if out is not None:
        if np.dtype(output.dtype).name not in valid_dtypes:
                            ^^^^^^^^^^^^

I think that output.dtype needs to be changed to out.dtype....

Thanks



Discussion:

Resolving patch:
diff --git a/rasterio/features.py b/rasterio/features.py
--- a/rasterio/features.py
+++ b/rasterio/features.py
@@ -297,10 +297,10 @@ def can_cast_dtype(values, dtype):
             stacklevel=2)
     out = out if out is not None else output
     if out is not None:
-        if np.dtype(output.dtype).name not in valid_dtypes:
+        if np.dtype(out.dtype).name not in valid_dtypes:
             raise ValueError('Output image dtype must be one of: %s'
                              % (', '.join(valid_dtypes)))
-        if not can_cast_dtype(shape_values, output.dtype):
+        if not can_cast_dtype(shape_values, out.dtype):
             raise ValueError('shape values cannot be cast to dtype of output '
                              'image')
 


Test patch:
diff --git a/tests/test_features_rasterize.py b/tests/test_features_rasterize.py
--- a/tests/test_features_rasterize.py
+++ b/tests/test_features_rasterize.py
@@ -29,6 +29,10 @@ def test_rasterize_geometries():
         truth[2:4, 2:4] = 1
         assert numpy.array_equal(result, truth)
 
+        out = numpy.zeros((rows, cols))
+        result = rasterize([geometry], out=out, default_value=1)
+        assert numpy.array_equal(out, truth)
+
         # we expect all touched pixels
         result = rasterize(
             [geometry], out_shape=(rows, cols), all_touched=True
Repository: rasterio/rasterio

Issue:
guard_transform prevents translation of unprojected files
Where by translation I mean the pattern

``` python
with rasterio.open(file1.tif) as src:
    with rasterio.open(file2.tif, 'w', **src.meta) as dst:
        ...
```

Traceback snippet:

```
Traceback (most recent call last):
  ...
  File "copier.py", line 15, in to_png
    with rio.open(dst_path, "w", **meta) as dst:
  File "xxx/anaconda/lib/python2.7/site-packages/rasterio/__init__.py", line 91, in open
    transform = guard_transform(transform)
  File "xxx/anaconda/lib/python2.7/site-packages/rasterio/transform.py", line 27, in guard_transform
    transform.a, transform.e))
ValueError: Transform has invalid coefficients a, e: (0.000000, 0.000000)
```



Discussion:

Resolving patch:
diff --git a/rasterio/transform.py b/rasterio/transform.py
--- a/rasterio/transform.py
+++ b/rasterio/transform.py
@@ -1,12 +1,14 @@
-
 import warnings
 
 from affine import Affine
 
 IDENTITY = Affine.identity()
 
-def tastes_like_gdal(t):
-    return t[2] == t[4] == 0.0 and t[1] > 0 and t[5] < 0
+
+def tastes_like_gdal(seq):
+    """Return True if `seq` matches the GDAL geotransform pattern."""
+    return seq[2] == seq[4] == 0.0 and seq[1] > 0 and seq[5] < 0
+
 
 def guard_transform(transform):
     """Return an Affine transformation instance"""
@@ -20,10 +22,4 @@ def guard_transform(transform):
             transform = Affine.from_gdal(*transform)
         else:
             transform = Affine(*transform)
-    a, e = transform.a, transform.e
-    if a == 0.0 or e == 0.0:
-        raise ValueError(
-            "Transform has invalid coefficients a, e: (%f, %f)" % (
-                transform.a, transform.e))
     return transform
-


Test patch:
diff --git a/tests/test_no_georef.py b/tests/test_no_georef.py
new file mode 100644
--- /dev/null
+++ b/tests/test_no_georef.py
@@ -0,0 +1,30 @@
+# You should be able to write rasters with no georeferencing, e.g., plain old
+# PNGs and JPEGs.
+
+import rasterio
+
+
+def test_write(tmpdir):
+    name = str(tmpdir.join("test.png"))
+    with rasterio.open('tests/data/RGB.byte.tif') as src:
+        kwargs = src.meta.copy()
+        del kwargs['affine']
+        del kwargs['transform']
+        del kwargs['crs']
+        kwargs['driver'] = 'PNG'
+        with rasterio.open(name, 'w', **kwargs) as dst:
+            dst.write(src.read())
+
+
+def test_read_write(tmpdir):
+    tif1 = str(tmpdir.join("test.tif"))
+    tif2 = str(tmpdir.join("test2.tif"))
+    with rasterio.open('tests/data/RGB.byte.tif') as src:
+        kwargs = src.meta.copy()
+        del kwargs['affine']
+        del kwargs['transform']
+        del kwargs['crs']
+        with rasterio.open(tif1, 'w', **kwargs) as dst:
+            dst.write(src.read())
+    with rasterio.open(tif1) as src, rasterio.open(tif2, 'w', **src.meta) as dst:
+        dst.write(src.read())
Repository: rasterio/rasterio

Issue:
Reduce cython compile errors
We get a bunch of compile-time warnings from the cython code.  I think we could reduce these.



Discussion:
Bunch is a nice way to put it :) Bushel might be more accurate. I'd like to clear these up, too.

Several of them stem from `const char *` vs `char *`

Some can be handled simply by running `cythonize()`  (in `setup.py`) with `quiet=True` option; it was warning that `rasterio.pxd` was not present (but we don't need it to be, so its sort of an irrelevant warning).

I've made good headway and should have a PR ready tonight.


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -135,7 +135,7 @@
             'rasterio._err', ['rasterio/_err.pyx'], **ext_options),
         Extension(
             'rasterio._example', ['rasterio/_example.pyx'], **ext_options),
-            ])
+        ], quiet=True)
 
 # If there's no manifest template, as in an sdist, we just specify .c files.
 else:


Test patch:
Repository: rasterio/rasterio

Issue:
Migrate to Cython 0.22
The bandaid applied in #276 is falling off. I've tagged this for 1.0 but we could do it sooner.



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -125,6 +125,7 @@ def copy_data_tree(datadir, destdir):
         copy_data_tree(projdatadir, 'rasterio/proj_data')
 
 ext_options = dict(
+    extra_compile_args=['-Wno-unused-parameter', '-Wno-unused-function'],
     include_dirs=include_dirs,
     library_dirs=library_dirs,
     libraries=libraries,


Test patch:
Repository: rasterio/rasterio

Issue:
rio-merge ignores --driver
Due to a [typo](https://github.com/mapbox/rasterio/blob/master/rasterio/rio/merge.py#L90):

``` python
kwargs['driver'] == driver
```

Instead of:

``` python
kwargs['driver']  = driver
```



Discussion:

Resolving patch:
diff --git a/rasterio/rio/merge.py b/rasterio/rio/merge.py
--- a/rasterio/rio/merge.py
+++ b/rasterio/rio/merge.py
@@ -87,7 +87,7 @@ def merge(ctx, files, output, driver, bounds, res, nodata):
                 output_width = int(math.ceil((bounds[2]-bounds[0])/res[0]))
                 output_height = int(math.ceil((bounds[3]-bounds[1])/res[1]))
 
-                kwargs['driver'] == driver
+                kwargs['driver'] = driver
                 kwargs['transform'] = output_transform
                 kwargs['width'] = output_width
                 kwargs['height'] = output_height


Test patch:
Repository: rasterio/rasterio

Issue:
Switch to the canonical click plugins implementation
The plugin functionality from `cligj.plugins` landed in its own click extension package called [click-plugins](https://github.com/click-contrib/click-plugins).  The cligj implementation will be deprecated according to https://github.com/mapbox/cligj/issues/6.

Switch to the canonical click plugins implementation
The plugin functionality from `cligj.plugins` landed in its own click extension package called [click-plugins](https://github.com/click-contrib/click-plugins).  The cligj implementation will be deprecated according to https://github.com/mapbox/cligj/issues/6.



Discussion:

Resolving patch:
diff --git a/rasterio/rio/main.py b/rasterio/rio/main.py
--- a/rasterio/rio/main.py
+++ b/rasterio/rio/main.py
@@ -8,8 +8,8 @@
 import sys
 
 import click
+from click_plugins import with_plugins
 import cligj
-import cligj.plugins
 
 import rasterio
 
@@ -19,9 +19,9 @@ def configure_logging(verbosity):
     logging.basicConfig(stream=sys.stderr, level=log_level)
 
 
-@cligj.plugins.group(plugins=(
-        ep for ep in list(iter_entry_points('rasterio.rio_commands')) +
-                     list(iter_entry_points('rasterio.rio_plugins'))))
+@with_plugins(ep for ep in list(iter_entry_points('rasterio.rio_commands')) +
+              list(iter_entry_points('rasterio.rio_plugins')))
+@click.group()
 @cligj.verbose_opt
 @cligj.quiet_opt
 @click.version_option(version=rasterio.__version__, message='%(version)s')
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -197,7 +197,8 @@ def copy_data_tree(datadir, destdir):
     'affine>=1.0',
     'cligj>=0.2.0',
     'Numpy>=1.7',
-    'snuggs>=1.3.1']
+    'snuggs>=1.3.1',
+    'click-plugins']
 
 if sys.version_info < (3, 4):
     inst_reqs.append('enum34')


Test patch: