Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Natsoulas committed Oct 22, 2024
1 parent a9ab5b2 commit 4db9f2b
Showing 1 changed file with 9 additions and 95 deletions.
104 changes: 9 additions & 95 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,104 +1,18 @@
* **Tickets addressed:** bsk-000
* **Review:** By file
* **Merge strategy:** Merge (no squash)
* **Review:** By commit <!-- Choose from: "by commit", "by file" -->
* **Merge strategy:** Merge (no squash) <!-- Choose from: "merge (no squash)", "squash and merge" -->

## Description
This branch introduces significant improvements to the Monte Carlo plotting capabilities in Basilisk, focusing on enhancing the `AnalysisBaseClass.py` file and related example scenarios. The key changes include:

1. The `MonteCarloPlotter` class:
- Improved data loading and management
- Dynamic plot creation with support for multiple variables and components
- Interactive plot updates based on user input
- Efficient handling of large datasets through downsampling and streaming

2. Bokeh Integration:
- Added support for Bokeh, enabling interactive HTML-based visualizations
- Implemented a Bokeh server option for real-time plot updates
- Created a fallback to matplotlib when Bokeh is unavailable

3. User Interface Improvements:
- Added dropdown menus for variable and component selection
- Implemented a search functionality to highlight specific run numbers
- Created a status indicator to show plot loading/updating status

4. Documentation and File Management:
- Improved plot saving functionality, including HTML and RST file generation
- Enhanced documentation generation for saved plots

5. Example Scenario Updates:
- Modified `scenarioMonteCarloAttRW.py` to showcase the new plotting capabilities
- Added command-line options for data deletion and Bokeh server usage
- Implemented a new `scenarioRerunMonteCarlo.py` for demonstrating how to rerun specific Monte Carlo simulations

6. Testing and Compatibility:
- Updated `test_bskMcTestScript.py` to accommodate the new features
- Ensured backward compatibility with existing Monte Carlo simulations

These changes significantly improve the visualization and analysis capabilities for Monte Carlo simulations in Basilisk, providing users with more interactive and informative tools to explore simulation results.
<!-- What approach was taken to satisfy the ticket being addressed? What should reviewers be aware of? How are your
commits organized? -->

## Verification
The changes were validated through the following methods:

1. Manual Testing:
- Extensive testing of the new `MonteCarloPlotter` class functionality
- Verification of Bokeh integration and fallback to matplotlib
- Testing of user interface improvements, including dropdown menus and run number search functionality

2. Automated Tests:
- Updated `test_bskMcTestScript.py` to cover new features and ensure backward compatibility
- Added new unit tests for the `MonteCarloPlotter` class to verify data loading, plot creation, and interactive updates

3. Example Scenario Testing:
- Ran and verified the modified `scenarioMonteCarloAttRW.py` to showcase new plotting capabilities
- Tested the new `scenarioRerunMonteCarlo.py` to ensure proper functionality for rerunning specific Monte Carlo simulations

4. Performance Testing:
- Conducted manual performance tests with large datasets up to 1 GB in size to verify efficient data handling and display

5. Documentation Review:
- Verified that the updated documentation accurately reflects the new features and usage instructions in sphinx documentation

No tests were removed or re-baselined. The addition and update of tests were necessary to cover the new functionality and ensure the reliability of the Monte Carlo plotting capabilities.
<!-- How were the changes validated? Were any automated tests added, updated, removed, or re-baselined? If you didn't
add or update any tests justify this choice. -->

## Documentation
The following documentation has been affected by these changes and should be reviewed for accuracy and completeness:

1. Docstrings in modified files:
- `AnalysisBaseClass.py`: Updated docstrings for the `MonteCarloPlotter` class and its methods, particularly those related to Bokeh integration and new plotting features
- `scenarioMonteCarloAttRW.py`: Revised docstrings to reflect new command-line options and usage of updated plotting capabilities
- `scenarioRerunMonteCarlo.py`: New file with comprehensive docstrings explaining the purpose and usage of rerunning specific Monte Carlo simulations

2. `optional-requirements.txt`:
- Added Bokeh and Dask to the list of optional requirements
- Reviewers should verify these optional packages are sufficient for the new plotting capabilities introduced in this branch/pr.

Reviewers should pay particular attention to:
- Accuracy and completeness of docstrings in the modified files
- Clarity of explanations for new features and methods
- Consistency between code behavior and documented functionality
- Correct specification of Bokeh and Dask in the optional requirements file

Additionally, reviewers should ensure that the addition of Bokeh and Dask to the optional requirements is properly documented in any relevant README files or user guides.
<!-- What documentation was invalidated by these changes? Which artifacts should reviewers check for accuracy and
completeness? -->

## Future work
1. Further optimization of performance for large datasets:
- Investigate and implement data compression techniques to improve handling of very large Monte Carlo datasets
- Explore more efficient data streaming methods for real-time plot updates

2. Refinement of Bokeh plotting tools:
- Gather user feedback on the new Monte Carlo plotting capabilities
- Based on feedback, potentially simplify or customize Bokeh plotting tools specifically for Monte Carlo simulations
- Consider adding more advanced interactive features or visualization types if requested by users

3. Expansion of rerun capabilities:
- Enhance the `scenarioRerunMonteCarlo.py` to support more complex rerun scenarios
- Implement a user-friendly interface for selecting specific Monte Carlo runs to rerun

4. Integration with other Basilisk modules:
- Explore opportunities to integrate the improved Monte Carlo plotting capabilities with any other relevant Basilisk analysis and visualization tools

5. Documentation and tutorials:
- Develop comprehensive tutorials and examples showcasing the new Monte Carlo plotting features
- Create video tutorials to help users quickly adopt and leverage the new capabilities

Note: These future work items are based on anticipated needs and potential improvements. Priorities may be adjusted based on user feedback and project requirements.
<!-- What next steps can we anticipate from here, if any? -->

0 comments on commit 4db9f2b

Please sign in to comment.