Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ghwilliams
Copy link
Contributor

@ghwilliams ghwilliams commented Oct 12, 2023

@dccowan Please take a look at this tentative improvement of the documentation.

Summary

Add proper docstrings to classes and methods in data_misfit.py and objective_function.py.

PR Checklist

  • If this is a work in progress PR, set as a Draft PR
  • Linted my code according to the style guides.
  • Added tests to verify changes to the code.
  • Added necessary documentation to any new functions/classes following the
    expect style.
  • Marked as ready for review (if this is was a draft PR), and converted
    to a Pull Request
  • Tagged @simpeg/simpeg-developers when ready for review.

Reference issue

What does this implement/fix?

Additional information

Objective Function Pieces. Overal I tried to give better
 - descriptions for classes/methods/attributes
 - punctuation marks corrections.
@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5231446) 82.30% compared to head (25271df) 82.30%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1292   +/-   ##
=======================================
  Coverage   82.30%   82.30%           
=======================================
  Files         165      165           
  Lines       25241    25241           
=======================================
  Hits        20775    20775           
  Misses       4466     4466           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ghwilliams
Copy link
Contributor Author

ghwilliams commented Oct 14, 2023

I've just noticed that I missed some corrections, I need to work a bit more on it before this PR really gets ready. I plan to have it finished before the next weekly meeting.

@ghwilliams ghwilliams changed the title Documentation improvents for classes in Objective Function Pieces Documentation improvements for classes in Objective Function Pieces Oct 15, 2023
Making sure everything is numpy style.
@ghwilliams
Copy link
Contributor Author

I've finished what I think was necessary for this PR to be ready for a review.

@dccowan dccowan self-assigned this Nov 24, 2023
@dccowan
Copy link
Member

dccowan commented Nov 28, 2023

@ghwilliams please add summary and keep PR checklist up to date. Suggest:

Summary: Add proper docstrings for data_misfit.py and objective_function.py (and simulation.py?)

@lheagy lheagy added this to the 0.21.0 milestone Nov 29, 2023
Copy link
Member

@santisoler santisoler left a comment

Choose a reason for hiding this comment

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

Huge thanks @ghwilliams! Awesome job adding all these docstrings. Users will greatly appreciate it.

I've added a few minor suggestions, mostly corrections to LaTeX equations and some changes to follow numpydocs style.

Feel free to commit the suggestions, or make your own changes if you think they could be improved. Let me know what do you think.

I'm looking forward to merge this and see you in the contributors list! 🚀

@ghwilliams
Copy link
Contributor Author

ghwilliams commented Dec 7, 2023

Thanks @santisoler . I'll review everything and talk to @dccowan to see if we can consider it ready to be merged or if it still needs any corrections.

@santisoler
Copy link
Member

Thanks @ghwilliams for applying all the suggestions. I think this is ready to be merged. I've just updated the branch with the latest changes in main. We shall wait CI (automated checks and tests) to pass and then we should merge it 🚀

Thanks again for the contributions! They are greatly appreciated!

@santisoler
Copy link
Member

Thanks @ghwilliams for all the effort of writing these docstrings! Your contributions are greatly appreciated!

I'm merging this! 🚀

@santisoler santisoler merged commit 51fcf3c into simpeg:main Jan 11, 2024
thibaut-kobold added a commit to KoBoldMetals/simpeg that referenced this pull request Jan 22, 2024
* main:
  Fix typo in error messages (simpeg#1324)
  Update test_regularization.py to test vector derivatives. Update AmplitudeSmoothnessFirstOrder in vector.py so that the call matches the derivative.
  Move `__init__` in `BaseSimulation` to the top of the class (simpeg#1323)
  Bump versions of flake8 and black and pin flake plugins (simpeg#1330)
  Update test_regularization.py to test vector derivatives. Update AmplitudeSmoothnessFirstOrder in vector.py so that the call matches the derivative.
  Update test_regularization.py to test vector derivatives. Update AmplitudeSmoothnessFirstOrder in vector.py so that the call matches the derivative.
  Add `weights_keys` method to `BaseRegularization` (simpeg#1320)
  Fix description of source_field in gravity survey (simpeg#1322)
  Documentation improvements for classes in Objective Function Pieces (simpeg#1292)

# Conflicts:
#	tests/base/regularizations/test_regularization.py
@ghwilliams ghwilliams deleted the Doc_ObjectiveFunctionPieces branch May 16, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants