Skip to content

Conversation

@VeckoTheGecko
Copy link
Contributor

@VeckoTheGecko VeckoTheGecko commented Oct 9, 2024

Contributes to #1695

Changes

  • API changes

This PR makes many of the names in particlefile.py (and some other files):

  • private - in the case where users are not expected to use them (attributes and methods),
  • read only where edits to said variables would provide unexpected behaviour/side effects (attributes), or
  • removed (where they are either legacy code, or there are better mechanisms to achieve the same result)

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

The method/attributes affected are:

Class Method/Attribute Action
ParticleSet iterator() remove
ParticleData iterator() remove
ParticleFile add_metadata() remove
ParticleFile write_once() make_private
ParticleFile create_new_zarrfile read_only
ParticleFile outputdt read_only
ParticleFile chunks read_only
ParticleFile particleset read_only
ParticleFile fname read_only
ParticleFile vars_to_write read_only
ParticleFile time_origin read_only
ParticleFile parcels_mesh make_private
ParticleFile maxids make_private
ParticleFile pids_written make_private
ParticleFile mpi_rank make_private
ParticleFile fill_value_map make_private
ParticleFile analytical make_private (+rename)
Grid lon_grid_to_target() remove
Grid lon_remapping remove
Grid lon_grid_to_source() remove
Grid lon_particle_to_target() remove
Variable name read_only

@VeckoTheGecko VeckoTheGecko force-pushed the v/api branch 2 times, most recently from 961bbb3 to a45a6ab Compare October 10, 2024 11:19
@VeckoTheGecko VeckoTheGecko changed the title [WIP] API changes API changes: particlefile.py and other touchups Oct 14, 2024
@VeckoTheGecko VeckoTheGecko marked this pull request as ready for review October 14, 2024 10:16
@VeckoTheGecko
Copy link
Contributor Author

VeckoTheGecko commented Oct 14, 2024

Once this is merged, I'll do some testing with the team, and then we're good to do a release (from the API POV)

VeckoTheGecko and others added 11 commits October 22, 2024 10:31
mark ParticleFile.add_metadat() for removal
mark ParticleFile.write_once() as private
create_new_zarrfile
outputdt
chunks
particleset
fname
vars_to_write
time_origin
parcels_mesh
maxids
pids_written
mpi_rank
fill_value_map
analytical
lon_grid_to_target()
lon_remapping
lon_grid_to_source()
lon_particle_to_target()
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.

3 participants