-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean docstrings and refs #256
Conversation
Codecov Report
@@ Coverage Diff @@
## main #256 +/- ##
==========================================
+ Coverage 86.84% 87.62% +0.78%
==========================================
Files 49 48 -1
Lines 5496 5739 +243
Branches 1372 1438 +66
==========================================
+ Hits 4773 5029 +256
+ Misses 462 440 -22
- Partials 261 270 +9
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, but I would rather revert the set
change to pd.unique
before merging, as per my comment above.
@@ -446,8 +439,7 @@ def leg_ratio_p(self) -> np.array: | |||
@property | |||
def diversion_factors(self) -> np.array: | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you re-introducing long lines here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstrings wrap in tooltips etc. anyway, so it is better to write them more "naturally" and let the downstream tools to decide where the linebreaks are.
I tend to opt to set linebreaks at the end of sentences. This also helps to ensure you're not accidentally writing excessively long sentences (as you can visually parse the length of your sentences quickly). This is good because long sentences will lead to poor information transfer!
There's obviously a compromise with legibility in the code itself (lines that are too long might be difficult to parse). This is partially solved by keeping sentences short. But also most IDEs allow line wrapping which will automatically deal with long docstring lines.
A few things changed here:
DiscretionaryTrip
.Checklist
Any checks which are not relevant to the PR can be pre-checked by the PR creator.
All others should be checked by the reviewer(s).
You can add extra checklist items here if required by the PR.