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

docs: add docstrings for on_d, on_q, on_tth, and dump #307

Merged
merged 3 commits into from
Dec 31, 2024

Conversation

yucongalicechen
Copy link
Contributor

closes #306
@sbillinge ready for review

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (0a3241b) to head (dd5995b).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #307   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          516       516           
=========================================
  Hits           516       516           

Copy link
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

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

brilliatn @yucongalicechen . Please see a couple of small edits.


Returns
-------
(xarray, yarray) : tuple of ndarray
Copy link
Contributor

Choose a reason for hiding this comment

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

let's change xarray to q-array to be explicit. And also below, xarray-> tth-array and so on. Just to make it really clear.


Parameters
----------
filepath : str
Copy link
Contributor

Choose a reason for hiding this comment

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

non programmers may not know that that the path includes the filename. Best here is to give an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbillinge added in the new commit. please review

Copy link
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

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

nice! One last request.

To save a diffraction object to a file named "diffraction_data.chi" with
the independent variable 'q':

>>> file = "diffraction_data.chi"
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's also have another example, that shows a relative path. I think that should then be clear enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds great! I'll add that.

@sbillinge sbillinge merged commit 5daab78 into diffpy:main Dec 31, 2024
5 checks passed
@yucongalicechen yucongalicechen deleted the docstring branch December 31, 2024 22:07
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.

docs: docstring for on_d, on_q, on_tth, and dump are missing
2 participants