NCAS-CMS / NCAS-CMS/cf-python

API review for version 4.0.0: thoughts, ideas, linked Issues, etc.

Open
#776 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API review (4.0.0) enhancement
Dominant language
Python
Stars
150
Forks
23
Avg merge
1d 11h
Merged PRs (30d)
2

Description

This Issue is to collate and register any comments (thoughts, ideas, tentative decisions, questions, etc.) including links to self-contained related Issues, regarding the cf-python API (and perhaps the API of cfdm too, also keeping cf-plot and it's eventual incorporation into cf-python in mind).

The context, for those unaware, is that we will be reviewing and revising the API for a forthcoming version 4.0.0, which we hope to release by the end of 2024. Anything anyone wants to register on the topic of the cf-python API is very welcome! Brain dumps are welcome, though we may want to move distinct topics to their own Issues and link them in, if themes emerge.

Useful references are:


Please try to organise points/discussion as we go along into topics and themes, noting them below (ideally linking to comments and/or Issues). Anyone contributing to the thread feel free to edit/update this.

Topics and themes

  • conforming to the Python Array API standard (see link above)
  • deprecated objects:
    • ensure all deprecation errors include stating replacements, else messages to indicate why there isn't one any longer (etc.) - should only be a small number of cases that don't abide by this already.
  • views/representations of fields/datasets:
    • including identical data in different formats, #775.
    • truncation for long FieldLists, arrays, etc., #772.
  • (methods for) conversion to/from other formats:
    • xarray, #773
  • availability of methods on given objects vs. module-level, #277
  • level of support for NumPy-like operations (generalising sentiment in #328)
    • more binary operations (now we are well-daskified), #38
  • ensuring sets of related methods have full coverage, esp. pairs e.g. minima and maxima such as argmax and argmin (see https://github.com/NCAS-CMS/cf-python/issues/135)
  • aliases e.g. for longer method names - when to use, what to use and how to document (including should we have a big table listing these?)
  • simplifications in general - what can sensibly be streamlined?
  • verbosity and logging (e.g. which methods deserve a verbose keyword)
    • getting all outputs managed under the logging umbrella, #286.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This is a broad API review rather than a scoped implementation task. Start by reading the Python Array API Standard and the linked issues #775, #772, #773, #277, #328, #38 and #135, then review the listed topics and related cf-python API discussions. There is no single completion criterion; actionable topics would need to be separated into focused issues with defined outcomes.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
api, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.