-
Notifications
You must be signed in to change notification settings - Fork 14
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
Refactor api #89
Refactor api #89
Conversation
Codecov Report
@@ Coverage Diff @@
## main #89 +/- ##
==========================================
- Coverage 77.79% 71.46% -6.33%
==========================================
Files 25 30 +5
Lines 671 729 +58
==========================================
- Hits 522 521 -1
- Misses 149 208 +59
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I'll review this, but we should try to add deprecations to all changed names, and move all deprecations to a top-level file |
Done. I've never used deprecations before, so I'm not sure if I did this correctly. I know |
@Datseris How will the deprecations work when we push a new breaking change? When using the |
It's because of Julia's debetable decision that if you open julia without any special arguments the warnings from |
If deprecation maintains the old functionality automatically, maybe it's just fine keeping the @deprecate We can state in the changelog that function names have updated. |
Okay, then let's settle with the |
@Datseris I'll be away until mid next week, so I most likely won't have time to do any changes to Entropies.jl until then. Feel free to add the update message and merge the if you're happy with the current state of the PR. Otherwise, I'll pick up on it next week. |
Thanks a lot for your work! I'll definitely push some commits here in the meantime! |
I am particularly unhappy about the existence of "Shannon entropies", and I believe that it goes against our educational goal of making people understand that "for methods that first compute a probability, and then an entropy, they aren't new entropies, just new probability estimators". I am okay with having the convenience functions like Instead, I propose a section in the |
I don't think it makes sense for us to define a convenience function I don't think packages should provide such incredible level of convenience, it is bad for maintanance and there is a point where the hit to the learning curve is just stronger than the convenience. When I write a 2 lines of code covenience function for using in my code, that only uses Julia Base functions, I don't think "oh this should have been a function already defined in Julia", and I don't expect it to. The users should think the same. It is better to know "Oh I know how to create the convenience function that gives me the amplitude weighted permutation entropy in 2 lines of code", than to think "hm, does this package export a function that computes the ...". |
Okay I've refactored this with my changes. There are things missing, and some files are incomplete, and I'm not sure where the new methods go. They also need to go into the changelog. Anyways, feel free to go ahead and review/critique my changes. |
* add code and docstring for spectral entropy * add docs
I added one more estimator (power spectrum) via a PR. |
@kahaaga I'll need your help to fix the tests. They are about the in-place entropy form that I admit, I never really learned... BTW, it is not useful to test interface tests more than once. If we test |
Wait, are the "Sample entropy EDIT: Oh yes, all of these stuff are in pull requests. |
Correct. I haven't touched these since I first implemented them. I wanted to decide finally on the new API first.
I will review this PR tomorrow. |
* Equivalent to, not equivalent with * Include dispersion entropy * Clearer wording * Symbolization routines need to be imported before estimators using them * Export in-place version. * Follow Julia's linting conventions * Run CI on all pull requests * Don't export in-place version * Missing a letter
What is this PR?
A major refactoring of the codebase and documentation, as discussed in #81 and various PRs leading up to that.
Which changes are included?
There are a lot of changes in terms of file count, but few actual changes to internal code. The easiest way to get an overview is to build the docs locally and have a look.
If we go for the API in this PR, I can also easily fix #84