Conversation
Summary of ChangesHello @jana-daouk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request expands the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds several new parameters to the params.yaml file, primarily for lamination optics and temperature-related calculations. The changes are straightforward, but I've identified a few areas for improvement to enhance consistency and readability of the configuration file. My review includes suggestions to standardize comment formatting, remove a duplicated comment, and ensure consistent spacing between parameter blocks. Addressing these points will improve the maintainability of the file.
IshDeshpa
left a comment
There was a problem hiding this comment.
still have to look at math.
| super().__init__() | ||
|
|
||
| # SUN / GEOMETRY | ||
| def _incidence_factor(self, params: dict[str, PlainQuantity[float]]) -> float: |
There was a problem hiding this comment.
Why wrap everything with float?
| energy0 = cast(PlainQuantity[float], params["array_power"] * timestep_s) | ||
| params["array_energy"] = energy0 |
There was a problem hiding this comment.
u could just set array_energy to 0
|
|
||
| # base max power | ||
| base_power = params["num_cells"] * params["p_mpp"] * params["cell_efficiency"] | ||
| energy = cast(PlainQuantity[float], params["array_power"] * timestep_s) |
There was a problem hiding this comment.
do you need to cast this?
There was a problem hiding this comment.
Lots of casting stuff to floats and using cast to cast to PlainQuantities. If this is to satisfy the type checker that's fine, but otherwise if it can be removed you should remove it.
| ) -> PlainQuantity[float]: | ||
| # Updates array power based on sun angle | ||
| # accumulates energy into total_array_energy. | ||
|
|
||
| # sunlight factor 0–1 | ||
| factor: PlainQuantity[float] = Q_( | ||
| self._incidence_factor(params), "dimensionless" | ||
| inc = self._incidence_factor(params) | ||
|
|
||
| # Normalize timestep to seconds quantity | ||
| if isinstance(timestep, timedelta): | ||
| timestep_s: PlainQuantity[float] = Q_(float(timestep.total_seconds()), "s") | ||
| else: | ||
| timestep_s = cast(PlainQuantity[float], timestep).to("second") |
There was a problem hiding this comment.
You can just assume timestep is a PlainQuantity; that's what the EnergyModel specifies should be passed in.
There was a problem hiding this comment.
It wasn't taking it as a plainQuantity.
Co-authored-by: Ishan Deshpande <ishdeshpa@gmail.com>
No description provided.