| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@stevenhua0320 PR ready for review. Also are c++ functions involved in the scope of deprecation? |
Sorry, something went wrong.
|
We don't have to deprecate c++. Only the python API. |
Sorry, something went wrong.
There was a problem hiding this comment.
Please can you check that both versions of the functions, camelCase and snake_case, are tested. The camelCase test will just call the snake_case test, something like that.
Sorry, something went wrong.
|
I will wait for a more careful review from @stevenhua0320 but modulo my comments (I didn't check in detail) it looks great. |
Sorry, something went wrong.
|
@SYMSCAE It also looks good to me, sorry for the late response. @sbillinge ready for the workflow checking. |
Sorry, something went wrong.
|
I don't think these tests are quite right. What are they testing? I mean I know which function they are testing but what behavior? We have a more or less standard way of doing these deprecations tests so the best is if you can refer to some of Caden's work, for example in diffpy.structure |
Sorry, something went wrong.
They are testing if a deprecation warning is thrown and if the function call is redirected to the new function and delivers the same result. Sure, I will refer to his work and standardize it. |
Sorry, something went wrong.
| return | ||
|
|
||
| # | ||
| # def test_selectAtomType(self): |
There was a problem hiding this comment.
@sbillinge After examination, non of these deprecated functions is covered in previous tests separately. They're simply commented out placeholders, do we still need such tests?
Sorry, something went wrong.
There was a problem hiding this comment.
Please look at what @cadenmyers13 did in diffpy.utils and diffpy.srfit and diffpy.structure for ways to model this. I liked what he came up with and we want to basically conform to a standard to ease maintenance. But basically, if I remember correctly, we change the name of the actual test that tests the function so that it tests the new name, then we hard code a test function for the old name that simply is a lightweight wrapper that runs the other test. Thus the old name and the new name are being tested in the API but we don't duplicate code.
On your test too, as a general rule, we should always be susupicious about our test or our design when we have to mock in a test. Occasionaly it is necessary, but if can generally be avoided (Claude loves this kind of solution, I guess there is a ton of bad tests on the internet) and when not, it can indicate that we have a bad design and should look carefully at how we coded something. Finally, when we do mock, as a group standard, we like to use the pytest.mock (or pytest.mocker, I don't quite remember) interface so that all our code is consistent. Check other tests to figure out the standard.
Thanks so much!
Sorry, something went wrong.
|
@sbillinge Please see if this is what we want. By the way, do we have a targeted release version that we will remove these functions? If so we can use the deprecator so the code style is synchronized. |
Sorry, something went wrong.
|
@SYMSCAE Usually a major bump (the first number of X.X.X) because that signifies API breaking changes |
Sorry, something went wrong.
Your. I am on my phone so can't check but whatever the next major bump is with .0.0, so if we are at 3.something then use 4.0.0 |
Sorry, something went wrong.
|
Thanks, that's the ticket |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #168 +/- ##
==========================================
+ Coverage 98.97% 99.01% +0.03%
==========================================
Files 6 6
Lines 1270 1321 +51
==========================================
+ Hits 1257 1308 +51
Misses 13 13
|
Sorry, something went wrong.
|
congrats and thanks @SYMSCAE ! Great job getting that finalized. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR updates pre-commit dependencies, replaced internal camelCase functions with snake_case and deprecated public facing camelCase functions.