BlueBrain / BlueCelluLab

Biologically detailed neural network simulations and analysis API
https://bluecellulab.readthedocs.io/en/latest/
Other
8 stars 12 forks source link

remove examples from package distribution #175

Closed anilbey closed 2 months ago

anilbey commented 2 months ago

@mgeplf noticed the bluecellulab package is quite large. This change excludes the /examples directory that is ~20MB.

The package size is reduced from 69MB to 48MB.

Before

❯ dust                                                                                                                                                                            ─╯
4.6M         ┌── components                           │                                                                                   ░░░░░░░░░░░░░░░░░░░░░░░░░░░▓████████ │   7%
4.9M       ┌─┴ circuit_sonata_quick_scx_multi_circuit │                                                                                   ░░░░░░░░░░░░░░░░░░░░░░░░░░░█████████ │   7%
5.2M     ┌─┴ 2-sonata-network                         │                                                                                   ░░░░░░░░░░░░░░░░░░░░░░░░░░░█████████ │   8%
 11M     │   ┌── 011017HP2.asc                        │                                                                                   ░░░░░░░░░░░░░░░█████████████████████ │  17%
 11M     │ ┌─┴ morphology                             │                                                                                   ░░░░░░░░░░░░░░░█████████████████████ │  17%
 11M     ├─┴ 4-epsp                                   │                                                                                   ░░░░░░░░░░░░░░░█████████████████████ │  17%
 20M   ┌─┴ examples                                   │                                                                                   ████████████████████████████████████ │  29%
3.7M   │   ┌── circuit_sonata_quick_scx               │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███████ │   5%
3.6M   │   │   ┌── CircuitA                           │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓███████ │   5%
4.6M   │   │ ┌─┴ components                           │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓████████ │   7%
4.9M   │   ├─┴ circuit_sonata_quick_scx_multi_circuit │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█████████ │   7%
 11M   │   │   ┌── cell.asc                           │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█████████████████████ │  17%
 11M   │   │ ┌─┴ morphology                           │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█████████████████████ │  17%
 11M   │   ├─┴ hippocampus_opt_cell_template          │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█████████████████████ │  17%
4.2M   │   │   ┌── edges.h5                           │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████ │   6%
4.2M   │   │ ┌─┴ edges                                │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████ │   6%
 17M   │   │ │ ┌── morphologies                       │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓██████████████████████████████ │  25%
 17M   │   │ ├─┴ components                           │                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓██████████████████████████████ │  25%
 22M   │   ├─┴ circuit_hipp_mooc_most_central_10_SP_PC│                                     ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████████████████████████████████ │  32%
 47M   │ ┌─┴ examples                                 │                                     ░█████████████████████████████████████████████████████████████████████████████████ │  68%
 47M   ├─┴ tests                                      │                                     ██████████████████████████████████████████████████████████████████████████████████ │  69%
 69M ┌─┴ .                                            │███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ │ 100%

After

❯ dust                                                                                                                                                                            ─╯
3.6M           ┌── morphologies                                                                        │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████ │   7%
3.6M         ┌─┴ components                                                                            │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████ │   7%
3.7M       ┌─┴ circuit_sonata_quick_scx                                                                │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████ │   8%
3.6M       │     ┌── morphologies                                                                      │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓██████ │   7%
3.6M       │   ┌─┴ CircuitA                                                                            │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓██████ │   7%
4.6M       │ ┌─┴ components                                                                            │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███████ │   9%
4.9M       ├─┴ circuit_sonata_quick_scx_multi_circuit                                                  │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███████ │  10%
 11M       │   ┌── cell.asc                                                                            │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█████████████████ │  24%
 11M       │ ┌─┴ morphology                                                                            │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█████████████████ │  24%
 11M       ├─┴ hippocampus_opt_cell_template                                                           │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█████████████████ │  24%
4.2M       │   ┌── edges.h5                                                                            │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████ │   8%
4.2M       │ ┌─┴ edges                                                                                 │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████ │   8%
2.1M       │ │   ┌── dend-051208AM2_axon-mpg141017_a1-2_idC_-_Scale_x1.000_y0.850_z1.000.swc           │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ │   4%
2.1M       │ │   ├── dend-051208AM2_axon-mpg141017_a1-2_idC_-_Scale_x1.000_y0.850_z1.000_-_Clone_10.swc│ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ │   4%
3.1M       │ │   ├── mpg141017_a1-2_idC_-_Scale_x1.000_y0.850_z1.000_-_Clone_11.swc                    │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████ │   6%
 17M       │ │ ┌─┴ morphologies                                                                        │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓█████████████████████████ │  35%
 17M       │ ├─┴ components                                                                            │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓█████████████████████████ │  35%
 22M       ├─┴ circuit_hipp_mooc_most_central_10_SP_PC                                                 │ ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████████████████████████████████ │  45%
 47M     ┌─┴ examples                                                                                  │ ░████████████████████████████████████████████████████████████████████ │  96%
 47M   ┌─┴ tests                                                                                       │ █████████████████████████████████████████████████████████████████████ │  98%
 48M ┌─┴ .                                                                                             │██████████████████████████████████████████████████████████████████████ │ 100%

Note: tests directory is also not a small directory. It's size can further be reduced in the future by removing the unused components of the extracted SONATA circuit namely circuit_hipp_mooc_most_central_10_SP_PC.

The relative path: tests/examples/circuit_hipp_mooc_most_central_10_SP_PC.

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.23%. Comparing base (de7f7ae) to head (7c204e0).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #175 +/- ## ======================================= Coverage 91.23% 91.23% ======================================= Files 95 95 Lines 5626 5626 ======================================= Hits 5133 5133 Misses 493 493 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.