Skip to content

API: Decide on keyword only API - #2832

Merged
VeckoTheGecko merged 5 commits into
Parcels-code:mainfrom
VeckoTheGecko:keyword-only
Aug 17, 2026
Merged

API: Decide on keyword only API#2832
VeckoTheGecko merged 5 commits into
Parcels-code:mainfrom
VeckoTheGecko:keyword-only

Conversation

@VeckoTheGecko

@VeckoTheGecko VeckoTheGecko commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

I was looking through the tutorial to see how we're using our functions, and to decide on which API should be keyword only. These are my thoughts

  • parcels.FieldSet.from_sgrid_conventions
    • make mesh, vector_fields, skip_field_data_validation keyword only
  • parcels.FieldSet.from_ugrid_conventions
    • make mesh, vector_fields keyword only
  • parcels.ParticleSet.__init__
    • make particle initial values keyword only
  • ParticleFile.__init__
    • leave as is (minimal chance of confusion)
  • the rest - keep as is

This is a bit subjective. Happy to discuss if you have other thoughts @erikvansebille

Checklist

AI Disclosure

None used

@VeckoTheGecko

VeckoTheGecko commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

(I still need to update the test suite and the docs, but that is quite straightforward)

EDIT: Done

@erikvansebille erikvansebille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yep I agree with this list. PR looks good

@VeckoTheGecko
VeckoTheGecko enabled auto-merge (squash) August 17, 2026 10:37
@VeckoTheGecko
VeckoTheGecko merged commit 445b0f7 into Parcels-code:main Aug 17, 2026
15 of 16 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Parcels development Aug 17, 2026
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.

Enforcing keyword-only arguments in certain API

2 participants