Skip to content

Update Solar Resource UI form location name parser to be more robust#929

Merged
cpaulgilman merged 7 commits into
patchfrom
fix-solar-resource-ui
Feb 10, 2022
Merged

Update Solar Resource UI form location name parser to be more robust#929
cpaulgilman merged 7 commits into
patchfrom
fix-solar-resource-ui

Conversation

@cpaulgilman

@cpaulgilman cpaulgilman commented Feb 9, 2022

Copy link
Copy Markdown
Collaborator

Pull Request Template

Description

Improve parsing of location names typed on the Location and Resource page for NSRDB downloads and fix layout issues on Location and Resource page.

Testing requires either building sam-private or copying the Solar Resource Data.ui file to an official release version of SAM to access private API keys for geocoding and NSRDB downloads.

Fixes #710 and #874

While we're at it, fix some other minor UI issues: #848, #795, #617, #799.

Type of change

Please delete options that are not relevant.

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

If you have added a new compute module in a SSC pull request related to this one, be sure to check the Process Requirements.

  • [ x] My code follows the style guidelines of this project
  • [ x] I have performed a self-review of my own code
  • [x ] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [x ] My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@cpaulgilman cpaulgilman added this to the 2021.12.02 Patch 1 milestone Feb 9, 2022
@cpaulgilman cpaulgilman requested a review from brtietz February 9, 2022 22:55
@cpaulgilman cpaulgilman self-assigned this Feb 9, 2022
@brtietz

brtietz commented Feb 10, 2022

Copy link
Copy Markdown
Collaborator

@cpaulgilman I tried to test this by copying private.h from sam-private to the sam repository, but got the following error:

image

I'm guessing I've missed a file - can you point me at the relevant instructions?

@cpaulgilman

Copy link
Copy Markdown
Collaborator Author

@brtietz The email address comes from the registration code, rather than private.h so you would have to build SAM from sam-private to get the full functionality. I updated the SAM-private readme: https://github.com/NREL/SAM-private/blob/patch/README.md. It references the DocHub folder: https://github.com/NREL/SAM-documentation/tree/master/Releases%20and%20Updates/Build%20Instructions%20for%20NREL%20Releases%20and%20Updates.

Perhaps an easier but hacky way to test is to temporarily copy the Solar Resource Data.ui file to SAM 2021.12.02.

@brtietz

brtietz commented Feb 10, 2022

Copy link
Copy Markdown
Collaborator

Some of the options in the test script produce the desired behavior. For example 34.818N,118.397W gives this:

image

However, the issue that re-opened #710 (a period instead of a comma in a lat/lon pair) is interpreted as an address:

image

Is that in or out of scope for this PR? I'd be happy to create a follow up issue and add more error-proofing logic later.

@cpaulgilman

Copy link
Copy Markdown
Collaborator Author

My goal was to avoid the callback error described in #710 rather than try to interpret lat/lon separated by a period. A careful user would notice that the lat/lon in the returned weather file is different from the requested values, so I am not inclined to try to handle period-separated lat/lon values.

@cpaulgilman cpaulgilman merged commit 027df07 into patch Feb 10, 2022
@cpaulgilman cpaulgilman deleted the fix-solar-resource-ui branch February 10, 2022 22:51
@cpaulgilman cpaulgilman added the added to release notes PR and/or issue has been added to release notes for a public release label Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added to release notes PR and/or issue has been added to release notes for a public release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

latitude-comma-space-longitude has unspecified behavior

2 participants