Skip to content

fix: CLI simulate and ExtNestDevice #207

Merged
drodarie merged 10 commits intomainfrom
fix/nest_rec
Dec 17, 2025
Merged

fix: CLI simulate and ExtNestDevice #207
drodarie merged 10 commits intomainfrom
fix/nest_rec

Conversation

@drodarie
Copy link
Contributor

@drodarie drodarie commented Dec 6, 2025

Describe the work done

  • CLI simulate - make exists flag not necessary if output_folder is not defined
  • Allow for list of values for ExtNestDevice

List which issues this resolves:

Close #204 #206


📚 Documentation preview 📚: https://bsb-nest--207.org.readthedocs.build/en/207/


📚 Documentation preview 📚: https://bsb-core--207.org.readthedocs.build/en/207/

@drodarie drodarie self-assigned this Dec 6, 2025
@drodarie drodarie changed the title Fix/nest rec fix: CLI simulate and ExtNestDevice Dec 6, 2025
@github-actions github-actions bot added the fix label Dec 6, 2025
@codecov
Copy link

codecov bot commented Dec 6, 2025

Codecov Report

❌ Patch coverage is 36.11111% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.45%. Comparing base (8ac06bf) to head (455ad59).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/bsb-core/bsb/cli/commands/_projects.py 4.16% 23 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #207      +/-   ##
==========================================
+ Coverage   78.27%   85.45%   +7.18%     
==========================================
  Files         196      100      -96     
  Lines       17945    11382    -6563     
  Branches     2097     1323     -774     
==========================================
- Hits        14046     9727    -4319     
+ Misses       3348     1355    -1993     
+ Partials      551      300     -251     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@filimarc
Copy link
Contributor

I think when running multicore the check for folder existence should be done only on master job, otherwise every other job will raise the error.

@filimarc
Copy link
Contributor

Just another thing, maybe we can add in the error message that the check can be skipped using --exist flag.

@drodarie drodarie requested a review from Helveg December 15, 2025 13:58
Copy link
Contributor

@Helveg Helveg left a comment

Choose a reason for hiding this comment

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

Looks great! Just split the test and it's good to merge. What happens when these tests run in MPI though? don't they start multiple sims? :s or does MPI somehow propagate the subprocess via env vars or other strange mechanisms?

@drodarie
Copy link
Contributor Author

No theses tests does not work in parallel with subprocess. I wanted to introduce some tests for the CLI but I was too lazy to properly mock the Argparser system 😅
I will try to implement a more clean solution.

@drodarie drodarie requested a review from Helveg December 16, 2025 14:18
@Helveg
Copy link
Contributor

Helveg commented Dec 16, 2025

I'm also fine with skipping them under parallel and adding copies of them with the subprocess command being prepended with mpirun -n 2 ... :) That way the serial test suite tests those commands both in serial and parallel. It probably also won't count towards coverage, will it? But again maybe simply prepending the command with the correct mpirun -n 2 coverage run ... command might work well enough.

This could also be another improvement when we switch to click, they support test runners.

Copy link
Contributor

@Helveg Helveg left a comment

Choose a reason for hiding this comment

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

LGTM! Maybe think about my comment above, and perhaps for now just skip under parallel so we don't cause any weird flake, and write the remaining issues/improvements in an issue. I'm OK to merge this

@drodarie
Copy link
Contributor Author

I think I prefer the current implementation of the unittests because each step is captured by the coverage tool (we can see which lines were covered), while I could not make it work with subprocess. Indeed we can revisit this point when we move to click.

@drodarie drodarie merged commit 3133628 into main Dec 17, 2025
27 checks passed
@drodarie drodarie deleted the fix/nest_rec branch December 17, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simulate do not check if folder exist

3 participants