Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

remove examples from package distribution#175

Merged
anilbey merged 5 commits intomainfrom
packaging
May 2, 2024
Merged

remove examples from package distribution#175
anilbey merged 5 commits intomainfrom
packaging

Conversation

@anilbey
Copy link
Copy Markdown
Contributor

@anilbey anilbey commented May 2, 2024

@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.

@anilbey anilbey marked this pull request as ready for review May 2, 2024 10:36
@anilbey anilbey requested review from AurelienJaquier and ilkilic May 2, 2024 10:36
Copy link
Copy Markdown
Contributor

@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.

As you said, tests is not small either. Do you think it would make sense to remove it also from the package? People installing the package via pip usually just want the library, not the tests

Copy link
Copy Markdown
Contributor

@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.

looks good to me

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

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

@anilbey anilbey merged commit 3dc9665 into main May 2, 2024
@anilbey anilbey deleted the packaging branch May 2, 2024 14:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants