Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor[catesian]: Type hints and code redability improvements #1724

Merged
merged 7 commits into from
Nov 15, 2024

Conversation

romanc
Copy link
Contributor

@romanc romanc commented Nov 5, 2024

Description

This PR is split off the work for the new GT4Py - DaCe bridge, which should allow to expose control flow statements (if and while) to DaCe to better use DaCe's analytics capabilities. This PR is concerned with adding type hints and generally improving code readability. Main parts are

  • daceir_builder.py: early returns and renamed variable
  • sdfg_builder.py: type hints and early returns
  • tasklet_codegen.py: type hints and early returns

TaskletCodegen was given sdfg_ctx, which wasn't used. That parameter was thus removed.

Parent issue: GEOS-ESM/NDSL#53

Requirements

  • All fixes and/or new features come with corresponding tests.
    Assumed to be covered by existing tests.
  • Important design decisions have been documented in the approriate ADR inside the docs/development/ADRs/ folder.
    N/A

@romanc
Copy link
Contributor Author

romanc commented Nov 5, 2024

@twicki, @FlorianDeconinck: The great cleanup continues. Pulling out as much as I can from main...romanc:romanc/dace-bridge-no-sdfgs before switching tasks.

@egparedes would you mind kicking off CSCS CI for us?

Copy link
Contributor

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@havogt
Copy link
Contributor

havogt commented Nov 7, 2024

Are yo aware of the mypy excludes here

[[tool.mypy.overrides]]
? You could play with these settings to enable stricter mypy settings in the files that you fixed.

Copy link
Contributor

@twicki twicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@romanc
Copy link
Contributor Author

romanc commented Nov 13, 2024

Are yo aware of the mypy excludes here

[[tool.mypy.overrides]]

? You could play with these settings to enable stricter mypy settings in the files that you fixed.

Thanks for the pointer @havogt, I wasn't aware. I'll see what we can do there in a follow-up PR if that is okay with you.

Meanwhile, I updated the branch with latest main. If someone from CSCS would kick off the CSCS-CI for me, I'd be grateful 🙏

@tehrengruber
Copy link
Contributor

tehrengruber commented Nov 15, 2024

cscs-ci run default

@FlorianDeconinck FlorianDeconinck merged commit aeff1e3 into GridTools:main Nov 15, 2024
39 checks passed
@romanc romanc deleted the romanc/cleanups branch November 25, 2024 14:51
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.

5 participants