Halo circular velocity function from Maller & Bullock 2004#284
Closed
sarahbridle wants to merge 25 commits intoskypyproject:mainfrom
Closed
Halo circular velocity function from Maller & Bullock 2004#284sarahbridle wants to merge 25 commits intoskypyproject:mainfrom
sarahbridle wants to merge 25 commits intoskypyproject:mainfrom
Conversation
…r issues to come back to at the end of the comments though
rrjbca
requested changes
Sep 24, 2020
Contributor
rrjbca
left a comment
There was a problem hiding this comment.
Great start! A few suggestions to improve the code:
- We prefer to avoid abbreviations in variable names where practical, so
Mshould probably be renamedmass - We try to use astropy units where appropriate. So you should do
from astropy.units import Unitand then e.g.96.6 * Unit('km s-1')and(mass.to_value('Msun') / 1e11) - Use
cosmology.hrather thancosmology.H0 / 100. This also has the correct units. - We need a test for the function. See e.g. test_carroll for a simple example of writing tests. Create a new file
skypy/halo/tests/test_properties.pyand write a functiontest_circular_velocity. An easy test would be to choose the arguments such that each bracket in the function equals one and check that the returned value equals 96.6 km/s. Perhaps you can think of others - There are some trivial formatting issues relating to whitespace/tabs/blank lines etc. At the bottom of the pull request next to "codeclimate" click "details" to see the suggestions
Lucia-Fonseca
requested changes
Sep 28, 2020
Member
Lucia-Fonseca
left a comment
There was a problem hiding this comment.
It needs some changes and tests.
Please, take this review as suggestions.
Member
|
We should update the description to link with the correspondent issue. |
Co-authored-by: Lucia-Fonseca <55983939+Lucia-Fonseca@users.noreply.github.com>
Co-authored-by: Lucia-Fonseca <55983939+Lucia-Fonseca@users.noreply.github.com>
…g news headlines so please check!
…ject#423) Co-authored-by: Richard R <58728519+rrjbca@users.noreply.github.com>
Contributor
|
Replaced with #529 to change target branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist