Skip to content

Replace dummy_exchange_with_bound_dim with noop derived from SingleNodeExchange#1177

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/deduplicate-dummy-exchange-definition
Draft

Replace dummy_exchange_with_bound_dim with noop derived from SingleNodeExchange#1177
Copilot wants to merge 2 commits intomainfrom
copilot/deduplicate-dummy-exchange-definition

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

dummy_exchange_with_bound_dim was a standalone noop function duplicating behavior already provided by SingleNodeExchange.exchange. Replace it with a functools.partial of the real exchange object.

  • exchange_utils.py: Replace function definition with:

    noop_exchange = functools.partial(single_node_default.exchange, dims.CellDim)

    SingleNodeExchange.exchange is inherently a noop (returns SingleNodeResult whose finish() is a pass), so the bound dimension is irrelevant.

  • 9 test files: Rename exchange_utils.dummy_exchange_with_bound_dimexchange_utils.noop_exchange

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • gridtools.github.io
    • Triggering command: /usr/bin/python3 /usr/bin/python3 /usr/lib/python3/dist-packages/pip/__pip-REDACTED__.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-xe77e54j/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i REDACTED --find-links REDACTED -- setuptools>=61.0 wheel>=0.40.0 grep (dns block)
    • Triggering command: /usr/bin/python3 /usr/bin/python3 /usr/lib/python3/dist-packages/pip/__pip-REDACTED__.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-h6et9zmd/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i REDACTED --find-links REDACTED -- setuptools>=61.0 wheel>=0.40.0 grep (dns block)
    • Triggering command: /usr/bin/pip pip install --find-links REDACTED -e model/common -e model/testing --quiet sphere/dycore/st-rs k/_temp/ghcca-no--destination-port grep -l ge 4py/tools/py2fgen/wrappers/grid_wrapper.py /home/REDACTED/work/_temp/ghcca-node/node/bin/grep ge sphere/dycore/st-a grep grep (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

@jenkins-apn
Copy link
Copy Markdown

Hi there, this is jenkins continuous integration...
Do you want me to verify this patch?

1 similar comment
@jenkins-apn
Copy link
Copy Markdown

Hi there, this is jenkins continuous integration...
Do you want me to verify this patch?

Copilot AI linked an issue Mar 30, 2026 that may be closed by this pull request
…NodeExchange.exchange

Remove the standalone dummy_exchange_with_bound_dim function and replace it with
noop_exchange = functools.partial(single_node_default.exchange, dims.CellDim),
which relies on the exchange objects directly as suggested in the issue.
SingleNodeExchange.exchange is inherently a noop, making this a proper
replacement. Updated all 9 test files that referenced the old function.

Agent-Logs-Url: https://github.com/C2SM/icon4py/sessions/4b7a4e7b-4b0b-474f-b345-1d9cae17543d

Co-authored-by: jcanton <5622559+jcanton@users.noreply.github.com>
Copilot AI changed the title [WIP] Deduplicate dummy_exchange definition Replace dummy_exchange_with_bound_dim with noop derived from SingleNodeExchange Mar 30, 2026
Copilot AI requested a review from jcanton March 30, 2026 09:46
@havogt
Copy link
Copy Markdown
Contributor

havogt commented Apr 1, 2026

This change doesn't make sense...

@havogt
Copy link
Copy Markdown
Contributor

havogt commented Apr 1, 2026

But probably because I already did the deduplication in a previous PR and it didn't understand that there is nothing to do... Now it's more or less a rename but not for the better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deduplicate dummy_exchange definition

4 participants