anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: haddocking/haddock3
Issue: Wrong formatting of MaxAllowedMolecules accepted in config file

**Describe the bug**
String is not formatted when Exception is thrown.

**To Reproduce**
Put 50 input molecules at once in the configuration file:
molecules = ['mol1.pdb', ..., 'mol50.pdb']

```
raise ConfigurationError("Too many molecules defined, max is {max_molecules_allowed}.")
```

**Expected behavior**
Should return the value of max_molecules_allowed instead of the variable name

**Additional context (optional - remove if not relevant)**
I will solve this soon, this is just to keep track



Changed files:
src/haddock/gear/prepare_run.py

diff --git a/src/haddock/gear/prepare_run.py b/src/haddock/gear/prepare_run.py
index 64535bbc..5a4f5e87 100644
--- a/src/haddock/gear/prepare_run.py
+++ b/src/haddock/gear/prepare_run.py
@@ -259,7 +259,7 @@ def setup_run(
             )
 
         if len(modules_params["topoaa.1"]["molecules"]) > max_molecules_allowed:
-            raise ConfigurationError("Too many molecules defined, max is {max_molecules_allowed}.")  # noqa: E501
+            raise ConfigurationError(f"Too many molecules defined, max is {max_molecules_allowed}.")  # noqa: E501
 
         zero_fill.read(modules_params)
Repository: haddocking/haddock3
Issue: correct model-cluster-ranking in caprieval

`model-cluster-ranking` column is incorrectly named `self.model-cluster-ranking`https://github.com/haddocking/haddock3/blob/492b6b07924d7a8912c320d447dfc7bfe0b70b51/src/haddock/modules/analysis/caprieval/capri.py#L425

Changed files:
src/haddock/modules/analysis/caprieval/capri.py

diff --git a/src/haddock/modules/analysis/caprieval/capri.py b/src/haddock/modules/analysis/caprieval/capri.py
index 830c8e4f..2e4df98c 100644
--- a/src/haddock/modules/analysis/caprieval/capri.py
+++ b/src/haddock/modules/analysis/caprieval/capri.py
@@ -422,7 +422,7 @@ class CAPRI:
         else:
             data["cluster-id"] = None
             data["cluster-ranking"] = None
-            data["self.model-cluster-ranking"] = None
+            data["model-cluster-ranking"] = None
         
         # energies
         if self.model.unw_energies:
Repository: globus/globus-cli
Issue: `globus whoami` doesn't support `--format JSON`

The `--format` option is supposed to be global.

`globus whoami --format JSON` should produce a JSON record.
It can probably always be the full record -- layering `--verbose` with `--format JSON` doesn't seem terribly valuable.

This will become doubly important when we add #156, as it will be queryable.

Changed files:
globus_cli/commands/whoami.py

diff --git a/globus_cli/commands/whoami.py b/globus_cli/commands/whoami.py
index b4ad756..3d4d7e6 100644
--- a/globus_cli/commands/whoami.py
+++ b/globus_cli/commands/whoami.py
@@ -1,8 +1,10 @@
 import click
+from globus_sdk import GlobusResponse
 
 from globus_cli.safeio import safeprint
 from globus_cli.parsing import common_options
