This is the first in a series of pull requests to clean up the API of the main pymorize objects. Here, Rule objects are better documented.
Copilot Summary
This pull request includes several changes to the Rule class in src/pymorize/rule.py, focusing on encapsulation, documentation, and deprecation warnings. The most important changes include renaming the pipelines attribute to _pipelines and adding getter methods, enhancing method documentation, and adding deprecation warnings for certain methods.
Encapsulation and attribute access:
Renamed the pipelines attribute to _pipelines and added a pipelines property for controlled access. (src/pymorize/rule.py, [1][2][3][4]
Documentation improvements:
Added detailed docstrings to several methods, including get, set, from_dict, from_yaml, add_table, remove_table, add_input, add_data_request_variable, remove_data_request_variable, input_patterns, clone, and expand_drvs. (src/pymorize/rule.py, [1][2][3][4]
Deprecation warnings:
Added a deprecation warning to the to_yaml method, indicating it should be avoided. (src/pymorize/rule.py, src/pymorize/rule.pyR196-R199)
Dependency updates:
Imported the deprecation module to handle deprecation warnings. (src/pymorize/rule.py, src/pymorize/rule.pyL5-R6)
This is the first in a series of pull requests to clean up the API of the main pymorize objects. Here,
Rule
objects are better documented.Copilot Summary
This pull request includes several changes to the
Rule
class insrc/pymorize/rule.py
, focusing on encapsulation, documentation, and deprecation warnings. The most important changes include renaming thepipelines
attribute to_pipelines
and adding getter methods, enhancing method documentation, and adding deprecation warnings for certain methods.Encapsulation and attribute access:
pipelines
attribute to_pipelines
and added apipelines
property for controlled access. (src/pymorize/rule.py
, [1] [2] [3] [4]Documentation improvements:
get
,set
,from_dict
,from_yaml
,add_table
,remove_table
,add_input
,add_data_request_variable
,remove_data_request_variable
,input_patterns
,clone
, andexpand_drvs
. (src/pymorize/rule.py
, [1] [2] [3] [4]Deprecation warnings:
to_yaml
method, indicating it should be avoided. (src/pymorize/rule.py
, src/pymorize/rule.pyR196-R199)Dependency updates:
deprecation
module to handle deprecation warnings. (src/pymorize/rule.py
, src/pymorize/rule.pyL5-R6)