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

Add "verbose" option for ResourceTools.py #96

Closed
grgmiller opened this issue Aug 10, 2021 · 1 comment · Fixed by #102
Closed

Add "verbose" option for ResourceTools.py #96

grgmiller opened this issue Aug 10, 2021 · 1 comment · Fixed by #102
Assignees

Comments

@grgmiller
Copy link
Contributor

When fetching resource files, using PySAM.ResourceTools.FetchResourceFiles(), the output is quite verbose, printing many statements such as:

  • print('\nStarting data download for {} using {} thread workers.'.format(self.tech, self.workers))
  • print("Downloading file from WIND Toolkit for {}, {}.".format(lat, lon))
  • print('Success! File downloaded to {}.'.format(file_path))
  • print("Getting list of available NSRDB files for {}, {}.".format(lat, lon))
  • print(data_url)

For downloading a single file, this is fine, but when running PySAM to download dozens or hundreds of resource files, these outputs are overwhelming.

I wanted to suggest implementation of a verbose parameter for the FetchResourceFiles() class, which would silence all of these print statements if set to False (it could be left as True as a default. This could be implemented by preceding the print statements with if verbose == True: print().

Thank you!

@grgmiller
Copy link
Contributor Author

Thank you!

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 a pull request may close this issue.

2 participants