Deltares / Deltares/imod-python

Use @deprecated decorator for deprecated classes.

Open
#1,468 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
41
Forks
12
Avg merge
21h 8m
Merged PRs (30d)
1

Description

@Manangka came with this good suggestion in PR https://github.com/Deltares/imod-python/pull/1463 to mark deprecated functions/classes:

https://deprecated.readthedocs.io/en/latest/sphinx_deco.html#more-elaborate-example

But unfortunately when I tried it, I got a weird error message from sphinx autosummary:

sphinx.errors.ExtensionError: Handler <function process_generate_options at 0x00000178ADD19580> for event 'builder-inited' threw an exception (exception: no module named imod.evaluate)

But as far as I could tell, there normally is no issue with this module, the API docs for this module render fine.
As a builtin deprecated decorator will be included somewhere in Python >3.13, it is something interesting to pursue then.

Contributor guide

No contributing guide indexed for this repository

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

Start by reviewing PR 1463 and the deprecated decorator's Sphinx example, then reproduce the Sphinx autosummary build that reports the missing imod.evaluate module. Done means deprecated classes use the decorator without that autosummary error and the affected API documentation still renders.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.