Skip to content

[REFACTOR] Clean up chainladder.__init__.py #856

Closed
7 of 7 issues completed
Closed

Description

@genedan

Description

Currently working on this, I was trying to clean up some repetitive code:

_DT64_DTYPE = pd.to_datetime(["2000-01-01"]).dtype
_ULT_VAL: str = str(
pd.Timestamp("2262-01-01") - \
pd.Timedelta(1, unit=np.datetime_data(_DT64_DTYPE)[0])
)
class Options:
ARRAY_BACKEND = "numpy"
AUTO_SPARSE = True
ARRAY_PRIORITY = ["dask", "sparse", "cupy", "numpy"]
ULT_VAL: str = _ULT_VAL
DT64_UNIT: str = np.datetime_data(_DT64_DTYPE)[0]
DT64_DTYPE: str = str(_DT64_DTYPE)

but this revealed other tasks that we'll have to address via multiple PRs. These would include but are not limited to:

  • validation or deprecation of Options.get_option
  • deprecation of auto_sparse and auto_backend
  • add Options.reset_... for each option.

Is your feature request aligned with the scope of the package?

  • Yes, absolutely!
  • No, but it's still worth discussing.
  • N/A (this request is not a codebase enhancement).

Describe the solution you'd like, or your current workaround.

I will reorganize Options with an init, and set the attributes to be assigned to the instance rather than class.

Do you have any additional supporting notes?

No response

Activity

  1. added this to the 0.9.3 milestone on May 26, 2026
  2. self-assigned this
    on May 26, 2026
  3. added theissue type on May 26, 2026
  4. moved this from Backlog to In progress in Chainladder-Python Project Boardon May 26, 2026
  5. added a commit that references this issue on May 27, 2026
  6. 4 remaining items

  7. added 3 commits that reference this issue on Jun 3, 2026
  8. henrydingliu commented on Jun 17, 2026

    @henrydingliu
    Member

    @genedan is this done?

  9. genedan commented on Jun 17, 2026

    @genedan
    MemberAuthor

    Yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

Medium

Effort

Low

Scope

Codebase

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions