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

API changes: particleset.py and grid.py #1713

Merged
merged 15 commits into from
Oct 2, 2024
Merged

API changes: particleset.py and grid.py #1713

merged 15 commits into from
Oct 2, 2024

Conversation

VeckoTheGecko
Copy link
Contributor

@VeckoTheGecko VeckoTheGecko commented Sep 23, 2024

Contributes to #1695

Changes

  • API changes
  • Other
    • Updated test_deprecations.py structure (parity with the spreadsheet)
    • Updated pytest conf adding slow and flaky markers
    • skip MPI tests if MPI isn't installed

This PR makes many of the names in particleset.py and grid.py:

  • private - in the case where users are not expected to use them (attributes and methods), and
  • read only where edits to said variables would provide unexpected behaviour/side effects (attributes)

All privatisations are done in a non-breaking way, raising a deprecation warning.

The method/attributes affected are:

class name action
ParticleSet repeat_starttime make_private
ParticleSet repeatlon make_private
ParticleSet repeatlat make_private
ParticleSet repeatdepth make_private
ParticleSet repeatpclass make_private
ParticleSet repeatkwargs make_private
ParticleSet kernel make_private
ParticleSet interaction_kernel make_private
ParticleSet repeatpid make_private
ParticleSet active_particles_mask() make_private
ParticleSet compute_neighbor_tree() make_private
ParticleSet neighbors_by_index() make_private
ParticleSet neighbors_by_coor() make_private
ParticleSet monte_carlo_sample() make_private
ParticleSet error_particles make_private
ParticleSet num_error_particles make_private
Grid xi remove
Grid yi remove
Grid zi remove
Grid ti make_private
Grid lon read_only
Grid lat read_only
Grid time_origin read_only
Grid mesh read_only
Grid cstruct make_private
Grid cell_edge_sizes read_only
Grid zonal_periodic read_only
Grid zonal_halo read_only
Grid meridional_halo read_only
Grid lat_flipped make_private
Grid defer_load read_only
Grid lonlat_minmax read_only
RectilinearGrid lonlat_minmax read_only
Grid load_chunk make_private
Grid cgrid make_private
Grid child_ctypes_struct make_private
Grid gtype make_private
Grid xdim read_only
Grid ydim read_only
Grid zdim read_only
Grid z4d make_private
Grid depth read_only
Grid check_zonal_periodic() make_private
Grid add_Sdepth_periodic_halo() make_private
Grid computeTimeChunk() make_private
Grid update_status make_private
Grid chunk_not_loaded make_private
Grid chunk_loading_requested make_private
Grid chunk_loaded_touched make_private
Grid chunk_deprecated make_private
Grid chunk_loaded make_private
RectilinearGrid lon read_only
RectilinearGrid xdim read_only
RectilinearGrid lat read_only
RectilinearGrid ydim read_only
RectilinearGrid lat_flipped make_private
RectilinearGrid zonal_periodic read_only
RectilinearGrid zonal_halo read_only
RectilinearGrid meridional_halo read_only
RectilinearZGrid gtype make_private
RectilinearZGrid depth read_only
RectilinearZGrid zdim read_only
RectilinearZGrid z4d make_private
RectilinearSGrid gtype make_private
RectilinearSGrid depth read_only
RectilinearSGrid zdim read_only
RectilinearSGrid z4d make_private
RectilinearSGrid xdim read_only
RectilinearSGrid ydim read_only
RectilinearSGrid lat_flipped make_private
CurvilinearGrid lon read_only
CurvilinearGrid xdim read_only
CurvilinearGrid ydim read_only
CurvilinearGrid lat read_only
CurvilinearGrid zonal_periodic read_only
CurvilinearGrid zonal_halo read_only
CurvilinearGrid meridional_halo read_only
CurvilinearZGrid gtype make_private
CurvilinearZGrid depth read_only
CurvilinearZGrid zdim read_only
CurvilinearZGrid z4d make_private
CurvilinearSGrid gtype make_private
CurvilinearSGrid depth read_only
CurvilinearSGrid zdim read_only
CurvilinearSGrid z4d make_private
CurvilinearSGrid xdim read_only
CurvilinearSGrid ydim read_only

@VeckoTheGecko VeckoTheGecko force-pushed the v/api2 branch 2 times, most recently from c6c51d9 to 0e57537 Compare September 27, 2024 08:45
@VeckoTheGecko VeckoTheGecko marked this pull request as ready for review September 30, 2024 16:40
@VeckoTheGecko VeckoTheGecko changed the title [WIP] API changes: particleset.py and grid.py API changes: particleset.py and grid.py Sep 30, 2024
@VeckoTheGecko VeckoTheGecko disabled auto-merge October 2, 2024 14:09
@VeckoTheGecko VeckoTheGecko merged commit a1f76d2 into master Oct 2, 2024
13 of 14 checks passed
@VeckoTheGecko VeckoTheGecko deleted the v/api2 branch October 2, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants