@@ -132,53 +132,51 @@ We follow PEP 8 with some modifications enforced by Ruff:
132132
133133### Docstring Format
134134
135- Use Google -style docstrings:
135+ Use NumPy -style docstrings:
136136
137137``` python
138138def function_name (param1 : str , param2 : int ) -> bool :
139- """ Brief description of function.
140-
139+ """ Brief one-line description of the function.
140+
141141 Longer description if needed, explaining the purpose
142142 and behavior of the function.
143-
143+
144144 Parameters
145145 ----------
146146 param1 : str
147147 Description of param1.
148148 param2 : int
149149 Description of param2.
150-
150+
151151 Returns
152152 -------
153153 bool
154154 Description of return value.
155-
155+
156156 Raises
157157 ------
158158 ValueError
159159 When invalid input is provided.
160-
160+
161161 Examples
162162 --------
163163 >>> function_name("test", 5)
164164 True
165165 """
166- pass
167166```
168167
169168### Type Hints
170169
171170Use type hints throughout:
172171
173172``` python
174- from typing import List, Dict, Optional
173+ from typing import Optional
175174
176175def process_data (
177- data : List [float ],
178- config : Optional[Dict [str , str ]] = None
179- ) -> Dict [str , float ]:
176+ data : list [float ],
177+ config : Optional[dict [str , str ]] = None ,
178+ ) -> dict [str , float ]:
180179 """ Process data with optional configuration."""
181- pass
182180```
183181
184182## Testing Guidelines
@@ -192,7 +190,7 @@ def process_data(
192190
193191### Test Coverage
194192
195- - Aim for >80% code coverage
193+ - Aim for > 80% code coverage on new code
196194- Test both success and failure cases
197195- Test edge cases and boundary conditions
198196- Use parametrized tests for multiple scenarios
@@ -201,12 +199,14 @@ Example:
201199
202200``` python
203201import pytest
202+ from shift import DistributionGraph, NodeModel
203+ from infrasys import Location
204204
205205@pytest.fixture
206206def sample_graph ():
207- """ Fixture providing a sample graph for testing ."""
207+ """ Fixture providing a graph with one node ."""
208208 graph = DistributionGraph()
209- # Setup graph
209+ graph.add_node(NodeModel( name = " n1 " , location = Location( x = - 97.3 , y = 32.7 )))
210210 return graph
211211
212212@pytest.mark.parametrize (" input,expected" , [
@@ -278,8 +278,8 @@ Include:
278278
279279## Questions and Support
280280
281- - ** Issues** : Use GitHub Issues for bugs and features
282- - ** Discussions** : Use GitHub Discussions for questions
281+ - ** Issues** : Use [ GitHub Issues] ( https://github.com/NREL-Distribution-Suites/shift/issues ) for bugs and feature requests
282+ - ** Discussions** : Use [ GitHub Discussions] ( https://github.com/NREL-Distribution-Suites/shift/discussions ) for questions
283283- ** Email** : Contact maintainers for sensitive issues
284284
285285## License
0 commit comments