Skip to content

Conversation

@bobleesj
Copy link
Contributor

No description provided.


@pytest.mark.parametrize(
"q, expected_d",
"q, expected_d, warning_expected",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am thinking having warning_expected explicitly provides a quick overview whether each test case provides a warning or not. @sbillinge how do you like it?

@bobleesj
Copy link
Contributor Author

@sbillinge ready for review - again bite size PR

@codecov
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (27f433d) to head (765c9e2).
Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #260   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines          380       387    +7     
=========================================
+ Hits           380       387    +7     
Files with missing lines Coverage Δ
tests/test_transforms.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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.

pls see inline

@@ -0,0 +1,23 @@
**Added:**

* No news added
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this woul benefit from a news.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

# UC1: User specified empty q values
(np.array([]), np.array([])),
# UC2: User specified valid q values
# Case 1: empty q values, expect empty d values
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 put a high level contextual statement always to make it easier to review. To see what I mean you could look at my edits to the PR on scale_to and eq.

Here it would be something like

# test conversion of q to d with good values
# Case 1: empty q values, expect empty d values

...

# Case 2: valid q values, expect d values without warning

...

Case 3.  valid q values containing 0, expect d values with divide by zero warning 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@bobleesj
Copy link
Contributor Author

pls see inline

@sbillinge ready for review - added higher-level test comment and also news file.

There are still two dozen warnings. I will address them in separate PRs.

@sbillinge sbillinge merged commit 5422809 into diffpy:main Dec 21, 2024
5 checks passed
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