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

Adding PV module unit tests and documentation #79

Merged
merged 44 commits into from
Mar 4, 2024

Conversation

brookeslawski
Copy link
Collaborator

@brookeslawski brookeslawski commented Feb 26, 2024

Addressing Issues #54 and #67

This PR adds unit tests and documentation for the SolarPySAM module and corrects/improves some of the variable names.

brookeslawski and others added 27 commits November 27, 2023 09:55
…solar-pysam

tried to push to origin solar-pysam but wasn't able to because this branch was behind the remote by a commit
@brookeslawski
Copy link
Collaborator Author

I believe it's best practice for the unit tests to be totally self-contained. At the moment, this test requires the json file in the example folder, which doesn't cause an errors but is not perfect. I'm working to eliminate the use of this file, but waiting for support from the PySAM team to do that.

assert outputs_init["power"] == 25
assert outputs_init["irradiance"] == 1000

# change simple battery state as if during simulation
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we update the comments so that it's more clear what the part of the solar simulation it's testing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, good idea.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you know what the changes to this file were?

Copy link
Collaborator Author

@brookeslawski brookeslawski Feb 26, 2024

Choose a reason for hiding this comment

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

It was the ruff formatting (ordering the imported packages alphabetically), but I'm confused as to why these changes are showing up here since I merged develop into my local branch

@@ -49,6 +49,10 @@ def __init__(self, input_dict):
def get_py_sim(self, py_sim_obj_dict):
if py_sim_obj_dict["py_sim_type"] == "SimpleSolar":
return SimpleSolar(py_sim_obj_dict, self.dt)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this section in the files twice?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It looks like yes. Maybe this happened when I pulled in changes from develop? Not sure, but I'm fixing it now.

Copy link
Collaborator

@genevievestarke genevievestarke 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 to me!

@brookeslawski brookeslawski changed the title Adding PV module unit tests Adding PV module unit tests and documentation Feb 27, 2024
@brookeslawski
Copy link
Collaborator Author

You'll notice that SimpleSolar is still in there - I'm going to do a separate PR for this change because it appears in other, older example folders and I want to meet with the PySAM developers to implement a default input before replacing SimpleSolar with SolarPySAM in all the example files.

@brookeslawski brookeslawski merged commit 32e9976 into NREL:develop Mar 4, 2024
6 checks passed
@misi9170 misi9170 mentioned this pull request Sep 27, 2024
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.

3 participants