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

Add context handling with accept/reject #61

Merged
merged 40 commits into from
Nov 19, 2024
Merged

Add context handling with accept/reject #61

merged 40 commits into from
Nov 19, 2024

Conversation

arnaudon
Copy link
Contributor

@arnaudon arnaudon commented Apr 20, 2023

This PR adds an accept/reject mechanisms to allow for external modification of section and trunk growths via the generic context object.

@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Merging #61 (29a57c3) into main (9d74824) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

❗ Current head 29a57c3 differs from pull request most recent head 301455f. Consider uploading reports for the commit 301455f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
- Coverage   97.76%   97.73%   -0.04%     
==========================================
  Files          39       39              
  Lines        2197     2211      +14     
  Branches      381      385       +4     
==========================================
+ Hits         2148     2161      +13     
  Misses         30       30              
- Partials       19       20       +1     
Flag Coverage Δ
pytest 97.73% <100.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
neurots/extract_input/input_parameters.py 97.56% <ø> (ø)
neurots/generate/orientations.py 100.00% <100.00%> (ø)
neurots/generate/section.py 100.00% <100.00%> (ø)
neurots/generate/tree.py 99.01% <100.00%> (-0.99%) ⬇️
neurots/utils.py 100.00% <100.00%> (ø)

@arnaudon
Copy link
Contributor Author

@adrien-berchet , when you have 5min, if you can take a look at this to see if the general implementation makes sense. I will then use context to modify the prob() function.

.pre-commit-config.yaml Outdated Show resolved Hide resolved
neurots/utils.py Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
tests/test_utils.py Outdated Show resolved Hide resolved
@adrien-berchet
Copy link
Member

@adrien-berchet , when you have 5min, if you can take a look at this to see if the general implementation makes sense. I will then use context to modify the prob() function.

Looks nice!

neurots/utils.py Outdated Show resolved Hide resolved
tests/test_utils.py Outdated Show resolved Hide resolved
tests/test_utils.py Outdated Show resolved Hide resolved
@arnaudon arnaudon requested a review from lidakanari May 15, 2023 14:40
@arnaudon arnaudon marked this pull request as ready for review May 15, 2023 14:41
neurots/generate/section.py Outdated Show resolved Hide resolved
neurots/generate/section.py Outdated Show resolved Hide resolved
@arnaudon arnaudon force-pushed the boundary_new branch 2 times, most recently from 4c626ea to 81bc3e6 Compare June 23, 2023 11:42
@arnaudon arnaudon force-pushed the boundary_new branch 2 times, most recently from dc4b7ec to 7dfe6dd Compare September 6, 2023 07:42
@arnaudon
Copy link
Contributor Author

arnaudon commented Sep 6, 2023

@lidakanari @adrien-berchet , this can be reviewed as well, again, it is experimental, so not fully tested

neurots/generate/section.py Outdated Show resolved Hide resolved
neurots/generate/tree.py Outdated Show resolved Hide resolved
neurots/generate/tree.py Outdated Show resolved Hide resolved
neurots/utils.py Outdated Show resolved Hide resolved
neurots/utils.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.88%. Comparing base (38f8e66) to head (4b9cb8f).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
+ Coverage   97.86%   97.88%   +0.01%     
==========================================
  Files          39       39              
  Lines        2200     2217      +17     
  Branches      382      296      -86     
==========================================
+ Hits         2153     2170      +17     
  Misses         29       29              
  Partials       18       18              
Flag Coverage Δ
pytest 97.88% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
neurots/generate/orientations.py 100.00% <100.00%> (ø)
neurots/generate/section.py 100.00% <100.00%> (ø)
neurots/generate/tree.py 100.00% <100.00%> (ø)
neurots/utils.py 100.00% <100.00%> (ø)
---- 🚨 Try these New Features:

neurots/generate/section.py Outdated Show resolved Hide resolved
neurots/generate/section.py Outdated Show resolved Hide resolved
@arnaudon arnaudon merged commit 2ef760f into main Nov 19, 2024
9 checks passed
@arnaudon arnaudon deleted the boundary_new branch November 19, 2024 08:10
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.

5 participants