Skip to content
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

Vectorial model rewrite and update associated tests and documentation #336

Merged
merged 7 commits into from
Jun 14, 2023

Conversation

sjoset
Copy link
Contributor

@sjoset sjoset commented May 25, 2022

This is a rewrite of the vectorial model to utilize numpy where possible, assemble results neatly, and bring the results better in line with the fortran version.

All tests in sbpy/activity/gas/tests/test_core.py passed and flake8 was clear.

sbpy/activity/gas/core.py Outdated Show resolved Hide resolved
@mkelley mkelley added this to the v0.4 milestone May 24, 2023
@mkelley mkelley force-pushed the vectorial_model_rewrite branch from 06061f7 to cbd7eb0 Compare June 9, 2023 13:53
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Merging #336 (599d9da) into main (462f453) will increase coverage by 1.18%.
The diff coverage is 98.33%.

❗ Current head 599d9da differs from pull request most recent head b679364. Consider uploading reports for the commit b679364 to get more accurate results

@@            Coverage Diff             @@
##             main     #336      +/-   ##
==========================================
+ Coverage   75.65%   76.84%   +1.18%     
==========================================
  Files          78       78              
  Lines        6795     6978     +183     
==========================================
+ Hits         5141     5362     +221     
+ Misses       1654     1616      -38     
Impacted Files Coverage Δ
sbpy/activity/gas/core.py 97.54% <97.63%> (+6.92%) ⬆️
sbpy/activity/gas/tests/test_core.py 100.00% <100.00%> (+3.92%) ⬆️

... and 4 files with indirect coverage changes

@mkelley
Copy link
Member

mkelley commented Jun 9, 2023

@sjoset There are some lines of code not being covered by the tests. See the coverage report for details: https://app.codecov.io/gh/NASA-Planetary-Science/sbpy/pull/336/blob/sbpy/activity/gas/core.py Most of them are trivial branches, but the q_t parameter and the binned_production method are especially important. Never mind the scipy import tests and line 497 in the GasComa class, I'll get those separately.

@mkelley
Copy link
Member

mkelley commented Jun 9, 2023

That failing test will be addressed with #374

@mkelley mkelley self-requested a review June 10, 2023 12:28
Copy link
Member

@mkelley mkelley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make an entry for this update in CHANGES.rst under New Features, including the improvements and the new binned_production constructor? Also, add any API changes to the relevant section (e.g., angular_substeps was removed from VectorialModel).

Finally, remove the warning in the documentation (gas.rst).

Do you have or do you plan to have a citeable reference for the comparison to the FORTRAN version?


return N


@dataclass
class VMParent:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide a docstring for this and the other VM* data classes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are they meant to be used by users? If not, could you prefix them with "_" to indicate they are private to the submodule? Then the docstrings can just be one-line descriptions.

@mkelley
Copy link
Member

mkelley commented Jun 14, 2023

Thanks for the fixes and updates!

@mkelley mkelley merged commit 39451c6 into NASA-Planetary-Science:main Jun 14, 2023
@sjoset sjoset deleted the vectorial_model_rewrite branch November 21, 2023 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants