Skip to content

Conversation

@MarleneBusch
Copy link
Collaborator

Updated structure for loading multiple heliostats at once.

This PR includes changes in the scenario structure and all classes and functions that are responsible for creating scenarios and those that are responsible for loading data from scenarios.
The receiver class was renamed to the more general term target area because we need to differentiate between receivers and calibration targets.
The MPI parallelisation backend was removed and replaced with nccl or gloo depending on cpu or gpu use. This change was made because we currently only use DDP for parallelisation and MPI is not optimal for this.

Fixes #85

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@github-actions
Copy link

github-actions bot commented Jan 13, 2025

Name Stmts Miss Cover Missing
artist\__init__.py 5 0 100%
artist\field\__init__.py 13 0 100%
artist\field\actuator.py 18 2 89% 103, 123
artist\field\actuator_array.py 28 0 100%
artist\field\actuator_ideal.py 10 0 100%
artist\field\actuator_linear.py 40 0 100%
artist\field\facets_nurbs.py 26 0 100%
artist\field\heliostat.py 156 2 99% 118-119
artist\field\heliostat_field.py 22 0 100%
artist\field\kinematic.py 10 1 90% 68
artist\field\kinematic_rigid_body.py 78 0 100%
artist\field\surface.py 21 0 100%
artist\field\tower_target_area.py 40 0 100%
artist\field\tower_target_area_array.py 21 0 100%
artist\raytracing\__init__.py 3 0 100%
artist\raytracing\heliostat_tracing.py 109 1 99% 4
artist\raytracing\rays.py 7 0 100%
artist\raytracing\raytracing_utils.py 10 0 100%
artist\scenario.py 108 1 99% 616
artist\scene\__init__.py 4 0 100%
artist\scene\light_source.py 15 2 87% 65, 96
artist\scene\light_source_array.py 31 0 100%
artist\scene\sun.py 40 0 100%
artist\util\__init__.py 24 8 67% 54-55, 60-65
artist\util\alignment_optimizer.py 79 1 99% 343
artist\util\config_dictionary.py 249 0 100%
artist\util\nurbs.py 138 8 94% 281, 285, 287-288, 362-363, 366-367
artist\util\paint_loader.py 78 0 100%
artist\util\surface_converter.py 151 0 100%
artist\util\utils.py 158 2 99% 7, 744
TOTAL 1692 28 98%

@codecov
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 99.00990% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.34%. Comparing base (7948d0d) to head (e56cc5c).
Report is 55 commits behind head on main.

Files with missing lines Patch % Lines
artist/util/alignment_optimizer.py 92.30% 1 Missing ⚠️
artist/util/utils.py 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
+ Coverage   98.28%   98.34%   +0.05%     
==========================================
  Files          30       30              
  Lines        1635     1692      +57     
==========================================
+ Hits         1607     1664      +57     
  Misses         28       28              

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

Copy link
Member

@kalebphipps kalebphipps left a comment

Choose a reason for hiding this comment

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

Everything looks good - I have only made some minor comments.

The one thing that should be changed before merging is to update all the Readthedocs pages for the tutorials and include Readthedocs pages for those tutorials that do not yet have such a page. I have included a longer comment about this - if you have any questions about what should be done feel free to ask and we can go through it together. Once this is done, I am happy to approve the merge :)

@MarleneBusch
Copy link
Collaborator Author

MarleneBusch commented Jan 21, 2025

I included all requested changes.
Could you please do the code formatting for the json files in PyCarm, this is easier than in VSCode. Thank you!

@MarleneBusch
Copy link
Collaborator Author

It seems to me like our GitHub workflows are not yet configured for testing on GPU and also not configured for distributed testing. That is why the two lines in utils.py and alignment_optimizer.py are not yet covered by the tests. The tests do exist but they are not run.

@kalebphipps kalebphipps self-requested a review January 23, 2025 15:29
Copy link
Member

@kalebphipps kalebphipps 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 - I have made a few formatting changes and fixed a few typos locally - I will push them now and then merge

@kalebphipps kalebphipps merged commit 83e9256 into main Jan 23, 2025
15 checks passed
@MarleneBusch MarleneBusch deleted the features/multi_heliostats branch January 24, 2025 07:34
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.

Refactor receiver-variables

3 participants