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

Removal of Redundant Features in Libraries #minor #322

Merged
merged 14 commits into from
Oct 13, 2023

Conversation

anilbey
Copy link
Contributor

@anilbey anilbey commented Oct 13, 2023

Removal of Redundant Features in Libraries

Context:

This PR removes unused or untested features from active maintenance, aiming to cut down on the number of features we have to maintain and to make sure the ones we do keep are consistent in dealing with missing values, exceptions, and other edge cases that are currently compromising our scientific results.
It addresses the ongoing work documented in Issue #321.

Modifications:

  1. Removing LibV4:
    • LibV4 has a single function called peak_indices. LibV5 already has an improved version of it.
  2. Keeping Only depolarized_base in LibV3:
    • Only that feature is used and tested.
    • Rest of the features already exists in LibV5 and LibV1 (that are used and tested).
  3. Additional Removals and Replacements:
    • LibV1::peak_indices is removed, as the LibV5 implementation is in use.
    • LibV2::E6-E40 protocols are neither utilised nor tested; the membrane systems team uses the LibV7 implementation.
    • LibV1::spike_width1 is discarded, as LibV5::spike_half_width is in use.
    • LibV1::rest_voltage_value is removed, as LibV5::voltage_base is in use.
    • LibV1::min_AHP_values is removed as LibV5::min_AHP_values is in use.
    • LibV1::AHP_depth_abs is removed, as LibV5::AHP_depth_abs is in use.
    • LibV1::min_AHP_indices is removed, as LibV5::min_AHP_indices is in use.

Note:

While these features and functions are removed from active maintenance, it's important to note that their implementations remain accessible within the version control system, preserving the ability to revisit or reactivate them in future developments.

@codecov-commenter
Copy link

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (cd209f2) 53.59% compared to head (0d63178) 58.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #322      +/-   ##
==========================================
+ Coverage   53.59%   58.93%   +5.34%     
==========================================
  Files          30       29       -1     
  Lines        8426     7625     -801     
  Branches     3677     3135     -542     
==========================================
- Hits         4516     4494      -22     
+ Misses       1264      575     -689     
+ Partials     2646     2556      -90     
Files Coverage Δ
efel/cppcore/FillFptrTable.cpp 1.32% <ø> (+0.27%) ⬆️
efel/cppcore/LibV1.cpp 41.13% <ø> (+4.19%) ⬆️
efel/cppcore/LibV2.cpp 33.74% <ø> (+13.38%) ⬆️
efel/cppcore/LibV3.cpp 10.34% <ø> (+8.64%) ⬆️
efel/cppcore/cfeature.cpp 24.20% <ø> (+1.78%) ⬆️
tests/test_basic.py 99.56% <100.00%> (ø)

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

@AurelienJaquier
Copy link
Collaborator

Shouldn't we wait until we have E features merged from LibV7 before removing them?

@@ -1435,8 +1435,8 @@ def test_spikecount_stimint1():
spikecount_stimint + 2)


def test_spikecount_libv4peakindices():
"""basic: Test Spikecount in combination with LibV4 peak_indices"""
def test_spikecount_libv5peakindices():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't we just remove this test altogether with the DependencyV5_LibV4peakindices.txt file?
It is testing features that are no longer present.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes you're right. Initially I thought this test is different and it adds more value however it is using the same data and retrieving the same result as in test_peak_indices.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I deleted that and added another test for setDependencyFileLocation since we need a test for checking the case when setDependencyFileLocation works.

@anilbey
Copy link
Contributor Author

anilbey commented Oct 13, 2023

Shouldn't we wait until we have E features merged from LibV7 before removing them?

Good point. Since there were also no tests for the E features I removed them in the PR but we can wait actually. Shall I revert that single commit?

@AurelienJaquier
Copy link
Collaborator

Yes, let's revert that commit, and wait for LibV7 features to remove them

Copy link
Collaborator

@AurelienJaquier AurelienJaquier left a comment

Choose a reason for hiding this comment

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

Great! Looks good to me!

@anilbey
Copy link
Contributor Author

anilbey commented Oct 13, 2023

Alright merging... 🚀
With this change, there are no dead-code C++ feature implementations anymore. Each implemented C++ feature can now be called from the Python API.

@anilbey anilbey changed the title Removal of Redundant Features in Libraries Removal of Redundant Features in Libraries #minor Oct 13, 2023
@anilbey anilbey merged commit eb8c8a5 into BlueBrain:master Oct 13, 2023
6 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.

3 participants