-
Notifications
You must be signed in to change notification settings - Fork 4
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
API Refactoring to export symbols in submodules explicitly #51
Conversation
To the first item: the |
To the second item, currently users need to explicitly use |
Some clean-up jobs would be to modify relevant parts of the documentation & the examples (this is not necessary, because using submodules works too even with our API change, but maybe good for users to avoid confusions?). |
I suggest doing it in the most straightforward way. These "exotic" exports are only needed to generate functions for Cartesian grids with coordinate names # Grids
export coord, xcoord, ycoord, zcoord
export Δ, Δx, Δy, Δz
# other exports...
# GridOperators
export δ, δx, δy, δz
export ∂, ∂x, ∂y, ∂z
# other exports... |
Yeah, I should've done this long time ago, here it should be: KernelAbstractions.get_backend(arch::SingleDeviceArchitecture) = arch.backend which would remove the name clash |
Are we good to go with this one @utkinis ? |
As addressed in issue #44 , it would be desirable to refactor the current API and ship it with the next release of Chmy such that users can simply use
using Chmy
instead of concrete import of submodules as we have now. This PR starts with a state where all submodules have been refactored besides two, which we will adress below.With the aim to avoid the usage of additional
Reexport.jl
package, we followed a similar approach as used in Oceananigans.jl.The remaining things to do include the followings, I would like to discuss with @utkinis and @luraess and see how we want to best do it before further refactoring:
Grids
andGridOperators
, ➡️ accordingly remove usage ofusing Grids
andusing GridOperators
in the test suiteget_backend()
ofArchitectures
module name clashes withKernelAbstractions.jl
➡️ Thus is test suite the module is used explicitly yet