Skip to content

Implement support for deprecating components#316

Merged
simu merged 2 commits into
masterfrom
feat/component-deprecation
May 7, 2021
Merged

Implement support for deprecating components#316
simu merged 2 commits into
masterfrom
feat/component-deprecation

Conversation

@simu

@simu simu commented May 7, 2021

Copy link
Copy Markdown
Member

This PR introduces a new component parameter _metadata which is defined as constant in the component template. When adding the parameter to existing components users are responsible to ensure that they mark the parameter as constant (with the = prefix).

Further, this PR changes Commodore will print out deprecation notices for all components for which parameters.<component-name>._metadata.deprecated is True.

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Update the documentation.
  • Update tests.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog

@simu simu added the enhancement New feature or request label May 7, 2021
@simu simu requested a review from ccremer May 7, 2021 14:43
@simu simu force-pushed the feat/component-deprecation branch 3 times, most recently from 0a13c4c to 32a85d8 Compare May 7, 2021 14:50
@simu simu self-assigned this May 7, 2021

@ccremer ccremer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall LGTM

Comment thread commodore/config.py Outdated
@simu simu force-pushed the feat/component-deprecation branch from 32a85d8 to a651988 Compare May 7, 2021 15:27
This commit introduces a new component parameter `_metadata` which is
defined as constant in the component template. When adding the parameter
to existing components users are responsible to ensure that they mark
the parameter as constant (with the `=` prefix).

Further, this commit changes Commodore will print out deprecation
notices for all components for which
`parameters.<component-name>._metadata.deprecated` is `True`.
@simu simu force-pushed the feat/component-deprecation branch from a651988 to 4839f3b Compare May 7, 2021 15:34
This commit changes the previous `deprecation_guide` field in the
component metadata with a field `deprecation_notice` which can contain
free-form text and is appended verbatim to the component deprecation
notice.
@simu simu requested a review from ccremer May 7, 2021 15:52
@simu simu merged commit 5c91760 into master May 7, 2021
@simu simu deleted the feat/component-deprecation branch May 7, 2021 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants