Skip to content

refactor[cartesian|next] Move imports of implementation down one level#2045

Merged
FlorianDeconinck merged 2 commits into
GridTools:mainfrom
FlorianDeconinck:feature/move_next_cartesian_import_down
May 22, 2025
Merged

refactor[cartesian|next] Move imports of implementation down one level#2045
FlorianDeconinck merged 2 commits into
GridTools:mainfrom
FlorianDeconinck:feature/move_next_cartesian_import_down

Conversation

@FlorianDeconinck
Copy link
Copy Markdown
Contributor

Description

As it stands now we have gt4py.cartesian and gt4py.next default importing themselves into the top level init.py . Now it isn't an issue per se, but it's a double import of a lot of files that ultimately will rarely be used in concert.

This proposes to remove the "all" import and rely on users to actually call gt4py.next and gt4py.cartesian which I expect is the common case anyway.

Requirements

  • All fixes and/or new features come with corresponding tests.
  • Important design decisions have been documented in the appropriate ADR inside the docs/development/ADRs/ folder.

Describe how to access implementation sub-package
Copy link
Copy Markdown
Contributor

@egparedes egparedes left a comment

Choose a reason for hiding this comment

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

Just a typo.

Comment thread src/gt4py/__init__.py Outdated
Co-authored-by: Enrique González Paredes <enriqueg@cscs.ch>
@FlorianDeconinck FlorianDeconinck merged commit 759d90a into GridTools:main May 22, 2025
31 checks passed
@FlorianDeconinck FlorianDeconinck deleted the feature/move_next_cartesian_import_down branch May 22, 2025 14:36
stubbiali pushed a commit to stubbiali/gt4py that referenced this pull request Aug 19, 2025
GridTools#2045)

## Description

As it stands now we have `gt4py.cartesian` and `gt4py.next `default
importing themselves into the top level __init__.py . Now it isn't an
issue per se, but it's a double import of a lot of files that ultimately
will rarely be used in concert.

This proposes to remove the "all" import and rely on users to actually
call `gt4py.next` and `gt4py.cartesian` which I expect is the common
case anyway.

## Requirements

- [ ] All fixes and/or new features come with corresponding tests.
- [ ] Important design decisions have been documented in the appropriate
ADR inside the [docs/development/ADRs/](docs/development/ADRs/README.md)
folder.

---------

Co-authored-by: Enrique González Paredes <enriqueg@cscs.ch>
stubbiali pushed a commit to stubbiali/gt4py that referenced this pull request Aug 19, 2025
GridTools#2045)

## Description

As it stands now we have `gt4py.cartesian` and `gt4py.next `default
importing themselves into the top level __init__.py . Now it isn't an
issue per se, but it's a double import of a lot of files that ultimately
will rarely be used in concert.

This proposes to remove the "all" import and rely on users to actually
call `gt4py.next` and `gt4py.cartesian` which I expect is the common
case anyway.

## Requirements

- [ ] All fixes and/or new features come with corresponding tests.
- [ ] Important design decisions have been documented in the appropriate
ADR inside the [docs/development/ADRs/](docs/development/ADRs/README.md)
folder.

---------

Co-authored-by: Enrique González Paredes <enriqueg@cscs.ch>
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.

2 participants