Support date-specific utility methods

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python
Domain
api

Research direction

Start by reading the existing date-type support in cfpint and comparing the relevant operations and API details in cf_units and cftime. Define the behavior and naming for num2date, date2num, and is_date, including calendar handling, then add documentation and tests that establish the chosen public API.

Written by the indexing model from the issue text.

Description

It would seem that, as we explcitly support date-type methods, we should back that up with convenience methods like the ones in cf_units. Probably at least :

  • num2date
  • date2num
  • is_date

I.E. we could just require the user to use cftime directly,
but it is probably both more convenient and clearer to expose the operations directly in cfpint.

We don't necessarily want to copy the names or all API details from cf_units / cftime.
In fact, it is probably clearer not to. Cf. cf_unit "calendar" vs cfpint "calendar_string"

(aside: calendar_string is probably better called "calendar_name" -- see #6 )

Dominant language
Python
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from SciTools/cfpint

All issues in SciTools/cfpint

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.