-from globus_cli.helpers import colon_formatted_print
+from globus_cli.helpers import (
+    print_json_response, outformat_is_json, colon_formatted_print)
 from globus_cli.config import (
     WHOAMI_ID_OPTNAME, WHOAMI_USERNAME_OPTNAME,
     WHOAMI_EMAIL_OPTNAME, WHOAMI_NAME_OPTNAME,
@@ -11,7 +13,7 @@ from globus_cli.config import (
 
 @click.command('whoami',
                help=('Show the currently logged-in identity.'))
-@common_options(no_format_option=True, no_map_http_status_option=True)
+@common_options(no_map_http_status_option=True)
 @click.option('--verbose', '-v', is_flag=True, default=False)
 def whoami_command(verbose):
     """
@@ -22,10 +24,10 @@ def whoami_command(verbose):
                              environment=GLOBUS_ENV)
     if not username:
         safeprint('No login information available. Please try '
-                  'logging in again.')
-        return
+                  'logging in again.', write_to_stderr=True)
+        click.get_current_context().exit(1)
 
-    if verbose:
+    if verbose or outformat_is_json():
         fields = tuple((x, x) for x in ('Username', 'Name', 'ID', 'Email'))
         user_doc = {
             'Username': username,
@@ -34,6 +36,9 @@ def whoami_command(verbose):
             'Email': lookup_option(WHOAMI_EMAIL_OPTNAME,
                                    environment=GLOBUS_ENV)
         }
-        colon_formatted_print(user_doc, fields)
+        if outformat_is_json():
+            print_json_response(GlobusResponse(user_doc))
+        else:
+            colon_formatted_print(user_doc, fields)
     else:
         safeprint(username)
Repository: caikit/caikit
Issue: Error message for incorrect task inference is wrong

## Describe the bug

The grpc error that says "Wrong inference RPC invoked for model class..." is incorrect

PR incoming with all the context, it's a tiny lil' bug

Changed files:
tests/runtime/test_grpc_server.py, caikit/runtime/servicers/global_predict_servicer.py

diff --git a/caikit/runtime/servicers/global_predict_servicer.py b/caikit/runtime/servicers/global_predict_servicer.py
index bb3813a..f96750f 100644
--- a/caikit/runtime/servicers/global_predict_servicer.py
+++ b/caikit/runtime/servicers/global_predict_servicer.py
@@ -314,5 +314,5 @@ class GlobalPredictServicer:
             raise CaikitRuntimeException(
                 status_code=StatusCode.INVALID_ARGUMENT,
                 message=f"Wrong inference RPC invoked for model class {type(model)}. "
-                f"Use {request_rpc.name} instead of {request_name}",
+                f"Use {module_rpc.name} instead of {request_rpc.name}",
             )
diff --git a/tests/runtime/test_grpc_server.py b/tests/runtime/test_grpc_server.py
index a1ea811..222050a 100644
--- a/tests/runtime/test_grpc_server.py
+++ b/tests/runtime/test_grpc_server.py
@@ -242,12 +242,14 @@ def test_rpc_validation_on_predict(
     predict_request = sample_inference_service.messages.OtherTaskRequest(
         sample_input_sampleinputtype=HAPPY_PATH_INPUT
     )
-    with pytest.raises(grpc.RpcError) as context:
+    with pytest.raises(
+        grpc.RpcError,
+        match="Wrong inference RPC invoked for model class .* Use SampleTaskPredict instead of OtherTaskPredict",
+    ) as context:
         stub.OtherTaskPredict(
             predict_request, metadata=[("mm-model-id", sample_task_model_id)]
         )
     assert context.value.code() == grpc.StatusCode.INVALID_ARGUMENT
-    assert "Wrong inference RPC invoked for model class" in str(context.value)
 
 
 def test_rpc_validation_on_predict_for_unsupported_model(
Repository: globus/globus-sdk-python
Issue: TransferClient.endpoint_activate isn't including its body in the POST

This is almost definitely a bug, but I don't have time at the moment to test a fix (or I would just patch it right now).

The `self.post` call in `endpoint_activate` is missing the body.


Changed files:
globus_sdk/transfer/client.py

diff --git a/globus_sdk/transfer/client.py b/globus_sdk/transfer/client.py
index 5e426c0..639c315 100644
--- a/globus_sdk/transfer/client.py
+++ b/globus_sdk/transfer/client.py
@@ -303,7 +303,7 @@ class TransferClient(BaseClient):
         path = self.qjoin_path("endpoint", endpoint_id, "deactivate")
         return self.post(path, params=params)
 
-    def endpoint_activate(self, endpoint_id, data, **params):
+    def endpoint_activate(self, endpoint_id, requirements_data, **params):
         """
         ``POST /endpoint/<endpoint_id>/activate``
 
@@ -318,11 +318,11 @@ class TransferClient(BaseClient):
 
         See
         `Activate endpoint \\
-        <https://docs.globus.org/api/transfer/endpoint_activation/#autoactivate_endpoint>`_
+        <https://docs.globus.org/api/transfer/endpoint_activation/#activate_endpoint>`_
         in the REST documentation for details.
         """
-        path = self.qjoin_path("endpoint", endpoint_id, "autoactivate")
-        return self.post(path, params=params)
+        path = self.qjoin_path("endpoint", endpoint_id, "activate")
+        return self.post(path, json_body=requirements_data, params=params)
 
     def endpoint_get_activation_requirements(self, endpoint_id, **params):
         """
Repository: globus/globus-sdk-python
Issue: Authorization Code Grant flow logs message about Native App

This line: https://github.com/globus/globus-sdk-python/blob/master/globus_sdk/auth/oauth2_authorization_code.py#L120

Just needs a new message.

Changed files:
globus_sdk/auth/oauth2_authorization_code.py

diff --git a/globus_sdk/auth/oauth2_authorization_code.py b/globus_sdk/auth/oauth2_authorization_code.py
index 698c9de..26525d1 100644
--- a/globus_sdk/auth/oauth2_authorization_code.py
+++ b/globus_sdk/auth/oauth2_authorization_code.py
@@ -117,7 +117,7 @@ class GlobusAuthorizationCodeFlowManager(GlobusOAuthFlowManager):
         :rtype: :class:`OAuthTokenResponse \\
         <globus_sdk.auth.token_response.OAuthTokenResponse>`
         """
-        logger.debug(('Performing Native App auth_code exchange. '
+        logger.debug(('Performing Authorization Code auth_code exchange. '
                       'Sending client_id and client_secret'))
         return self.auth_client.oauth2_token(
             {'grant_type': 'authorization_code',
Repository: globus/globus-sdk-python
Issue: ssl_verify=no is ignored on ID Token parsing, maybe elsewhere too

The whole purpose of the `ssl_verify` config setting is really to support internal use cases in which we're running against a non-production server and don't want to jump through the hoops to get `requests` to play nice and support SNI.
I don't think there's much other purpose to it.

However, we fail to use it when making an explicit `requests.get` call in `decode_id_token`.

There may be other locations where we make explicit requests. I'll check for that now, but this is the only one which I know is causing issues.

Changed files:
tests/unit/test_token_response.py, globus_sdk/auth/token_response.py

diff --git a/globus_sdk/auth/token_response.py b/globus_sdk/auth/token_response.py
index 04abee4..296f1f3 100644
--- a/globus_sdk/auth/token_response.py
+++ b/globus_sdk/auth/token_response.py
@@ -116,7 +116,8 @@ class OAuthTokenResponse(GlobusHTTPResponse):
         logger.debug('Fetch JWK Data: Start')
         oidc_conf = auth_client.get('/.well-known/openid-configuration')
         jwks_uri = oidc_conf['jwks_uri']
-        jwk_data = requests.get(jwks_uri).json()
+        # use the auth_client's decision on ssl_verify=yes/no
+        jwk_data = requests.get(jwks_uri, verify=auth_client._verify).json()
         logger.debug('Fetch JWK Data: Complete')
 
         return jwt.decode(
diff --git a/tests/unit/test_token_response.py b/tests/unit/test_token_response.py
index cd0c10f..4ade593 100644
--- a/tests/unit/test_token_response.py
+++ b/tests/unit/test_token_response.py
@@ -55,6 +55,7 @@ class OAuthTokenResponseTests(CapturedIOTestCase):
         # mock AuthClient
         self.ac = mock.Mock()
         self.ac.client_id = get_client_data()["native_app_client1"]["id"]
+        self.ac._verify = True
         self.ac.get = mock.Mock(return_value={
             "jwks_uri":
             u"https://auth.globus.org/jwk.json"})
Repository: marrink-lab/vermouth-martinize
Issue: Mutation of single chain produces only 1 itp

When mutating a amino-acid in one chain of a dimer or so, martinize2 produces a single itp-file with that mutation for both chains. When using -sep everything is fine, but the expected behavior should be to have two itp-files produced. 

Changed files:
vermouth/molecule.py

diff --git a/vermouth/molecule.py b/vermouth/molecule.py
index fcc0d1a..9e989d3 100644
--- a/vermouth/molecule.py
+++ b/vermouth/molecule.py
@@ -701,11 +701,21 @@ class Molecule(nx.Graph):
         bool
             True iff other has the same shape as this molecule.
         """
-        # TODO: Test the node attributes, the molecule attributes, and
-        # the interactions.
-        return nx.is_isomorphic(self, other)
+        # Almost identical to __eq__, except that some node attributes don't
+        # contribute, such as position and chain.
+        # Note that isomorphic molecules get separate moltypes now, since the
+        # order of the nodes is coupled to the order of the atoms in the output
+        # PDB
+        ignore_attrs = ('position', 'chain', 'graph', 'mapping_weights')
+        return (
+                self.nrexcl == other.nrexcl and
+                self._force_field == other._force_field and
+                self.same_nodes(other, ignore_attr=ignore_attrs) and
+                self.same_edges(other) and
+                self.same_interactions(other)
+        )
 
-    # TODO: Allow comparison of interactions betweem isomorphic molecules.
+    # TODO: Allow comparison of interactions between isomorphic molecules.
     def same_interactions(self, other):
         """
         Returns `True` if the interactions are the same.
Repository: marrink-lab/vermouth-martinize
Issue: Writing Debug PDBs/GRO broken

Here we define open only if deferred file writing is true. However, that means open is undefined if it is not because open is declared as local variable. 

https://github.com/marrink-lab/vermouth-martinize/blob/16de64e3f391a6ee1d3ed91ddeaa7352eece8e2e/vermouth/pdb/pdb.py#L583-L586

Changed files:
vermouth/gmx/gro.py, vermouth/pdb/pdb.py

diff --git a/vermouth/gmx/gro.py b/vermouth/gmx/gro.py
index c242a78..68d7fdb 100644
--- a/vermouth/gmx/gro.py
+++ b/vermouth/gmx/gro.py
@@ -142,6 +142,8 @@ def write_gro(system, file_name, precision=7, title='Martinized!', box=(0, 0, 0)
 
     if defer_writing:
         open = deferred_open
+    else:
+        from builtins import open
     with open(str(file_name), 'w') as out:
         out.write(title + '\\n')  # Title
         out.write(formatter.format('{}\\n', system.num_particles))  # number of atoms
diff --git a/vermouth/pdb/pdb.py b/vermouth/pdb/pdb.py
index 1add284..eb32875 100644
--- a/vermouth/pdb/pdb.py
+++ b/vermouth/pdb/pdb.py
@@ -582,5 +582,10 @@ def write_pdb(system, path, conect=True, omit_charges=True, nan_missing_pos=Fals
     """
     if defer_writing:
         open = deferred_open
+    else:
+        # This is needed since the variable assignment above declares `open` as
+        # a local variable, which means it won't be looked up from the global
+        # namespace any more.
+        from builtins import open
     with open(path, 'w') as out:
         out.write(write_pdb_string(system, conect, omit_charges, nan_missing_pos))
Repository: ncar/geocat-examples
Issue: NCL_skewt_2_2.py is failing due to an update in geocat-comp

**Describe the bug**
The example `NCL_skewt_2_2.py` is failing because the `skewt_params` function was moved from geocat-comp to geocat-viz. The example needs to be updated to reflect this change. However, it will still cause failures because geocat-viz needs to release `skewt_params`. There is a soft lock where geocat-viz can't merge changes for the release because geocat-examples keeps failing.

Changed files:
Gallery/Skew-T/NCL_skewt_2_2.py

diff --git a/Gallery/Skew-T/NCL_skewt_2_2.py b/Gallery/Skew-T/NCL_skewt_2_2.py
index 2124be9..db6e443 100644
--- a/Gallery/Skew-T/NCL_skewt_2_2.py
+++ b/Gallery/Skew-T/NCL_skewt_2_2.py
@@ -23,7 +23,6 @@ import metpy.calc as mpcalc
 
 import geocat.viz as gv
 import geocat.datafiles as gdf
-import geocat.comp.skewt_params as gcskewt
 
 ##############################################################################
 # Read in data:
@@ -48,7 +47,7 @@ u, v = mpcalc.wind_components(wspd, wdir)  # Calculate wind components
 tc0 = tc[0]  # Temperature of surface parcel
 tdc0 = tdc[0]  # Dew point temperature of surface parcel
 pro = mpcalc.parcel_profile(p, tc0, tdc0)  # Temperature profile of parcel
-subtitle = gcskewt.get_skewt_vars(p, tc, tdc, pro)  # Create subtitle
+subtitle = gv.get_skewt_vars(p, tc, tdc, pro)  # Create subtitle
 
 ##############################################################################
 # Plot:
Repository: ncar/geocat-examples
Issue: geocat-examples is failing upstream CI

geocat-examples is failing upstream CI because of an expired deprecation in numpy.  

It looks like these are all impacted, but the error is the same:
NCL_conwomap_3.py
NCL_meteo_1.py
moc_global_atl_example.py

Relevant info from the logs below.

> AttributeError: module 'numpy' has no attribute 'int'.
> 
> `np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
> 
> The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
> 
>     https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations


Changed files:
Gallery/Contours/NCL_conwomap_3.py, Gallery/Meteograms/NCL_meteo_1.py, GeoCAT-comp-examples/comp_only/moc_globe_atl_example.py

diff --git a/Gallery/Contours/NCL_conwomap_3.py b/Gallery/Contours/NCL_conwomap_3.py
index 004997d..0d959f8 100644
--- a/Gallery/Contours/NCL_conwomap_3.py
+++ b/Gallery/Contours/NCL_conwomap_3.py
@@ -79,7 +79,7 @@ cp = ax.contour(xdata, ydata, zdata, colors='black', linewidths=1.0)
 ax.clabel(cp, inline=True, fontsize=10, colors='black', fmt="%.0f")
 
 # Ignore second half of the graph
-y1 = np.full(shape=len(xlist), fill_value=0, dtype=np.int)
+y1 = np.full(shape=len(xlist), fill_value=0, dtype=np.int32)
 y2 = x
 ax.fill_between(x,
                 y1,
diff --git a/Gallery/Meteograms/NCL_meteo_1.py b/Gallery/Meteograms/NCL_meteo_1.py
index 3f8b2b6..5a5a3cb 100644
--- a/Gallery/Meteograms/NCL_meteo_1.py
+++ b/Gallery/Meteograms/NCL_meteo_1.py
@@ -129,7 +129,7 @@ cont3labels = ax1.clabel(contour3,
 ]
 
 # Determine the labels for each tick on the x and y axes
-yticklabels = np.array(levels, dtype=np.int)
+yticklabels = np.array(levels, dtype=np.int32)
 xticklabels = [
     '12z', '15z', '18z', '21z', 'Apr29', '03z', '06z', '09z', '12z', '15z',
     '18z', '21z', 'Apr30', '03z', '06z', '09z', '12z', '15z', '18z', '21z',
diff --git a/GeoCAT-comp-examples/comp_only/moc_globe_atl_example.py b/GeoCAT-comp-examples/comp_only/moc_globe_atl_example.py
index dfac360..a5be12c 100644
--- a/GeoCAT-comp-examples/comp_only/moc_globe_atl_example.py
+++ b/GeoCAT-comp-examples/comp_only/moc_globe_atl_example.py
@@ -47,7 +47,7 @@ tlat = ds.TLAT[:].values.astype(np.double)
 
 # Read important parameters from input data
 nyaux = lat_aux_grid.shape[0]  # 395
-km = np.max(kmt.values).astype(np.int)
+km = np.max(kmt.values).astype(np.int32)
 ny = tarea.shape[0]
 nx = tarea.shape[1]