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

Split run_solar_cell_model function #4

Open
5 tasks
dalonsoa opened this issue Oct 17, 2022 · 0 comments
Open
5 tasks

Split run_solar_cell_model function #4

dalonsoa opened this issue Oct 17, 2022 · 0 comments
Labels
Hacktoberfest help wanted Extra attention is needed

Comments

@dalonsoa
Copy link
Contributor

dalonsoa commented Oct 17, 2022

Problem

The main link between solcore and sunglass is in the sunglass.run_calculation.run_solar_cell_model, which is an extremely long function that does too many things and is rather fragile. Luckily, it is not that difficult to break it into smaller chunks each doing only one thing, since it is very sequential.

Proposed solution

The current code starting here:

def run_solar_cell_model(task, model):

and running until the end of the file should be separated into smaller functions. This umbrella issue will be dealt with combining all those smaller functions to reproduce the existing functionality, but first those functions need to be created. Suggested functions to split things into are:

Appropriate tests to check that those individual building blocks work should be added, too. Once the above are done, then the existing run_solar_cell_model code can be refactored to use them.

@dalonsoa dalonsoa added help wanted Extra attention is needed Hacktoberfest labels Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant