OceanParcels / Parcels

Main code for Parcels (Probably A Really Computationally Efficient Lagrangian Simulator)
https://www.oceanparcels.org
MIT License
297 stars 139 forks source link

API changes: `particlefile.py` and other touchups #1727

Closed VeckoTheGecko closed 1 month ago

VeckoTheGecko commented 1 month ago

Contributes to #1695

Changes


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

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 commented 1 month ago

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)