Skip to content

Deprecate child classes of Node #122

Deprecate child classes of Node

Deprecate child classes of Node #122

Triggered via pull request September 29, 2023 18:56
Status Success
Total duration 23s
Artifacts

lint.yml

on: pull_request
Run linters
12s
Run linters
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 1 warning
/home/runner/work/oemof-network/oemof-network/src/oemof/network/network/nodes.py#L63
_deprecation_warning = ( "Usage of {} is deprecated. Use oemof.network.Node instead." ) + class Bus(Node): def __init__(self, *args, **kwargs): warnings.warn( _deprecation_warning.format(type(self)), FutureWarning,
/home/runner/work/oemof-network/oemof-network/tests/test_network_classes.py#L339
assert self.es.nodes[1] == n2 n3 = Node(label="<TF1>", inputs=[n1], outputs=[n2]) self.es.add(n3) assert n3 in self.es.nodes + def test_deprecated_classes(): with pytest.warns(FutureWarning): Bus() with pytest.warns(FutureWarning): Sink()
Run linters
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-python@v1, samuelmeuli/lint-action@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/